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: SDHCFileSystem mbed FatFileSystem
Diff: main.cpp
- Revision:
- 0:cabd369d74d1
- Child:
- 1:bc533a490622
diff -r 000000000000 -r cabd369d74d1 main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Tue Jul 31 06:29:54 2012 +0000
@@ -0,0 +1,18 @@
+#include "mbed.h"
+#include "SDFileSystem.h"
+
+//SDFileSystem sd(p5, p6, p7, p8, "sd");
+SDFileSystem sd(p5, p6, p7, p13, "sd"); // mosi, miso, sclk, cs, name
+
+int main() {
+ printf("Hello World!\n");
+
+ FILE *fp = fopen("/sd/aaaaaaa.txt", "w");
+ if(fp == NULL) {
+ error("Could not open file for write\n");
+ }
+ fprintf(fp, "Hello fun SD Card World, 20100616!");
+ fclose(fp);
+
+ printf("Goodbye World!\n");
+}