]> granicus.if.org Git - esp-idf/commitdiff
Merge branch 'feature/fatfs_dynamic_pdrv' into 'master'
authorIvan Grokhotkov <ivan@espressif.com>
Fri, 3 Mar 2017 03:40:37 +0000 (11:40 +0800)
committerIvan Grokhotkov <ivan@espressif.com>
Fri, 3 Mar 2017 03:40:37 +0000 (11:40 +0800)
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

1  2 
components/fatfs/src/vfs_fat.c
components/fatfs/src/vfs_fat_sdmmc.c

Simple merge
index 77620f5d879f2d9b9e92f0728b864af281fa238e,ea6093633d3829456b9ed9c50dfefaa754b335bc..a9e5362dc5f3d5905bd35553569fd8654d5f3188
@@@ -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;