SDFileSystem
Fork of SDFileSystem by
Revision 4:7b35d1709458, committed 2014-03-17
- Comitter:
- screamer
- Date:
- Mon Mar 17 14:34:01 2014 +0000
- Parent:
- 2:c8f66dc765d4
- Commit message:
- Added library documentation and updated FATFileSystem sub-library to the latest revision
Changed in this revision
diff -r c8f66dc765d4 -r 7b35d1709458 FATFileSystem.lib --- a/FATFileSystem.lib Thu Nov 29 10:56:21 2012 +0000 +++ b/FATFileSystem.lib Mon Mar 17 14:34:01 2014 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/FATFileSystem/#b6669c987c8e +http://mbed.org/users/mbed_official/code/FATFileSystem/#e960e2b81a3c
diff -r c8f66dc765d4 -r 7b35d1709458 SDFileSystem.cpp --- a/SDFileSystem.cpp Thu Nov 29 10:56:21 2012 +0000 +++ b/SDFileSystem.cpp Mon Mar 17 14:34:01 2014 +0000 @@ -19,6 +19,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ + /* Introduction * ------------ * SD and MMC cards support a number of interfaces, but common to them all @@ -133,14 +134,10 @@ #define R1_PARAMETER_ERROR (1 << 6) // Types -// - v1.x Standard Capacity -// - v2.x Standard Capacity -// - v2.x High Capacity -// - Not recognised as an SD Card -#define SDCARD_FAIL 0 -#define SDCARD_V1 1 -#define SDCARD_V2 2 -#define SDCARD_V2HC 3 +#define SDCARD_FAIL 0 //!< v1.x Standard Capacity +#define SDCARD_V1 1 //!< v2.x Standard Capacity +#define SDCARD_V2 2 //!< v2.x High Capacity +#define SDCARD_V2HC 3 //!< Not recognised as an SD Card int SDFileSystem::initialise_card() { // Set to 100kHz for initialisation, and clock card with cs = 1
diff -r c8f66dc765d4 -r 7b35d1709458 SDFileSystem.h --- a/SDFileSystem.h Thu Nov 29 10:56:21 2012 +0000 +++ b/SDFileSystem.h Mon Mar 17 14:34:01 2014 +0000 @@ -32,13 +32,14 @@ * #include "mbed.h" * #include "SDFileSystem.h" * - * SDFileSystem sd(p5, p6, p7, p12, "sd"); // mosi, miso, sclk, cs + * SDFileSystem sd(p5, p6, p7, p12, "sd"); // MOSI, MISO, SCLK, SSEL * * int main() { - * FILE *fp = fopen("/sd/myfile.txt", "w"); + * FILE *fp = fopen("/sd/mbed.txt", "w"); * fprintf(fp, "Hello World!\n"); * fclose(fp); * } + * @endcode */ class SDFileSystem : public FATFileSystem { public: @@ -52,6 +53,7 @@ * @param name The name used to access the virtual filesystem */ SDFileSystem(PinName mosi, PinName miso, PinName sclk, PinName cs, const char* name); + virtual int disk_initialize(); virtual int disk_status(); virtual int disk_read(uint8_t * buffer, uint64_t block_number);