esp_video icon indicating copy to clipboard operation
esp_video copied to clipboard

sdcard.c does not compile in esp-idf v4

Open allenck opened this issue 3 years ago • 0 comments

V 4 has refactored sdspi_device_config_t to sdspi_slot_config_t These changes are necessary:

sdspi_slot_config_t slot_config = SDSPI_SLOT_CONFIG_DEFAULT();
 //slot_config.gpio_cs = CONFIG_SDCARD_PIN_CS;
 //slot_config.host_id = VSPI_HOST;
 slot_config.gpio_miso = CONFIG_SDCARD_PIN_MISO;
 slot_config.gpio_mosi = CONFIG_SDCARD_PIN_MOSI;
 slot_config.gpio_sck  = CONFIG_SDCARD_PIN_CLK;
 slot_config.gpio_cs   = CONFIG_SDCARD_PIN_CS;
 slot_config.dma_channel = VSPI_HOST;
 // This initializes the slot without card detect (CD) and write protect (WP) signals.
 // Modify slot_config.gpio_cd and slot_config.gpio_wp if your board has these signals.
 status = esp_vfs_fat_sdmmc_mount(
     "/sdcard", &host, &slot_config, &mount_config, &card
 );

allenck avatar Aug 26 '20 16:08 allenck