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: mbed SDFileSystem
sdCard.cpp
- Committer:
- fenix2519
- Date:
- 2019-04-26
- Revision:
- 5:e297f321fa20
File content as of revision 5:e297f321fa20:
//// Block devices
////#include "SPIFBlockDevice.h"
////#include "DataFlashBlockDevice.h"
//#include "SDBlockDevice.h"
//#include "HeapBlockDevice.h"
//
//// File systems
//#include "LittleFileSystem.h"
//#include "FATFileSystem.h"
//
//
//// Physical block device, can be any device that supports the BlockDevice API
//SDBlockDevice bd( p5, p6, p7, p8); // mosi, miso, sck, cs
//
//// File system declaration
//FATFileSystem fs("fs");
//
//
//// Set up the button to trigger an erase
//InterruptIn irq(p9);
//void erase() {
// printf("Initializing the block device... ");
// fflush(stdout);
// int err = bd.init();
// printf("%s\n", (err ? "Fail :(" : "OK"));
// if (err) {
// error("error: %s (%d)\n", strerror(-err), err);
// }
//
// printf("Erasing the block device... ");
// fflush(stdout);
// err = bd.erase(0, bd.size());
// printf("%s\n", (err ? "Fail :(" : "OK"));
// if (err) {
// error("error: %s (%d)\n", strerror(-err), err);
// }
//
// printf("Deinitializing the block device... ");
// fflush(stdout);
// err = bd.deinit();
// printf("%s\n", (err ? "Fail :(" : "OK"));
// if (err) {
// error("error: %s (%d)\n", strerror(-err), err);
// }
//}
