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 // Just a sample to show the USB serial communication can be done while the mbed volume mounted 00002 00003 #include "mbed.h" 00004 00005 LocalFileSystem local("local"); 00006 00007 int main() { 00008 00009 FILE *fp; 00010 printf( "TEST started\r\n" ); 00011 00012 if ( NULL == (fp = fopen( "/local/test.txt", "w" )) ) 00013 error( "couldn't open file to read...(2)" ); 00014 00015 for ( int i = 0; i < 10; i++ ) { 00016 printf( "%d\r\n", i ); 00017 wait( 1 ); 00018 } 00019 00020 fprintf( fp, "hello file world\n" ); 00021 fclose( fp ); 00022 00023 printf( "TEST completed\r\n" ); 00024 }
Generated on Wed Aug 3 2022 06:51:05 by
1.7.2