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

SD wrapper: SD.exists() buggy and SD.stop() missing [imported] #19

Closed
agdl opened this issue Jul 12, 2016 · 1 comment
Closed

SD wrapper: SD.exists() buggy and SD.stop() missing [imported] #19

agdl opened this issue Jul 12, 2016 · 1 comment
Assignees

Comments

@agdl
Copy link
Member

agdl commented Jul 12, 2016

From @cmaglie on November 15, 2012 18:34

This is Issue 465 moved from a Google Code project.
Added by 2011-01-21T14:26:04.000Z by linux-...@o2online.de.
Please review that bug for more context and additional comments, but update this bug.

Original labels: Type-Defect, Priority-Medium

Original description

I am using the new SD wrapper library and find it very simple and useful.
But the following issues make it unusable in some case:

Let's assume someone needs to remove the SD card from the socket (or disables the power to it when system can go idle) and put the same or another card back to the socket while the system is running, the following problems occur:

  1. it seems that the SD object holds a copy of the FAT because
    SD.exists(someFile) returns true even if there is no SDCard in the socket or
    another one (where this file does NOT exist) is put in. I guess this copy of the FAT won't be refreshed again after SD.begin().

  2. you can not re-initialize the SD-object again. This would be
    necessary (for some SPI magic I guess) if you remove the SDCard from the socket and put it back later. There is no SD.close() or something and calling SD.begin() a second time will always return FALSE and not initialize the SD again.

Issue 1 and 2 could be solved by adding a destructor or a function to
re-initialize the SD object.

Copied from original issue: arduino/Arduino#465

@cmaglie
Copy link
Contributor

cmaglie commented Nov 14, 2017

should be fixed by #37 and #38

@cmaglie cmaglie closed this as completed Nov 14, 2017
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

2 participants