Unina Corse EL / Mbed 2 deprecated f4_sd_imu_4

Dependencies:   SDFileSystem_conMOD mbed-rtos mbed

Fork of f4_sd_imu_4 by ratto killer

Revision:
2:f59bd5312559
Parent:
0:bdbd3d6fc5d5
Child:
3:3b2b8b0955f9
--- a/main.cpp	Tue May 16 05:18:55 2017 +0000
+++ b/main.cpp	Mon Nov 20 22:18:10 2017 +0000
@@ -1,19 +1,22 @@
 #include "mbed.h"
-#include "SDFileSystem.h"
- 
-SDFileSystem sd(p5, p6, p7, p8, "sd"); // the pinout on the mbed Cool Components workshop board
- 
+#include "setting.h"
+#include "lettoreSD.h"
+
+
 int main() {
-    printf("Hello World!\n");   
- 
-    mkdir("/sd/mydir", 0777);
+    init();
+    printf("Hello World!\n\r");
+    initFile();  
+    aperturaFile();
+    for(int i=0; i<1000; i++){
+        stampaFile("A1xxxxoooooggggggeeeeeeerrrryyyyynhgrgr#2\r\n");
+    }
+    chiusuraFile(); 
+    aperturaFile();
+    for(int i=0; i<1000; i++){
+        stampaFile("A1xxxxoooooggggggeeeeeeerrrryyyyynhgrgr#2\r\n");
+    }
+    chiusuraFile(); 
+    printf("Goodbye World!\n\r");
     
-    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); 
- 
-    printf("Goodbye World!\n");
 }