USBMSD SD card Hello World for Mbed platforms
Dependencies: mbed USBMSD_SD USBDevice
Diff: ChaNFSSD/SDFileSystem.cpp
- Revision:
- 8:534fd41d8cc7
- Parent:
- 7:6494da2a5c60
- Child:
- 9:9c343b9ee6d8
--- a/ChaNFSSD/SDFileSystem.cpp Mon Nov 14 12:08:32 2011 +0000 +++ b/ChaNFSSD/SDFileSystem.cpp Mon Nov 14 17:50:02 2011 +0000 @@ -118,6 +118,7 @@ #define SD_COMMAND_TIMEOUT 5000 + SDFileSystem::SDFileSystem(PinName mosi, PinName miso, PinName sclk, PinName cs, const char* name) : FATFileSystem(name), _spi(mosi, miso, sclk), _cs(cs) { _cs = 1; @@ -194,6 +195,7 @@ return SDCARD_FAIL; } + int SDFileSystem::disk_initialize() { int i = initialise_card(); @@ -234,7 +236,10 @@ return 0; } -int SDFileSystem::disk_status() { return 0; } +int SDFileSystem::disk_status() { return status; } +void SDFileSystem::set_status(int st) { status = st; } + + int SDFileSystem::disk_sync() { return 0; } int SDFileSystem::disk_sectors() { return _sectors; }