Epson S1D13708 Camera Accessories User Manual


 
Page 64 Epson Research and Development
Vancouver Design Center
S1D13708 Programming Notes and Examples
X39A-G-003-01 Issue Date: 01/11/20
ADVANCE
D
IN
F
ORMATION
Subje
ct to C
ha
nge
9.2.1 Startup Routines
There are two routines dedicated to startup and initializing the S1D13708. Typically these
two functions are the first two HAL routines a program will call.
The startup routine locates the S1D13708 controller and initializes HAL data structures. As
the name suggests, the initialization routine prepares the S1D13708 for use. Splitting the
startup functionality allows programs to start and locate the S1D13708 but delay or
possibly never initialize the controller.
Boolean halAcquireController(UInt32 * pMem, UInt32 * pReg)
Description: This routine initializes data structures and initiates the link between the application soft-
ware and the hardware. When the S1D13708 HAL is used this routine must be the first
HAL function called.
The display buffer and register addresses, configured by 13708CFG, are used by halAc-
quireController(). When both addresses are set to 0, the software assumes an Intel plat-
form, and will attempt to load the S1D13xxx driver. If this driver loads successfully, a
check is then made for the S1D13708 evaluation board. If this board exists, halAcquire-
Controller() allocates display buffer and register addresses which are then returned via
pMem and pReg.
If either the register or display buffer addresses in 13708CFG are non-zero, halAcquire-
Controller() will return these addresses via pMem and pReg.
Parameters: pMem Pointer to an unsigned 32-bit integer which will receive the offset to the first
byte of display buffer memory. The offset may be cast to a pointer to access
display memory.
pReg Pointer to an unsigned 32-bit integer which will receive the offset to the first
byte of register space. The offset may be cast to a pointer and to access
S1D13708 registers.
On Win32 systems the returned offsets correspond to a linear addresses
within the caller’s address space.
Return Value: TRUE (non-zero) The addresses in pMem and pReg are available for use.
pMem will contain the offset to the first byte of display buffer memory.
pRegs will contain the address of the first S1D13708 control register.
FALSE (zero) The addresses in pMem and pReg cannot be used.
If additional error information is required call halGetLastError().
Note
1. This routine must be called before any other HAL routine is called.
2. For programs written for the S1D13708 evaluation board, an application may
call this routine to obtain pointers to the registers and display memory and then
perform all S1D13708 accesses directly.
3. This routine does not modify S1D13708 registers or display buffer memory.