Ika Shouyu Poppoyaki - LPC82x supported
Fork of ika_shouyu_poppoyaki by
Diff: command_interface.cpp
- Revision:
- 27:2b5c1eb39bb5
- Parent:
- 26:a63e73885b21
- Child:
- 29:96e28bc1bd99
--- a/command_interface.cpp Fri Sep 13 12:56:23 2013 +0000 +++ b/command_interface.cpp Thu Sep 19 01:08:20 2013 +0000 @@ -68,24 +68,26 @@ } -void send_RAM_transfer_checksum( int checksum ) +int send_RAM_transfer_checksum( int checksum ) { char command[ 16 ]; sprintf( command, "%d\n", checksum ); - try_and_check( command, "OK", 0 ); + + return ( try_and_check( command, "OK", 0 ) ); } -void erase_sectors( int last_sector ) +int erase_sectors( int last_sector ) { char command_str[ STR_BUFF_SIZE ]; sprintf( command_str, "P 0 %d\r\n", last_sector ); - try_and_check( command_str, "0", 0 ); + if ( try_and_check( command_str, "0", 0 ) ) + return ( 1 ); *(command_str) = 'E'; - try_and_check( command_str, "0", 0 ); + return ( try_and_check( command_str, "0", 0 ) ); }