The DlnSpiSlaveSetCpol() function allows to set the clock polarity (CPOL) value.
DlnSpiSlaveSetCpol()
DLN_RESULT DlnSpiSlaveSetCpol( HDLN handle, uint8_t port, uint8_t cpol );
A handle to the DLN-series adapter.
A number of the SPI slave port.
The clock polarity (CPOL) value. Can be 0 or 1.
The function successfully configured the slave port mode.
The port number is not valid. Use the DlnSpiSlaveGetPortCount() function to find the maximum possible port number.
These configuration changes are allowed only when the module is disabled. Use the DlnSpiSlaveDisable() function to disable the SPI module before configuring the slave port.
The provided CPOL value is not valid. Use the DlnSpiSlaveGetSupportedCpolValues() function to check the supported CPOL values for the current SPI slave port.
The DlnSpiSlaveSetCpol() function is defined in the dln_spi_slave.h file.
dln_spi_slave.h