Function esp_idf_sys::spi_device_queue_trans
source · pub unsafe extern "C" fn spi_device_queue_trans(
handle: spi_device_handle_t,
trans_desc: *mut spi_transaction_t,
ticks_to_wait: TickType_t,
) -> esp_err_t
Expand description
@brief Queue a SPI transaction for interrupt transaction execution. Get the result by spi_device_get_trans_result
.
@note Normally a device cannot start (queue) polling and interrupt transactions simultaneously.
@param handle Device handle obtained using spi_host_add_dev
@param trans_desc Description of transaction to execute
@param ticks_to_wait Ticks to wait until there’s room in the queue; use portMAX_DELAY to
never time out.
@return
- ESP_ERR_INVALID_ARG if parameter is invalid. This can happen if SPI_TRANS_CS_KEEP_ACTIVE flag is specified while
the bus was not acquired (spi_device_acquire_bus()
should be called first)
- ESP_ERR_TIMEOUT if there was no room in the queue before ticks_to_wait expired
- ESP_ERR_NO_MEM if allocating DMA-capable temporary buffer failed
- ESP_ERR_INVALID_STATE if previous transactions are not finished
- ESP_OK on success