esp-idf/components/fatfs
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
..
diskio fatfs: Implementation of disk_status nad disk_initialize for SD/MMC card 2021-11-09 20:17:03 +08:00
port Whitespace: Automated whitespace fixes (large commit) 2020-11-11 07:36:35 +00:00
src fatfs: Fix some memory leak issues by coverity static analyzer. 2021-01-25 03:37:47 +00:00
test vfs/fatfs: fix failed tests by increasing timeout 2021-08-25 19:04:34 +08:00
test_fatfs_host host tests: add missing header files for compiling host tests 2021-07-20 17:44:20 +08:00
vfs fatfs: Fix some memory leak issues by coverity static analyzer. 2021-01-25 03:37:47 +00:00
CMakeLists.txt sdspi: support crc16_be for esp32s2 2020-02-12 15:15:46 +08:00
component.mk fatfs: create separate ffsystem.c for host side testing 2019-06-25 23:07:07 +08:00
Kconfig docs: added some fast-seek documentation to the fatfs.rst 2020-11-06 13:18:16 -03:00