demo demo
/
filetest
Revision 0:6ebcbe4c2b0c, committed 2009-09-28
- Comitter:
- demo
- Date:
- Mon Sep 28 22:54:10 2009 +0000
- Commit message:
Changed in this revision
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 |
diff -r 000000000000 -r 6ebcbe4c2b0c main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon Sep 28 22:54:10 2009 +0000 @@ -0,0 +1,24 @@ +// test semihost filesystem aquire/release +#include "mbed.h" + +DigitalOut myled(LED1); +LocalFileSystem local("local"); + +int main() { + FILE *fp2 = fopen("/local/foooo.txt", "w"); + fprintf(fp2, "boo"); + for(int i=0; i<2; i++) { + printf("opening file\n"); + FILE *fp = fopen("/local/foo.txt", "a"); + printf("writing data\n"); + fprintf(fp, "hello\n"); + printf("waiting...\n"); + wait(10); + printf("closing\n"); + fclose(fp); + printf("waiting2...\n"); + wait(10); + } + fprintf(fp2, "boo"); + fclose(fp2); +}
diff -r 000000000000 -r 6ebcbe4c2b0c mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon Sep 28 22:54:10 2009 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/a0336ede94ce