esp_video
esp_video copied to clipboard
sdcard.c does not compile in esp-idf v4
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
);