Teensy 4.1 - no SD.end()

tjaekel

Well-known member
I want to make it possible to unplug and SD card in a "safe way".
So, I want to de-initialize SD card, so that I can remove SD card (when system is running).

But there is nothing !!!! to disable SD card, after I have done SD.begin().
Why not?
The LIB code seems to be incomplete for me: any device initialized and used should be also support to "unplug"
(to "un-initialize" or do "deinit"). But it is not there on LIB code. Why not?

"rrrrr" this Arduino stuff drives me crazy...
 
But there is nothing !!!! to disable SD card, after I have done SD.begin(). Why not?

Perhaps there should be. Searching on google and this forum seems to indicate the best practice is to flush and close all files, and then it is okay to remove the card. When you remove/insert a card, it will be reset.

For some time now, the SD library has been a wrapper for SdFat, so I tend to use SdFat directly rather than SD. There are quite a few good SdFat examples in the library, but nothing specifically for removing a card. I recommend you use TeensyDuino 1.58, which has SdFat 1.2.1.
 
Back
Top