![](/media/cache/profiles/0e7702441590ab2e63aab191ba159a84.jpg.50x50_q85.jpg)
sd read/write
Dependencies: SDFileSystem mbed
Fork of SDFileSystem_HelloWorld by
Revision 2:343b407cf6aa, committed 2015-06-29
- Comitter:
- eunkyoungkim
- Date:
- Mon Jun 29 02:18:54 2015 +0000
- Parent:
- 1:f4d825b196e7
- Commit message:
- modify main .c;
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r f4d825b196e7 -r 343b407cf6aa main.cpp --- a/main.cpp Mon Jun 29 01:38:35 2015 +0000 +++ b/main.cpp Mon Jun 29 02:18:54 2015 +0000 @@ -6,8 +6,6 @@ char sdread[MAX_SIZE]; int main() { - printf("Hello World!\n"); - mkdir("/sd/mydir", 0777); FILE *fp = fopen("/sd/mydir/sdtest.txt", "w"); @@ -21,7 +19,7 @@ fp = fopen("/sd/mydir/sdtest.txt", "r"); if (fp != NULL) { fgets(sdread,MAX_SIZE,fp); - printf("READ_STR = %s", sdread); + printf("%s", sdread); fclose(fp); } else { printf("failed!\n");