Page 54 Epson Research and Development
Vancouver Design Center
S1D13505 Programming Notes and Examples
X23A-G-003-07 Issue Date: 01/02/05
Within the Regs array in the structure are all the registers defined in the S1D13505
Hardware Functional Specification, document number X23A-A-001-xx. Using the
13505CFG.EXE utility you can adjust the content of the registers contained in
HAL_STRUCT to allow for different LCD panel timing values and other default settings
used by the HAL. In the simplest case, the pro gram only calls a few basic HAL functions
and the contents of the HAL_STRUCT are used to setup the S1D13505 for operation (see
Section 11.6.3, “Building a complete application for the target example” on page 80).
11.3 Using the HAL library
To utilize the HAL library, the programmer must include two “.h” files in their code.
“Hal.h” contains the HAL library function prototypes and structure definitions, and
“appcfg.h” contains the instance of the HAL_STRUCT that is defined in “Hal.h” and
configured by 13505CFG.EXE. Additionally, “hal_regs.h” can be included if the
programmer intends to change the S1D13505 registers directly using the seGetReg() or
seSetReg() functions. For a more thorough example of using the HAL see Section 12.1.1,
“Sample code using the S1D13505 HAL API” on page 84.
Note
Many of the HAL library functions have pointers as parameters. The programmer
should be aware that little validation of these pointers is performed, so it is up to the
programmer to ensure that they adhere to the interface and use valid pointers.
Programmers are recommended to use the hi ghest warning levels of their compiler in
order to verify the parameter types.
11.4 API for 13505HAL
This section is a description of the HAL library Application Prog rammers Inter face (API).
Updates and revisions to the HAL may include new functions not included in the following
documentation.
Table 11-1: HAL Functions
Function Description
Initialization:
seRegisterDevice Registers the S1D13505 parameters with the HAL, calls seInitHal if necessary.
seRegisterDevice MUST be the first HAL function called by an application.
seInitHal Initialize the variables used by the HAL library (called by seRegisterDevice)
seSetInit Programs the S1D13505 for use with the default settings, calls seSetDisplayMode to do the
work, clears display memory. Note: either seSetInit or seSetDisplayMode MUST be called
after calling seRegisterDevice
seSetDisplayMode Programs the S1D13505 for use with the passed display mode and flags.
General HAL Support:
seGetId Interpret the revision code register to determine chip id
seGetHalVersion Return some Version information on the HAL library
seGetLibseVersion Return version information on the LIBSE libraries (for non-x86 platforms)
seGetMemSize Determines the amount of installed video memory