pub unsafe extern "C" fn spi_device_transmit(
    handle: spi_device_handle_t,
    trans_desc: *mut spi_transaction_t
) -> esp_err_t
Expand description

@brief Send a SPI transaction, wait for it to complete, and return the result

This function is the equivalent of calling spi_device_queue_trans() followed by spi_device_get_trans_result(). Do not use this when there is still a transaction separately queued (started) from spi_device_queue_trans() or polling_start/transmit that hasn’t been finalized.

@note This function is not thread safe when multiple tasks access the same SPI device. Normally a device cannot start (queue) polling and interrupt transactions simutanuously.

@param handle Device handle obtained using spi_host_add_dev @param trans_desc Description of transaction to execute @return - ESP_ERR_INVALID_ARG if parameter is invalid - ESP_OK on success