User`s manual

126 Reference Manual
I2CMode: [In] I
2
C mode. The value can be set at:
X 0x0000:Use I
2
C protocol via on chip I
2
C controller.
X 0x0001:Use SCCB protocol via on chip I
2
C controller.
X 0x8000:Use I
2
C protocol via Cypress I
2
C controller.
Return Value
HRESULT
5. IAccessFunc::SPI_WriteRegister
The SPI_WriteRegister method writes a single SPI register.
Syntax
HRESULT SPI_WriteRegister(
int OpLen,
unsigned char OpCode,
int AddrLen,
unsigned short RegAddr,
int DataLen,
unsigned short RegData,
int SPIMode
);
Parameters
OpLen: [In] Operation code length, in bits. The typical range is
1 - 8.
OpCode: [In] Operation code.
AddrLen: [In] Length of register address, in bits. The typical
range is 1 - 16.
RegAddr: [In] Register address.