U2C_RESULT U2C_SpiConfigSS( HANDLE hDevice, ULONG IoNumber, BOOL ActiveHigh );
The U2C_SpiConfigSS() function configures GPIO pin specified by IoNumber as SPI Bus Slave Select (Master Select) signal.
To benefit from Slave Select signal during SPI communication you should use Slave Select aware functions set:
Slave Select pin remains unchanged if you call U2C_SpiReadWrite(), U2C_SpiWrite() or U2C_SpiRead() function. This can be useful if you want to send or receive several buffers through SPI Bus changing Slave Select pin only once. You can use GPIO routines to work with Slave Select signal in such a case.
You can configure any number of pins for Slave Select signal and specify different pins for each SPI transaction.
Parameters:
Handle to the U2C-12 device.
GPIO pin to be configured as Slave Select (Master Select) signal.
This parameter determines the active state of the Slave Select signal (state during the SPI transfer). If ActiveHigh is TRUE - Slave Select pin value will be changed from logical "0" to logical "1" before SPI transaction and returned back to logical "0" after the data is transmitted. If ActiveHigh is FALSE - Slave Select pin value will be changed from logical "1" to logical "0" before SPI transaction and returned back to logical "1" after the data is transmitted.
Return values:
U2C_SUCCESS
The Slave Select pin was successfully configured.
U2C_HARDWARE_NOT_FOUND
U2C-12 device referenced by hDevice handle was not found.
U2C_BAD_PARAMETER
IoNumber is out of range.