application that helps to copy file between SD and mbed_local. insert/remove SD card is too troublesome for me. And also, this is a simple sample of the fread/fwrite

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
okano
Date:
Wed Sep 22 05:26:10 2010 +0000
Parent:
0:81b440aaf221
Commit message:

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 81b440aaf221 -r 1a76280274de main.cpp
--- a/main.cpp	Tue Sep 21 15:15:20 2010 +0000
+++ b/main.cpp	Wed Sep 22 05:26:10 2010 +0000
@@ -7,6 +7,9 @@
 LocalFileSystem local("local");
 Serial          pc(USBTX, USBRX); // tx, rx
 
+//#define        SOURCE_FILE        "/local/source.jpg"
+//#define        TARGET_FILE        "/sd/target.jpg"
+
 #define        SOURCE_FILE        "/sd/temp_log.txt"
 #define        TARGET_FILE        "/local/temp_log.txt"
 
@@ -31,7 +34,7 @@
     }   
     if ( NULL == (fs_tgt    = fopen( TARGET_FILE, "wb" )) )
     {
-        error( "couldn't open source file" );
+        error( "couldn't open target file" );
         return ( 2 );
     }