-
Notifications
You must be signed in to change notification settings - Fork 164
Add SDClass::end function #37
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
Conversation
src/SD.cpp
Outdated
//call this when a card is removed. It will allow you to inster and initialise a new card. | ||
void SDClass::end() | ||
{ | ||
root.close(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since SD.begin()
calls SDCARD_SPI.begin();
.
I'm wondering if a call to SDCARD_SPI.end();
should be added as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure. I'll let others decide.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nobody bothered. Can we just keep it like this?
src/SD.h
Outdated
@@ -70,6 +70,9 @@ class SDClass { | |||
boolean begin(uint8_t csPin = SD_CHIP_SELECT_PIN); | |||
boolean begin(uint32_t clock, uint8_t csPin); | |||
|
|||
//call this when a card is removed. It will allow you to inster and initialise a new card. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be insert and not inster
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. But this is the text from the original patch. The typo is like a fingerprint, so you know where it came from.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I disagree. If it's desirable to document the source of the code then just add a comment instead of relying on a minor typo that may get fixed in the Adafruit library.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whatever. I've fixed the typo
ea5a27f
to
56b466f
Compare
Call end function to fully de-initialize SD object. Allows you to call SD.begin again to init a new card. This change was taken from Adafruit's SD library. Author: driverblock <rick@embedded-designs.com>
56b466f
to
3b2b7c8
Compare
Ping |
thanks! |
Call end function to fully de-initialize SD object. Allows you to call
SD.begin again to init a new card.
This change was taken from Adafruit's SD library.
Author: driverblock rick@embedded-designs.com