a

Dependencies:   SDFileSystem mbed

Files at this revision

API Documentation at this revision

Comitter:
goro56
Date:
Tue Nov 01 05:08:03 2022 +0000
Commit message:
a

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.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SDFileSystem.lib	Tue Nov 01 05:08:03 2022 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/SDFileSystem/#8db0d3b02cec
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Nov 01 05:08:03 2022 +0000
@@ -0,0 +1,22 @@
+#include "mbed.h"
+#include "SDFileSystem.h"
+
+Serial pc(USBTX,USBRX);
+SDFileSystem sd(p5, p6, p7, p8, "sd");
+
+int main()
+{
+    pc.printf("Hello world!\r\n");
+    char str[100];
+    mkdir("/sd/mydir", 0777);
+    FILE *fp = fopen("/sd/mydir/test.txt","w");
+    if(fp == NULL) {
+        error("Could not open file for write\r\n");
+    }
+    fprintf(fp,"Hello my name is Prelude!\r\n");
+    fclose(fp);
+        fgets(str,100,fp);
+        pc.puts(str);
+        fclose(fp);
+    printf("Goodbye World!\ n");
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Nov 01 05:08:03 2022 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file