Function esp_idf_sys::sdmmc_host_do_transaction

source ยท
pub unsafe extern "C" fn sdmmc_host_do_transaction(
    slot: c_int,
    cmdinfo: *mut sdmmc_command_t,
) -> esp_err_t
Expand description

@brief Send command to the card and get response

This function returns when command is sent and response is received, or data is transferred, or timeout occurs.

@note This function is not thread safe w.r.t. init/deinit functions, and bus width/clock speed configuration functions. Multiple tasks can call sdmmc_host_do_transaction as long as other sdmmc_host_* functions are not called.

@attention Data buffer passed in cmdinfo->data must be in DMA capable memory

@param slot slot number (SDMMC_HOST_SLOT_0 or SDMMC_HOST_SLOT_1) @param cmdinfo pointer to structure describing command and data to transfer @return - ESP_OK on success - ESP_ERR_TIMEOUT if response or data transfer has timed out - ESP_ERR_INVALID_CRC if response or data transfer CRC check has failed - ESP_ERR_INVALID_RESPONSE if the card has sent an invalid response - ESP_ERR_INVALID_SIZE if the size of data transfer is not valid in SD protocol - ESP_ERR_INVALID_ARG if the data buffer is not in DMA capable memory