Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

void  FSDev_BSP_SPI_Lock   (FS_QTY unit_nbr);

...

void FSDev_BSP_SPI_Unlock (FS_QTY unit_nbr); Anchor11431931143193  

...

File

...

Called from

...

Code enabled by

...

...

fs_dev_<dev_name>_bsp.c

...

Device driver

...

N/A

...

Acquire/release SPI bus lock.anchor11431951143195

Arguments

...

1143196unit_nbr Anchor11431971143197

Unit number of device.

...

Returned Value

...

11431991143199None. Anchor11432001143200

Notes/Warnings

Anchor11432011143201Lock() 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 to Unlock() has been made. Anchor11432021143202

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 by Lock(). The same should be done for initialization parameters such as transfer unit size and shift direction that vary from device to device.