Epson S1D13708 Camera Accessories User Manual


 
Page 66 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.2 Memory Access
The S1D13708 HAL includes six memory access functions. The primary purpose of the
memory access functions is to demonstrate how to access display memory using the C
programming language. Most programs that need to access memory will bypass the HAL
and instead use memory pointers.
Note
There are two means of accessing display memory: pointers into display memory, or
through the indirect interface. The following memory access functions will support both
types of access. However, the programmer must update the indirect interface functions
in the HAL library to support the given hardware implementation. These indirect inter-
face functions are all found in the file indirect.c in the HAL source code.
UInt8 halReadDisplay8(UInt32 Offset)
Description: Reads and returns the value of one byte of display memory.
Parameters: Offset A 32 bit offset to the byte to be read from display memory.
Return Value: The value of the byte at the requested offset.
UInt16 halReadDisplay16(UInt32 Offset)
Description: Reads and returns the value of one word of display memory.
Parameters: Offset A 32 bit byte offset to the word to be read from display memory.
To prevent system slowdowns and possibly memory faults, Offset should be
a word multiple.
Return Value: The value of the word at the requested offset.
UInt32 halReadDisplay32(UInt32 Offset)
Description: Reads and returns the value of one dword of display memory.
Parameters: Offset A 32 bit byte offset to the dword to be read from display memory.
To prevent system slowdowns and possibly memory faults, Offset should be
a dword multiple.
Return Value: The value of the dword at the requested offset.
void halWriteDisplay8(UInt32 Offset, UInt8 Value, UInt32 Count)
Description: Writes a byte into display memory at the requested address.
Parameters: Offset A 32 bit byte offset to the byte to be written to display memory.
Value The byte value to be written to display memory.
Count The number of times to repeat Value in memory. By including a count (or
loop) value this function can efficiently fill display memory.
Return Value: Nothing.