SpiSetSpeed()

Set the clock speed of the specified SPI master channel. The device will uses the fastest achievable clock speed that is less than or equal to the specified speed.

Syntax


SpiSetSpeed(unsigned char channel, unsigned long speed, unsigned long* actualSpeed);

channel
The SPI master channel to configure.

speed
The desired clock speed in Hz.

actualSpeed
A pointer to an unsigned long which will be populated with the actual clock speed used.

Returns


int status