Page 120
Epson Research and Development
Vancouver Design Center
14.2.4 Register Access
The Register Access functions provide convenient method of accessing the control
registers of the S1D13506 controller using byte, word or dword widths.
To reduce the overhead of the function call 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.
• Index 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 index
offset is correctly aligned for the target platform.
unsigned seReadRegByte(DWORD Index)
Description:
Parameters:
Return Value:
This routine reads the register specified by Index and returns the value.
Index Offset, in bytes, to the register to read.
The return value is the byte read from the register.
unsigned seReadRegWord(DWORD Index)
Description:
Parameters:
Return Value:
This routine read two consecutive registers as a word and returns the value.
Index Offset to the first register to read.
The return value is the word read from the S1D13506 registers.
DWORD seReadRegDword(DWORD Index)
Description:
Parameters:
Return Value:
This routine reads four consecutive registers as a dword and returns the value.
Index Offset to the first of the four registers to read.
The return value is the dword read from the S1D13506 registers.
int seWriteRegByte(DWORD Index, unsigned Value)
Description:
Parameters:
This routine writes Value to the register specified by Index.
Index
Value
None
Offset to the register to be written
The value, in the least significant byte, to write to the register
Return Value:
S1D13506
X25B-G-003-03
Programming Notes and Examples
Issue Date: 01/02/06