Fork
Dependencies: mbed SDFileSystem
Revision 2:ca63cf39a347, committed 2020-12-17
- Comitter:
- stephenb
- Date:
- Thu Dec 17 18:34:14 2020 +0000
- Parent:
- 1:e4d7342be507
- Commit message:
- 1
Changed in this revision
main.cpp | Show diff for this revision Revisions of this file |
diff -r e4d7342be507 -r ca63cf39a347 main.cpp --- a/main.cpp Tue May 16 05:18:55 2017 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,19 +0,0 @@ -#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"); - - 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); - - printf("Goodbye World!\n"); -}