Dependencies:   mbed

Files at this revision

API Documentation at this revision

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
--- /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);
+}
--- /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