Epson Research and Development
Page 47
Vancouver Design Center
Programming Notes and Examples
S1D13704
Issue Date: 01/02/12
X26A-G-002-03
9 Hardware Abstraction Layer (HAL )
9.1 Introduction
The HAL is a processor independent programming library provided by Epson with support
for several different computing platforms. The HAL was developed to aid implementation
of internal test programs and provides an easy, consistent method of programming
S1D1350x, S1D1370x, and S1D1380x products on different processor platforms.
The HAL keeps sample code simpler, although end programmers may find the HAL
functions to be limited in their scope, and may wish to ignore the HAL.
9.2 API for 13704HAL
The following is a description of the HAL library. Updates and revisions to the HAL may
include new functions not included in the following documentation.
The original design philosophy of the HAL was that function return values would be status
of the call. Most functions simple return ERR_OK. If a value had to be returned then a
pointer of the appropriate type was passed to the function.
9.2.1 Initialization
The following section describes the HAL functions dealing with S1D13704 initialization.
Typically a programmer has only to concern themselves with calls to seRegisterDevice()
and seSetInit().
int seRegisterDevice(const LPHAL_STRUC lpHalInfo, int * pDevID)
Description:
Registers the S1D13704 device parameters with the HAL library. The device param-
eters have been configured with address range, register values, desired frame rate,
etc., and have been saved in the HAL_STRUCT structure pointed to by lpHalInfo.
Parameters: lpHalInfo
-
pointer
to
HAL_STRUCT
information
structure
pDevice
- pointer to the integer to receive the device ID
Return Value: ERR_OK
- operation completed with no problems
ERR_UNKNOWN_DEVICE - the HAL was unable to find an S1D13704.
Note
No S1D13704 registers are changed by calling seRegisterDevice().
*