Ika Shouyu Poppoyaki - LPC82x supported
Fork of ika_shouyu_poppoyaki by
Diff: isp.cpp
- Revision:
- 34:eaca33d3e632
- Parent:
- 33:ce9fff4cbf09
- Child:
- 38:cb95bfe0546a
--- a/isp.cpp Wed Sep 25 04:00:04 2013 +0000 +++ b/isp.cpp Thu Sep 26 11:51:03 2013 +0000 @@ -63,6 +63,8 @@ printf( " data size = %d bytes, it takes %d secotrs in flash area\r\n", data_size, last_sector + 1 ); printf( " resetting target\r\n" ); + +#ifdef ENABLE_WRITING if ( erase_sectors( last_sector ) ) return ( ERROR_AT_SECTOR_ERASE ); @@ -72,6 +74,11 @@ return ( err ); printf( " -- %d bytes data are written\r\n", transferred_size ); + leds_off(); +#else + printf( "\r\n ==== writing is disabled ====\r\n\r\n" ); +#endif + #ifdef ENABLE_VERIFYING printf( "\r\n ==== flash reading and verifying ====\r\n" ); @@ -80,10 +87,12 @@ return ( err ); printf( " -- %d bytes data are read and verified\r\n", transferred_size ); + leds_off(); #else printf( "\r\n ==== verifying has been skipped ====\r\n\r\n" ); #endif + fclose( fp ); post_writing_process( tpp ); @@ -169,3 +178,8 @@ leds = leds ^ (0x1 << v); } + +void leds_off( void ) +{ + leds = 0x0; +}