Dependencies:   SDFileSystem mbed

Files at this revision

API Documentation at this revision

Comitter:
xxwiz
Date:
Mon Mar 10 03:43:38 2014 +0000
Commit message:
Nucleo SD

Changed in this revision

SDFileSystem.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.lib Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r a76f1c9096cb SDFileSystem.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SDFileSystem.lib	Mon Mar 10 03:43:38 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/SDFileSystem/#c8f66dc765d4
diff -r 000000000000 -r a76f1c9096cb main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Mar 10 03:43:38 2014 +0000
@@ -0,0 +1,27 @@
+#include "mbed.h"
+#include "SDFileSystem.h"
+//Nucleo F030R8 test
+//DigitalOut myled(LED1);
+//              MOSI, MISO, SCLK, CS, name
+SDFileSystem sd(PA_7, PA_6, PA_5, PB_6, "sd");
+
+int main() {
+    printf("\nWait for new connection...\n");
+    
+    mkdir("/sd/mydir", 0777);
+    
+    FILE *fp = fopen("/sd/mydir/sdtest.txt", "w");
+    if(fp == NULL) {
+        printf("Could not open file for write\n");
+    }
+    fprintf(fp, "Hello fun SD Card World!");
+    fclose(fp); 
+    
+    while(1) {
+        /*
+        myled = 1;
+        wait(1.2);
+        myled = 0;
+        wait(1.2);*/
+    }
+}
diff -r 000000000000 -r a76f1c9096cb mbed.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.lib	Mon Mar 10 03:43:38 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/#ed8466a608b4