
Page 82
Epson Research and Development
Vancouver Design Center
S1D13706
Programming Notes and Examples
X31B-G-003-03
Issue Date: 01/02/23
10.2.5 Memory Access
The Memory Access functions provide convenient method of accessing the display
memory on an S1D13706 controller using byte, word or dword widths.
To reduce the overhead of these function calls as much as possible, two steps were taken:
• To gain maximum efficiency on all compilers and platforms, byte and word size argu-
ments are passed between the application and the HAL as unsigned integers. This typi-
cally allows a compiler to produce more efficient code for the platform.
• Offset alignment for word and dword accesses is not tested. On non-Intel platforms
attempting to access a word or dword on a non-aligned boundary may result in a
processor trap. It is the responsibility of the caller to ensure that the requested offset is
correctly aligned for the target platform.
• These functions will not swap bytes if the endian of the host CPU differs from the
S1D13706 (the S1D13706 is little-endian).
unsigned seReadDisplayByte(DWORD Offset)
Description:
Reads a byte from the display buffer memory at the specified offset and returns the value.
Parameters:
Offset
Offset, in bytes, from start of the display buffer to the byte to read.
Return Value:
The return value, in the least significant byte, is the byte read from display memory.
unsigned seReadDisplayWord(DWORD Offset)
Description:
Reads one word from display buffer memory at the specified offset and returns the value.
Parameters:
Offset
Offset, in bytes, from start of the display buffer to the word to read.
Return Value:
The return value, in the least significant word, is the word read from display memory.
DWORD seReadDisplayDword(DWORD Offset)
Description:
Reads one dword from display buffer memory at the specified offset and returns the value.
Parameters:
Offset
Offset, in bytes, from start of the display buffer to the dword to read.
Return Value:
The DWORD read from display memory.
void seWriteDisplayBytes(DWORD Offset, unsigned Value, DWORD Count)
Description:
This routine writes one or more bytes to the display buffer at the offset specified by Offset.
Parameters:
Offset
Offset, in bytes, from start of display memory to the first byte to be
written.
Value
An unsigned integer containing the byte to be written in the least
significant byte.
Count
Number of bytes to write. All bytes will have the same value.
Return Value: None.