Fix SD issue on failed mount
fixes: https://github.com/espressif/arduino-esp32/issues/613
This commit is contained in:
parent
14dd44ad06
commit
45d5d9b360
@ -36,6 +36,7 @@ bool SDFS::begin(uint8_t ssPin, SPIClass &spi, uint32_t frequency, const char *
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!sdcard_mount(_pdrv, mountpoint)){
|
if(!sdcard_mount(_pdrv, mountpoint)){
|
||||||
|
sdcard_unmount(_pdrv);
|
||||||
sdcard_uninit(_pdrv);
|
sdcard_uninit(_pdrv);
|
||||||
_pdrv = 0xFF;
|
_pdrv = 0xFF;
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user