Skip to content

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

Closed
@dookaloosy

Description

@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();
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Library: SDThe SD Arduino libraryfeature requestA request to make an enhancement (not a bug fix)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions