Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sdcard.c does not compile in esp-idf v4 #3

Open
allenck opened this issue Aug 26, 2020 · 0 comments
Open

sdcard.c does not compile in esp-idf v4 #3

allenck opened this issue Aug 26, 2020 · 0 comments

Comments

@allenck
Copy link

allenck commented Aug 26, 2020

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
 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant