Modularizando o src
Dependencies: EALib EthernetInterface_vz mbed-rtos mbed
Fork of header_main_colinas_V0-20-09-14 by
Diff: file_system_manager.cpp
- Revision:
- 99:e80850c51106
- Parent:
- 81:3656f00ab3db
- Child:
- 100:09a23fcd3bdf
--- a/file_system_manager.cpp Sun Jan 11 03:30:47 2015 +0000 +++ b/file_system_manager.cpp Mon Jan 19 18:00:42 2015 +0000 @@ -92,16 +92,36 @@ fclose( ftport ); } +void set_fw_ip( char * new_fw_ip ){ + FILE * ffwip = fopen("/qspi/fw_ip.txt", "w" ); + fprintf(ffwip,"%s\n\r", new_fw_ip ); + fclose( ffwip ); +} + +void set_fw_port( int new_fw_port ){ + FILE * ffwport = fopen("/qspi/fw_port.txt", "w" ); + fprintf(ffwport,"%i\n\r", new_fw_port ); + fclose( ffwport ); +} + void set_max_ext( int new_max_ext ){ + debug_msg(""); FILE * fmex = fopen( "/qspi/maxext.txt", "w" ); - fprintf( fmex, "%i\n\r", new_max_ext ); - fclose( fmex ); + debug_msg(""); + if( fmex ){ + fprintf( fmex, "%i\n\r", new_max_ext ); + debug_msg(""); + fclose( fmex ); + debug_msg(""); + } } void set_min_ext( int new_min_ext ){ FILE * fmin = fopen( "/qspi/minext.txt", "w" ); - fprintf( fmin, "%i\n\r", new_min_ext ); - fclose( fmin ); + if( fmin ){ + fprintf( fmin, "%i\n\r", new_min_ext ); + fclose( fmin ); + } } // Print the content of a given file