esp_idf_sys

Function spi_device_get_trans_result

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

@brief Get the result of a SPI transaction queued earlier by spi_device_queue_trans.

This routine will wait until a transaction to the given device successfully completed. It will then return the description of the completed transaction so software can inspect the result and e.g. free the memory or reuse the buffers.

@param handle Device handle obtained using spi_host_add_dev @param trans_desc Pointer to variable able to contain a pointer to the description of the transaction that is executed. The descriptor should not be modified until the descriptor is returned by spi_device_get_trans_result. @param ticks_to_wait Ticks to wait until there’s a returned item; use portMAX_DELAY to never time out. @return - ESP_ERR_INVALID_ARG if parameter is invalid - ESP_ERR_NOT_SUPPORTED if flag SPI_DEVICE_NO_RETURN_RESULT is set - ESP_ERR_TIMEOUT if there was no completed transaction before ticks_to_wait expired - ESP_OK on success