A way to handle failed SD Card initialization and unmount the SD Card when using sdcard.h.
If for example I try to initialize the SD card without the SD Card plugged in, if will fail and halt the program instead of giving me a null handle for the SD Card driver. There is also no way to unmount a SD Card and remove the driver.
Justification
The current way makes (in my opinion) sdcard.h not suitable for applications where the SD Card is not strictly needed and might even be removed after unmounting it.
Workarounds
Pretty much nothing. Other than not using the builtin sd driver and filesystem there isn't much.
The on_first_open method in sdcard.cpp uses a FreeRTOS assert with locks up as soon as the initialization fails. And unmount is currently only supported in the third party fat library.
Missing feature
A way to handle failed SD Card initialization and unmount the SD Card when using sdcard.h. If for example I try to initialize the SD card without the SD Card plugged in, if will fail and halt the program instead of giving me a null handle for the SD Card driver. There is also no way to unmount a SD Card and remove the driver.
Justification
The current way makes (in my opinion) sdcard.h not suitable for applications where the SD Card is not strictly needed and might even be removed after unmounting it.
Workarounds
Pretty much nothing. Other than not using the builtin sd driver and filesystem there isn't much. The on_first_open method in sdcard.cpp uses a FreeRTOS assert with locks up as soon as the initialization fails. And unmount is currently only supported in the third party fat library.