We're thinking of adding a SecretLabs.NETMF.IO assembly.
In it, we'd have the following two commands (static functions):
StorageDevice.MountSD("SD1", SPI1, Pins.GPIO_PIN_D10);
StorageDevice.Unmount("SD1");
The first would mount an SD card via SPI. The second would unmount it.
We'd also provide an overload for MountSD which would let the user specify a "card detect" pin:
StorageDevice.MountSD("SD1", SPI1, Pins.GPIO_PIN_D10, Pins.GPIO_PIN_D9);
With this overload, the SD card would automatically be mounted when inserted.
All file access would be via the standard System.IO classes (Directory, File, etc.) The SD card in the above example would be mounted at "\SD1\".
Thoughts?
Chris
Feedback on proposed SD card mounting functions...
Started by Chris Walker, Aug 31 2010 06:45 AM
5 replies to this topic
#1
Posted 31 August 2010 - 06:45 AM
#2
Posted 31 August 2010 - 08:23 AM
That would be amazing.
would it be FAT only, or NTFS?
#3
Posted 31 August 2010 - 11:44 AM
Would we get any notification (event) when card is inserted or removed?
#4
Posted 31 August 2010 - 12:21 PM
This would be very useful.
I assume that I would attach an interrupt to the card detect pin to determine when the card is inserted/removed.
Stacy
#5
Posted 31 August 2010 - 02:52 PM
Would we get any notification (event) when card is inserted or removed?
Good point/question, Szymon...
There are two methods built into .NET MF that we could probably wire up:
RemovableMedia.Insert
RemovableMedia.Eject
Chris
#6
Posted 02 September 2010 - 06:18 PM
We have published the first alpha release of the new v4.1.1 firmware, with SD card support. Enjoy!
And please let us know how it works for you...
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users