From: Ivan Grokhotkov Date: Fri, 3 Mar 2017 03:40:37 +0000 (+0800) Subject: Merge branch 'feature/fatfs_dynamic_pdrv' into 'master' X-Git-Tag: v2.1-rc1~288 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4ecd26ce77df64f44432177b519e989bac7a3a3d;p=esp-idf Merge branch 'feature/fatfs_dynamic_pdrv' into 'master' FATFS enable support for multiple drives Current implementation has drive numbers and paths hardcoded to support only one FATFS drive. Arduino has it's own SPI driver to allow compatibility and flexibility. With the MR it is possible to have up to ```_VOLUMES``` drives connected (SPI, SDMMC and others) at the same time and accessed through VFS See merge request !478 --- 4ecd26ce77df64f44432177b519e989bac7a3a3d diff --cc components/fatfs/src/vfs_fat_sdmmc.c index 77620f5d87,ea6093633d..a9e5362dc5 --- a/components/fatfs/src/vfs_fat_sdmmc.c +++ b/components/fatfs/src/vfs_fat_sdmmc.c @@@ -109,9 -122,9 +127,10 @@@ esp_err_t esp_vfs_fat_sdmmc_mount(cons return ESP_OK; fail: + sdmmc_host_deinit(); free(workbuf); - esp_vfs_unregister(base_path); + esp_vfs_fat_unregister_path(base_path); + ff_diskio_unregister(pdrv); free(s_card); s_card = NULL; return err;