1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-22 23:48:12 +00:00

core/sdcard: return proper disk status flags to fatfs

This commit is contained in:
matejcik 2020-02-14 15:25:02 +01:00
parent ff1bb67abc
commit 06b89c57c5

View File

@ -28,11 +28,11 @@
// clang-format on
DSTATUS disk_initialize(BYTE pdrv) {
return (sectrue == sdcard_is_present()) ? 0 : STA_NODISK;
return disk_status(pdrv);
}
DSTATUS disk_status(BYTE pdrv) {
return (sectrue == sdcard_is_present()) ? 0 : STA_NODISK;
return (sectrue == sdcard_is_present()) ? 0 : (STA_NOINIT | STA_NODISK);
}
DRESULT disk_read(BYTE pdrv, BYTE *buff, LBA_t sector, UINT count) {