Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A way to unmount SD Cards and handle failed initialization #52

Open
feldim2425 opened this issue Aug 22, 2019 · 0 comments
Open

A way to unmount SD Cards and handle failed initialization #52

feldim2425 opened this issue Aug 22, 2019 · 0 comments

Comments

@feldim2425
Copy link

feldim2425 commented Aug 22, 2019

  • [ ] BUG REPORT
  • [ X ] FEATURE REQUEST

FEATURE REQUEST

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant