Code to load a LPC1114 over tx/rx. I have only tested with a 1114 chip but it should work with other LPC uControllers
Dependencies: DirectoryList MODSERIAL mbed
Fork of ika_shouyu_poppoyaki by
Diff: command_interface.cpp
- Revision:
- 39:f68f9fa1e88e
- Parent:
- 35:0b434ef4af49
--- a/command_interface.cpp Fri Sep 27 14:48:17 2013 +0000 +++ b/command_interface.cpp Sun Sep 29 03:54:06 2013 +0000 @@ -43,6 +43,8 @@ void print_command( char *command ) { +#ifndef SUPPRESS_COMMAND_RESULT_MESSAGE + char s[ STR_BUFF_SIZE ]; char *pos; @@ -54,13 +56,17 @@ if ( pos = strchr( s, '\n' ) ) *pos = '\0'; - printf( " command-\"%s\" : ", s ); + printf( " command - %-22s : ", s ); + +#endif //SUPPRESS_COMMAND_RESULT_MESSAGE } void print_result( int r ) { +#ifndef SUPPRESS_COMMAND_RESULT_MESSAGE printf( "%s\r\n", r ? "Fail" : "Pass" ); +#endif //SUPPRESS_COMMAND_RESULT_MESSAGE } @@ -69,7 +75,7 @@ char command[ 16 ]; sprintf( command, "%d\n", checksum ); - + return ( try_and_check( command, "OK" ) ); }