Developers Archive

List Statistics

  • Total Threads: 675
  • Total Posts: 4004
  #1  
22-04-2011 12:28 AM
Developers member admin is online now
User
 

Does SD.end() make sense?

A likely usage would be swapping the SD card, but without a reset or
power cycle, in applications where the board is permanently installed
(eg, art installations, long term data logging, etc). SD.end() would
close any open files, flush the cache and whatever else should be done
to completely finish all usage of the SD card.

Or is it enough for people to swap the card any time, the user to just
call SD.begin() again to try recognizing whatever new card may have been
inserted?

_______________________________________________
Developers mailing list

http://arduino.cc/mailman/listinfo/developers_arduino.cc
)

  #2  
22-04-2011 03:51 AM
Developers member admin is online now
User
 

I've been doing a lot of the SD card work lately, and my usual method is to hold down reset while removing the card. But yeah, I could see a use for end(). In code now, I just make sure to flush() regularly. In life, too.


On Apr 21, 2011, at 7:28 PM, Paul Stoffregen wrote:

> Does SD.end() make sense?
>
> A likely usage would be swapping the SD card, but without a reset or power cycle, in applications where the board is permanently installed (eg, art installations, long term data logging, etc). SD.end() would close any open files, flush the cache and whatever else should be done to completely finish all usage of the SD card.
>
> Or is it enough for people to swap the card any time, the user to just call SD.begin() again to try recognizing whatever new card may have been inserted?
>
> _______________________________________________
> Developers mailing list
>
> http://arduino.cc/mailman/listinfo/developers_arduino.cc


_______________________________________________
Developers mailing list

http://arduino.cc/mailman/listinfo/developers_arduino.cc
)

  #3  
25-05-2011 09:05 PM
Developers member admin is online now
User
 

Is this something people want? Unfortunately its not simple to have
SD.end auto-close files because the file objects are no longer under the
SD object's control but i could try to keep an array of them.

Essentially, if users close() all files, they can remove the card
whenever they wish and re-init() later.

On 4/21/2011 7:28 PM, Paul Stoffregen wrote:
> Does SD.end() make sense?
>
> A likely usage would be swapping the SD card, but without a reset or
> power cycle, in applications where the board is permanently installed
> (eg, art installations, long term data logging, etc). SD.end() would
> close any open files, flush the cache and whatever else should be done
> to completely finish all usage of the SD card.
>
> Or is it enough for people to swap the card any time, the user to just
> call SD.begin() again to try recognizing whatever new card may have been
> inserted?
>
> _______________________________________________
> Developers mailing list
>
> http://arduino.cc/mailman/listinfo/developers_arduino.cc

_______________________________________________
Developers mailing list

http://arduino.cc/mailman/listinfo/developers_arduino.cc
)





NewsArc Lists  |  Culture Pages   |  Computing Archive  |  Media-Pages
Link to this page on your blog or website by copying the HTML code below and pasting it into your site: