User`s manual

128 Reference Manual
Table 6-10: SPI Control Register Definition
Return Value
HRESULT
6. IAccessFunc::SPI_ReadRegister
The SPI_ReadRegister method reads a single SPI register.
Syntax
HRESULT SPI_ReadRegister(
int OpLen,
unsigned char OpCode,
int AddrLen,
unsigned short RegAddr,
int DataLen,
unsigned short *pRegData,
int SPIMode
);
2 bst_rw RW 1’b0
1 = burst R/W mode (burst R for 3-wire
device is not supported, the read data
of 3-wire device is half spi clock cycle
later than that of spi device);
0 = single R/W mode;
1:0 spi_mode RW 2’h0
2’h0 = spi mode 0;
2’h1 = spi mode 1;
2’h2 = spi mode 2;
2’h3 = spi mode 3;
Note: for 3-wire, mode 0 should be
used.
Bit Name Type
Default
Value
Description