Epson Research and Development Page 53
Vancouver Design Center
Programming Notes and Examples S1D13505
Issue Date: 01/02/05 X23A-G-003-07
11 Hardware Abstraction Layer (HAL)

11.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 S1D13505 on different processor platforms. The
HAL also allows for easier porting of programs between S1D1350X products. Integral to
the HAL is an information structure (HAL_STRUCT) that contains configuration data on
clocks, display modes, and default regis ter values. This structure combined with the utility
13505CFG.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 S1D13505 without
using the HAL.

11.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;
WORD wDefaultMode;
BYTE Regs[MAX_DISP_MODE][MAX_REG + 1];
DWORD dwClkI; /* Input Clock Frequency (in kHz) */
DWORD dwBusClk; /* Bus Clock Frequency (in kHz) */
DWORD dwRegAddr; /* Starting address of registers */
DWORD dwDispMem; /* Starting address of display buffer memory */
WORD wPanelFrameRate; /* Desired panel frame rate */
WORD wCrtFrameRate; /* Desired CRT rate */
WORD wMemSpeed; /* Memory speed in ns */
WORD wTrc; /* Ras to Cas Delay in ns */
WORD wTrp; /* Ras Precharge time in ns */
WORD wTrac; /* Ras Access Charge time in ns */
WORD wHostBusWidth; /* Host CPU bus width in bits */
} HAL_STRUCT;