Page 40 Epson Research and Development
Vancouver Design Center
S1D13504 Programming Notes and Examples
X19A-G-002-07 Issue Date: 01/02/01
int seGetId(int device, BYTE *pId)
Description: Reads the revision code register to determine the ID.
Parameter: device - registered device ID
pId - pointer to allocated byte. The following are the possible values set to *pId:
ID_S1D13504F00A
ID_S1D13703F00A
ID_S1D13505F00A
ID_UNKNOWN
Return Value: ERR_OK - operation completed with no problems
ERR_INVALID_REG_DEVICE - device argument is not valid
Note
seGetId() will disable hardware suspend (on the Intel platform only), and will enable the host in-
terface (on all platforms).
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().