Function esp_idf_hal::sys::spi_slave_transmit
source · pub unsafe extern "C" fn spi_slave_transmit(
host: u32,
trans_desc: *mut spi_slave_transaction_t,
ticks_to_wait: u32,
) -> i32
Expand description
@brief Do a SPI transaction
Essentially does the same as spi_slave_queue_trans followed by spi_slave_get_trans_result. Do not use this when there is still a transaction queued that hasn’t been finalized using spi_slave_get_trans_result.
@param host SPI peripheral to that is acting as a slave @param trans_desc Pointer to variable able to contain a pointer to the description of the transaction that is executed. Not const because we may want to write status back into the transaction description. @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_OK on success