esp-idf/components/sdmmc
Jan Procházka 683da6b46d fatfs: Implementation of disk_status nad disk_initialize for SD/MMC card
FATFS provides a disk status and disk initialize callback which were not
implemented. Implementation has very low impact on SD/MMC speed and
fixes issues, when trying to open file when SD card was removed from
slot and not deinited.

If disk_status returns STA_NOINIT, it will always continue with
disk_initialize. If that returns 0, it will continue like everything is
working normally. So there has to be the same check as in disk_status.
Return of disk_initialize is always checked like this for STA_NOINIT or
STA_PROTECT so if command fails, we return the STA_NOINIT.

stat = disk_initialize(pdrv);
if (stat & STA_NOINIT) return FR_NOT_READY;
if (stat & STA_PROTECT) return FR_WRITE_PROTECTED;

Closes IDF-4125
2021-11-09 20:17:03 +08:00
..
include fatfs: Implementation of disk_status nad disk_initialize for SD/MMC card 2021-11-09 20:17:03 +08:00
test sdspi: enable UT & ExampleTest for C3/S2 2021-09-24 15:17:18 +08:00
CMakeLists.txt Whitespace: Automated whitespace fixes (large commit) 2020-11-11 07:36:35 +00:00
component.mk remove executable permission from source files 2018-05-29 20:07:45 +08:00
sdmmc_cmd.c fatfs: Implementation of disk_status nad disk_initialize for SD/MMC card 2021-11-09 20:17:03 +08:00
sdmmc_common.c sdmmc: support SDIO over SPI 2019-04-12 02:24:28 +08:00
sdmmc_common.h sdmmc: add communication check for eMMC after frequency switch 2019-12-12 08:11:17 +00:00
sdmmc_init.c sdmmc: add communication check for eMMC after frequency switch 2019-12-12 08:11:17 +00:00
sdmmc_io.c sdmmc: fix possible null dereference in output parameter assignement, whilst it was null checked as an input parameter 2020-03-27 18:46:39 +01:00
sdmmc_mmc.c sdmmc: add communication check for eMMC after frequency switch 2019-12-12 08:11:17 +00:00
sdmmc_sd.c Whitespace: Automated whitespace fixes (large commit) 2020-11-11 07:36:35 +00:00