User`s manual

8: HARDWARE ABSTRACTION LAYER (HAL)
2-28 EPSON S1D13504 PROGRAMMING NOTES
AND EXAMPLES (S19A-G-002-06)
int seInitHal(void)
Description: Initializes HAL library variables. Must be called once when application starts (see
note below).
Parameter: None
Return Value: ERR_OK - operation completed with no problems.
Note: For Intel platforms, seRegisterDevice() automatically calls seInitHal() once. Consecutive calls
to seRegisterDevice() will not call seInitHal() again. For embedded platforms, the startup code
which is linked in addition to the HAL library will call seInitHal(). In this case, seInitHal() is
called before main() is called in the application.
int seRegisterDevice(const DeviceInfoDef *pDeviceInfo, const DEVICE_CHIP_DEF
*pDeviceChip, int *Device)
Description: Registers a device with the HAL library. The setup for the device is provided in the
structures *pDeviceInfo and *pDeviceChip. In addition, it allocates memory
addressing space for accessing registers and the display buffer.
Parameter: pDeviceInfo - pointer to HAL library structures
pDeviceChip - pointer to HAL library structure dealing with chip specific
features
Device - pointer to an allocated INT
This routine will set *Device to the registered device ID.
Return Value: ERR_OK - operation completed with no problems.
ERR_INVALID_STD_DEVICE
- device argument is not HAL_STDOUT or HAL_STDIN.
Note: No registers are actually changed by calling seRegisterDevice().
int seSetInit(int device)
Description: Sets the system to an operational state by initializing memory size, clocks, panel and
CRT parameters,... etc.
Parameter: device - registered device ID
Return Value: ERR_OK - operation completed with no problems.
ERR_INVALID_REG_DEVICE - device argument is not valid.
ERR_FAILED - unable to complete operation because registers have not been
initialized.
int seValidRegisteredDevice(int device)
Description: Determines if the device handle is valid.
Parameter: device - registered device ID
Return Value: ERR_OK - operation completed with no problems.
ERR_INVALID_REG_DEVICE - device argument is not valid.
int seValidStdDevice(int device)
Description: Determines if the device handle is HAL_STDOUT or HAL_STDIN.
Parameter: device - registered device ID
Return Value: ERR_OK - operation completed with no problems.
ERR_HAL_DEVICE_ERR - could not find free device handle.