Epson Research and Development Page 49
Vancouver Design Center
Programming Notes and Examples S1D13705
Issue Date: 02/01/22 X27A-G-002-03
9.3 Using the HAL library
To utilize the HAL library, the programm er 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 13705CFG.EXE. For a more thorough example of using the HAL see
Section 10.1, “Sample code using the S1D13705 HAL API” on page 66.
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.
9.4 API for 13705HAL
This section is a description of the HAL library Application Progr ammers I nterf ace ( API).
Updates and revisions to the HAL may include new functions not inc luded in thi s documen-
tation.
Table 9-1: HAL Functions
Function Description
Initialization:
seRegisterDevice Registers the S1D13705 parameters with the HAL, calls seInitHal if necessary.
seRegisterDevice MUST be the first HAL function called by an application.
seSetInit Programs the S1D13705 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
General HAL Support:
seGetId Interpret the revision code register to determine chip id
seGetHalVersion Return version information on the HAL library
seGetLastUsableByte Determine the offset of the last unreserved usable byte in the display buffer
seGetBytesPerScanline Determine the number of bytes or memory consumed per scan line in current mode
seGetScreenSize Determine the height and width of the display surface in pixels
seDelay Use the frame rate timing to delay for required seconds (requires registers to be initialized)
seSetHighPerformance Used in color modes less than 8-bpp to toggle the h igh performance bit on or off
Advanced HAL Functions:
seSplitInit Initialize split screen variables and setup start addresses
seSplitScreen Set the size of either the top or bottom screen
seVirtInit Initialize virtual screen mode setting x and y sizes
seVirtMove pan/scroll the virtual screen surface(s)
Hardware Rotate:
seSetHWRotate Set the hardware rotation to either Portrait or Landscape
seSetPortraitMethod Call before setting hardware portrait mode to set either Default or Alternate Portrait Mode