Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: USBDevice USBMSD_SD mbed
Fork of USBMSD_SD_HelloWorld_Mbed by
Diff: ChaNFSSD/SDFileSystem.h
- Revision:
- 8:534fd41d8cc7
- Parent:
- 7:6494da2a5c60
- Child:
- 9:9c343b9ee6d8
--- a/ChaNFSSD/SDFileSystem.h Mon Nov 14 12:08:32 2011 +0000
+++ b/ChaNFSSD/SDFileSystem.h Mon Nov 14 17:50:02 2011 +0000
@@ -25,6 +25,14 @@
#include "mbed.h"
#include "FATFileSystem.h"
+#include "USBMSD.h"
+
+// MSC Bulk-only Stage
+enum STATUS {
+ NOINIT = (1 << 0),
+ NODISK = (1 << 1),
+ PROTECT = (1 << 2),
+};
/** Access the filesystem on an SD Card using SPI
*
@@ -40,7 +48,7 @@
* fclose(fp);
* }
*/
-class SDFileSystem : public FATFileSystem {
+class SDFileSystem : public USBMSD, FATFileSystem {
public:
/** Create the File System for accessing an SD Card using SPI
@@ -58,6 +66,7 @@
virtual int disk_status();
virtual int disk_sync();
virtual int disk_sectors();
+ virtual void set_status(int st);
protected:
@@ -74,6 +83,8 @@
int _sd_sectors();
int _sectors;
+ int status;
+
SPI _spi;
DigitalOut _cs;
};
