Using The Hal Library; Api For 13505Hal - Epson S1D13505 Technical Manual

Embedded ramdac lcd/crt controller
Table of Contents

Advertisement

Page 54

11.3 Using the HAL library

11.4 API for 13505HAL

Function
seRegisterDevice
seInitHal
seSetInit
seSetDisplayMode
seGetId
seGetHalVersion
seGetLibseVersion
seGetMemSize
S1D13505
X23A-G-003-07
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 program 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).
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 highest warning levels of their compiler in
order to verify the parameter types.
This section is a description of the HAL library Application Programmers Interface (API).
Updates and revisions to the HAL may include new functions not included in the following
documentation.
Table 11-1: HAL Functions
Registers the S1D13505 parameters with the HAL, calls seInitHal if necessary.
seRegisterDevice MUST be the first HAL function called by an application.
Initialize the variables used by the HAL library (called by seRegisterDevice)
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
Programs the S1D13505 for use with the passed display mode and flags.
Interpret the revision code register to determine chip id
Return some Version information on the HAL library
Return version information on the LIBSE libraries (for non-x86 platforms)
Determines the amount of installed video memory
Description
Initialization:
General HAL Support:
Epson Research and Development
Vancouver Design Center
Programming Notes and Examples
Issue Date: 01/02/05

Advertisement

Table of Contents
loading

Table of Contents