...
void FSDev_BSP_SPI_Lock (FS_QTY unit_nbr);
...
void FSDev_BSP_SPI_Unlock (FS_QTY unit_nbr);
...
...
File |
---|
...
Called from |
---|
...
...
Code enabled by |
---|
...
...
|
...
Device driver |
...
N/A |
...
Acquire/release SPI bus lock. Anchor
Arguments
...
unit_nbr
anchor
Unit number of device.
...
...
Returned Value
...
Notes/Warnings
...
Lock()
will be called before the driver begins to access the SPI. The application should not use the same bus to access another device until the matching call toUnlock()
has been made.
...
- The clock frequency set by the
SetClkFreq()
function is a parameter of the device, not the bus. If multiple devices are located on the same bus, those parameters must be saved (in memory) when set and restored byLock()
. The same should be done for initialization parameters such as transfer unit size and shift direction that vary from device to device.