Skip to content

Change SD Card #5

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

Closed
agdl opened this issue Jul 12, 2016 · 3 comments
Closed

Change SD Card #5

agdl opened this issue Jul 12, 2016 · 3 comments
Assignees

Comments

@agdl
Copy link
Member

agdl commented Jul 12, 2016

From @nemeier on August 1, 2015 10:26

In some of my Projects I need to change the SD card. There is a simple allow this. I just require a single line in the SD.c library.

boolean SDClass::begin(uint8_t csPin) {
  /*
    Performs the initialisation required by the sdfatlib library.
    Return true if initialization succeeds, false otherwise.
   */
// ----> Line Added
  if (root.isOpen()) root.close();      // allows repeated calls
// <--- Line Added
  return card.init(SPI_HALF_SPEED, csPin) &&
         volume.init(card) &&
         root.openRoot(volume);
}

After changing the SD card all you need is to reinitialize the sd card.

Will properly solve ISSUE #1103

Copied from original issue: arduino/Arduino#3607

@agdl
Copy link
Member Author

agdl commented Jul 12, 2016

From @dzzie on December 27, 2015 20:44

this fixed an issue i was having thanks!

@agdl
Copy link
Member Author

agdl commented Jul 12, 2016

From @bborncr on March 18, 2016 20:15

This fix worked for me also. Is there any possible problem that could result from this patch?

@cmaglie
Copy link
Contributor

cmaglie commented Nov 14, 2017

Fixed by #38

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