Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp
00001 #include "mbed.h" 00002 #include "SDFileSystem.h" 00003 00004 SDFileSystem sd(p5, p6, p7, p8, "sd"); 00005 const unsigned int MAX_LEN = 256; 00006 00007 int main() { 00008 FILE* fp = fopen("/sd/mydir/sdtest.txt", "r"); 00009 if(fp == NULL) { 00010 error("Could not open file for write\n"); 00011 } 00012 00013 char str[MAX_LEN]; 00014 fgets(str,MAX_LEN-1,fp); 00015 00016 printf(str); 00017 fclose(fp); 00018 }
Generated on Thu Jul 14 2022 02:11:44 by
1.7.2