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

Suggest reinstating end() method in the SD library #90

Open
per1234 opened this issue Mar 28, 2021 · 0 comments
Open

Suggest reinstating end() method in the SD library #90

per1234 opened this issue Mar 28, 2021 · 0 comments
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement

Comments

@per1234
Copy link
Contributor

per1234 commented Mar 28, 2021

Moved from arduino/Arduino#4559 by @dookaloosy

The old beta library (https://github.com/adafruit/SD) used to have an SDClass::end() method that could be used to close an SDClass session. Without it, removing and reinserting a storage card would trigger an failure upon calling SDClass::begin(), as the previous session hadn't been closed.

Suggest adding to SD.h:

//call this when a card is removed. It will allow you to inster and initialise a new card.
void end();

and to SD.cpp:
//call this when a card is removed. It will allow you to inster and initialise a new card.
void SDClass::end()
{
root.close();
}
@per1234 per1234 added the type: enhancement Proposed improvement label Mar 28, 2021
@per1234 per1234 added the topic: code Related to content of the project itself label Apr 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

No branches or pull requests

1 participant