esp-idf/components/fatfs/diskio
Jan Procházka fb22c1f182 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-01 15:11:40 +08:00
..
diskio_impl.h Whitespace: Automated whitespace fixes (large commit) 2020-11-11 07:36:35 +00:00
diskio_rawflash.c freertos: removed likely macros from non-port specifics parts of freertos 2020-01-03 14:42:57 -03:00
diskio_rawflash.h freertos: removed likely macros from non-port specifics parts of freertos 2020-01-03 14:42:57 -03:00
diskio_sdmmc.c fatfs: Implementation of disk_status nad disk_initialize for SD/MMC card 2021-11-01 15:11:40 +08:00
diskio_sdmmc.h Whitespace: Automated whitespace fixes (large commit) 2020-11-11 07:36:35 +00:00
diskio_wl.c FAT: Number of volumes can now be configured through menuconfig 2021-10-19 12:15:31 +08:00
diskio_wl.h Whitespace: Automated whitespace fixes (large commit) 2020-11-11 07:36:35 +00:00
diskio.c fatfs: create separate ffsystem.c for host side testing 2019-06-25 23:07:07 +08:00