Epson S1D13705 Computer Monitor User Manual


 
Page 48 Epson Research and Development
Vancouver Design Center
S1D13705 Programming Notes and Examples
X27A-G-002-03 Issue Date: 02/01/22
9 Hardware Abstraction Layer (HAL)
9.1 Introduction
The HAL is a processor independent programming library provided by Epson. The HAL
was developed to aid the implementation of internal test programs, and provides an easy,
consistent method of programming the S1D13705 on different processor platforms. The
HAL also allows for easier porting of programs between S1D1370X products. Integral to
the HAL is an information structure (HAL_STRUCT) that contains configuration data on
clocks, display modes, and default register values. This structure combined with the utility
13705CFG.EXE allows quick customization of a program for a new target display or
environment.
Using the HAL keeps sample code simpler, although some programmers may find the HAL
functions to be limited in their scope, and may wish to program the S1D13705 without
using the HAL.
9.2 Contents of the HAL_STRUCT
The HAL_STRUCT below is contained in the file “hal.h” and is required to use the HAL library.
typedef struct tagHalStruct
{
char szIdString[16];
WORD wDetectEndian;
WORD wSize;
BYTE Regs [MAX_REG + 1];
DWORD dwClkI; /* Input Clock Frequency (in kHz) */
DWORD dwDispMem; /* Starting address of display buffer memory */
WORD wFrameRate; /* Desired panel frame rate */
} HAL_STRUCT;
Within the Regs array ia a structure which defines all the registers described in the
S1D13705 Hardware Functional Specification, document number X27A-A-001-xx. Using
the 13705CFG.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 S1D13705 for operation.