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 // test semihost filesystem aquire/release 00002 #include "mbed.h" 00003 00004 DigitalOut myled(LED1); 00005 LocalFileSystem local("local"); 00006 00007 int main() { 00008 FILE *fp2 = fopen("/local/foooo.txt", "w"); 00009 fprintf(fp2, "boo"); 00010 for(int i=0; i<2; i++) { 00011 printf("opening file\n"); 00012 FILE *fp = fopen("/local/foo.txt", "a"); 00013 printf("writing data\n"); 00014 fprintf(fp, "hello\n"); 00015 printf("waiting...\n"); 00016 wait(10); 00017 printf("closing\n"); 00018 fclose(fp); 00019 printf("waiting2...\n"); 00020 wait(10); 00021 } 00022 fprintf(fp2, "boo"); 00023 fclose(fp2); 00024 }
Generated on Wed Jul 27 2022 09:51:06 by
1.7.2