User`s manual

8: HARDWARE ABSTRACTION LAYER (HAL)
S1D13504 PROGRAMMING NOTES EPSON 2-27
AND EXAMPLES (S19A-G-002-06)
8HARDWARE ABSTRACTION LAYER (HAL)
8.1 Introduction
The HAL is a processor independent programming library provided by Seiko Epson. HAL provides
an easy method to program and configure the S1D13504. HAL allows easy porting from one
S1D1350x product to another and between system architectures. HAL is included in the utilities
provided with the S1D13504 evaluation system.
8.2 API for 13504HAL
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.
8.2.1 Initialization
int seDeRegisterDevice(int device)
Description: Removes a device's handle from the HAL library.
Parameter: device - registered device ID
Return Value: ERR_OK - operation completed with no problems
ERR_INVALID_REG_DEVICE - device argument is not valid
void seGetHalVersion(const char **pVersion, const char **pStatus,
const char **pStatusRevision)
Description: Gets HAL library version.
Parameter: pVersion - must point to an allocated string of size VER_SIZE
pStatus - must point to an allocated string of size STATUS_SIZE
pStatusRevision - must point to an allocated string of size STAT_REV_SIZE
Return Value: None
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_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
interface (on all platforms).