Synopsis
void ctl_spi_lock_bus(CTL_SPI_BUS_t *self);
Description

ctl_spi_lock_bus acquires the bus lock mutex of the SPI bus self. If there is no mutex associated with the bus self, ctl_spi_lock_bus returns immediately.

All locks of the SPI bus by ctl_spi_lock_bus must be paired with a call to ctl_spi_unlock_bus to release the lock.

Note

Because mutexes can be locked multiple times, you can use ctl_spi_lock_bus to ensure exclusive use of the bus in order to issue a sequence sequence of SPI transactions without interruption.

See Also

ctl_spi_unlock_bus, ctl_spi_lock_bus_ex