asd

Dependencies:   SDFileSystem mbed

Fork of SDFileSystem_HelloWorld by mbed official

SD card write - fat file system kl46z

Revision:
2:8a7953dfeccd
Parent:
0:bdbd3d6fc5d5
Child:
3:b2658ae9fc38
--- a/main.cpp	Tue May 16 05:18:55 2017 +0000
+++ b/main.cpp	Wed Aug 23 17:21:15 2017 +0000
@@ -1,19 +1,19 @@
 #include "mbed.h"
 #include "SDFileSystem.h"
- 
-SDFileSystem sd(p5, p6, p7, p8, "sd"); // the pinout on the mbed Cool Components workshop board
- 
-int main() {
-    printf("Hello World!\n");   
- 
+SDFileSystem sd(PTA16,PTA17,PTA15,PTA14, "sd"); // the pinout on the mbed Cool Components workshop board
+DigitalOut redLed(LED2);
+int main()
+{
+    printf("Hello World!\n");
     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); 
- 
+    fclose(fp);
+
     printf("Goodbye World!\n");
+
 }