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: main.cpp
- Revision:
- 17:364ef42e502d
- Parent:
- 16:c753717bfd4d
- Child:
- 18:08b207d10056
--- a/main.cpp Sun Dec 11 13:35:44 2011 +0000
+++ b/main.cpp Sun Dec 11 15:07:59 2011 +0000
@@ -1,23 +1,9 @@
#include "mbed.h"
#include "SDFileSystem.h"
-SDFileSystem sd(p5, p6, p7, p8, "sd");
-
-DigitalIn button(p16);
+SDFileSystem sd(p5, p6, p7, p8);
int main() {
- if (button) {
- sd.connect();
- } else {
- mkdir("/sd/mydir", 0777);
-
- FILE *fp = fopen("/sd/mydir/sdtest.txt", "w");
- if (fp == NULL) {
- error("Could not open file for write\n");
- }
- fprintf(fp, "Hello fun SD Card World!");
- fclose(fp);
-
- }
- while (1);
+ sd.connect();
+ while(1);
}
\ No newline at end of file
