udenokai sample

Dependencies:   TextLCD mbed

Revision:
0:8cee9e4016c6
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Jun 10 17:55:54 2011 +0000
@@ -0,0 +1,18 @@
+#include "mbed.h"
+#include "SDFileSystem.h"
+
+SDFileSystem sd(p5, p6, p7, p8, "sd");
+const unsigned int MAX_LEN = 256;
+
+int main() { 
+    FILE* fp = fopen("/sd/mydir/sdtest.txt", "r");
+    if(fp == NULL) {
+        error("Could not open file for write\n");
+    }
+    
+    char str[MAX_LEN];
+    fgets(str,MAX_LEN-1,fp);
+    
+    printf(str);
+    fclose(fp); 
+}
\ No newline at end of file