LPC1768のfirmwareのrev違いによるlocal file systemの挙動の違い確認用サンプルプログラム

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
suupen
Date:
Thu Oct 10 11:16:27 2013 +0000
Commit message:
LPC1768?firmware?rev?????local file system???????????????????

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	Thu Oct 10 11:16:27 2013 +0000
@@ -0,0 +1,31 @@
+#include "mbed.h"
+ 
+LocalFileSystem SeqFile("Local");
+ 
+ Serial pc(USBTX, USBRX);
+ 
+int main() {
+    FILE    *fp;
+    int     i   = 1;
+ 
+    pc.printf( "\r\nSTART\r\n" );
+    wait( 0.1 );
+ 
+    while ( 1 ) {
+        fp = fopen( "/Local/TEST.txt", "a" );
+        if (!fp) {
+            pc.printf( "error %d\r\n", i );
+            exit( 1 );
+        } else {
+            fprintf(fp, "%d (%p)\r\n", i, fp);
+            pc.printf( "%d (%p)\r\n", i, fp );
+            fclose( fp );
+#if defined(__MICROLIB) && defined(__ARMCC_VERSION) // with microlib and ARM compiler
+            free(fp);
+#endif
+        }
+        wait( 0.1 );
+        i++;
+    }
+}
+ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Oct 10 11:16:27 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/a9913a65894f
\ No newline at end of file