Use MicroSD by STMF303K8

Dependencies:   SDFileSystem mbed

Revision:
2:bca1012fb1a6
Parent:
1:a8cfc313a2ae
diff -r a8cfc313a2ae -r bca1012fb1a6 main.cpp
--- a/main.cpp	Tue Jun 28 17:35:17 2016 +0000
+++ b/main.cpp	Mon Oct 24 17:04:46 2016 +0000
@@ -9,20 +9,17 @@
 D11-----CMD
 D12-----DAT0
 D13-----CLK
-D1------CD
+D9------CD
 */
 
-
 #include "mbed.h"
 #include "SDFileSystem.h"
-
-SDFileSystem sd(D11, D12, D13, D1, "sd");//MOSI, MISO, SCLK, SSEL
-
-DigitalOut myled(LED1);
-
-int main() {
-    FILE *fp = fopen("/sd/test.txt", "w");
-    fprintf(fp,"HelloWorld\n");
-    fclose(fp);
+ 
+SDFileSystem sd(D11, D12, D13, D9, "sd"); // the pinout on the mbed Cool Components workshop board
+ 
+int main() {    
+    FILE *fp = fopen("/sd/sdtest.txt", "w");
+    fprintf(fp, "HelloWorld!");
+    fclose(fp); 
     free(fp);
 }