Function esp_idf_svc::hal::sys::spi_device_acquire_bus

source ยท
pub unsafe extern "C" fn spi_device_acquire_bus(
    device: *mut spi_device_t,
    wait: u32,
) -> i32
Expand description

@brief Occupy the SPI bus for a device to do continuous transactions.

Transactions to all other devices will be put off until spi_device_release_bus is called.

@note The function will wait until all the existing transactions have been sent.

@param device The device to occupy the bus. @param wait Time to wait before the the bus is occupied by the device. Currently MUST set to portMAX_DELAY.

@return - ESP_ERR_INVALID_ARG : wait is not set to portMAX_DELAY. - ESP_OK : Success.