DlnSpiSlaveGetMode() Function
DLN_RESULT DlnSpiSlaveGetMode(
HDLN handle,
uint8_t port,
uint8_t* mode
);
The DlnSpiSlaveGetMode() function retrieves SPI Transmission Mode settings for the specified SPI slave port.
Parameters:
- handle
- A handle to the DLN-series adapter.
- port
- A number of the SPI slave port to retrieve the information from.
- mode
-
A pointer to an unsigned 8 bit integer. This integer will be filled with the
SPI mode value after the function
execution. The bits 0 and 1 of this value correspond to CPOL and CPHA parameters respectively. The rest of the bits are not used.
Bit Value Description Constant 0 0 CPOL=0 DLN_SPI_SLAVE_CPOL_0 0 1 CPOL=1 DLN_SPI_SLAVE_CPOL_1 1 0 CPHA=0 DLN_SPI_SLAVE_CPHA_0 1 1 CPHA=1 DLN_SPI_SLAVE_CPHA_1
This function is defined in the dln_spi_slave.h file.
2006-2012