Function esp_idf_svc::sys::sdspi_host_init_device
source ยท pub unsafe extern "C" fn sdspi_host_init_device(
dev_config: *const sdspi_device_config_t,
out_handle: *mut i32,
) -> i32
Expand description
@brief Attach and initialize an SD SPI device on the specific SPI bus
@note This function is not thread safe
@note Initialize the SPI bus by spi_bus_initialize()
before calling this function.
@note The SDIO over sdspi needs an extra interrupt line. Call gpio_install_isr_service()
before this function.
@param dev_config pointer to device configuration structure @param out_handle Output of the handle to the sdspi device.
@return - ESP_OK on success - ESP_ERR_INVALID_ARG if sdspi_host_init_device has invalid arguments - ESP_ERR_NO_MEM if memory can not be allocated - other errors from the underlying spi_master and gpio drivers