USBMSD SD card Hello World for Mbed platforms
Dependencies: mbed USBMSD_SD USBDevice
Diff: ChaNFSSD/SDFileSystem.cpp
- Revision:
- 9:9c343b9ee6d8
- Parent:
- 8:534fd41d8cc7
- Child:
- 12:a12eb1fc05f3
--- a/ChaNFSSD/SDFileSystem.cpp Mon Nov 14 17:50:02 2011 +0000 +++ b/ChaNFSSD/SDFileSystem.cpp Tue Nov 15 09:16:25 2011 +0000 @@ -118,10 +118,10 @@ #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; + USBMSD::connect(); } #define R1_IDLE_STATE (1 << 0) @@ -195,7 +195,6 @@ return SDCARD_FAIL; } - int SDFileSystem::disk_initialize() { int i = initialise_card(); @@ -236,10 +235,7 @@ return 0; } -int SDFileSystem::disk_status() { return status; } -void SDFileSystem::set_status(int st) { status = st; } - - +int SDFileSystem::disk_status() { return 0; } int SDFileSystem::disk_sync() { return 0; } int SDFileSystem::disk_sectors() { return _sectors; }