pub unsafe extern "C" fn spi_acquire(
bus: spi_t,
cs: spi_cs_t,
mode: spi_mode_t,
clk: spi_clk_t,
)
Expand description
@brief Start a new SPI transaction
Starting a new SPI transaction will get exclusive access to the SPI bus and configure it according to the given values. If another SPI transaction is active when this function is called, this function will block until the other transaction is complete (spi_relase was called).
@param[in] bus SPI device to access @param[in] cs chip select pin/line to use, set to SPI_CS_UNDEF if chip select should not be handled by the SPI driver @param[in] mode mode to use for the new transaction @param[in] clk bus clock speed to use for the transaction
@pre All parameters are valid and supported, otherwise an assertion blows up (if assertions are enabled).