U2C_RESULT U2C_SpiSetFreq( HANDLE hDevice, BYTE Frequency );
The U2C_SpiSetFreq() function configures SPI bus frequency.
Handle to the U2C-12 device.
The frequency of SPI bus, where:For convenience following constants were introduced:
- 0 corresponds to SPI bus frequency of 200 kHz.
- 1 corresponds to SPI bus frequency of 100 kHz.
- 1+n corresponds to the SPI bus clock period equal to 10 + 2*n uS.
U2C_SPI_FREQ_200KHZ 200 kHz U2C_SPI_FREQ_100KHZ 100 kHz U2C_SPI_FREQ_83KHZ 83 kHz U2C_SPI_FREQ_71KHZ 71 kHz U2C_SPI_FREQ_62KHZ 62 kHz U2C_SPI_FREQ_50KHZ 50 kHz U2C_SPI_FREQ_25KHZ 25 kHz U2C_SPI_FREQ_10KHZ 10 kHz U2C_SPI_FREQ_5KHZ 5 kHz U2C_SPI_FREQ_2KHZ 2 kHz
The SPI bus frequency value was successfully set.
U2C-12 device referenced by hDevice handle was not found.