![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Modularizando o src
Dependencies: EALib EthernetInterface_vz mbed-rtos mbed
Fork of header_main_colinas_V0-20-09-14 by
Diff: main.cpp
- Revision:
- 57:78f7191a8b69
- Parent:
- 55:2f5e7374af9d
- Child:
- 58:af7e8788f106
diff -r c64bcbaa621a -r 78f7191a8b69 main.cpp --- a/main.cpp Thu Oct 23 14:35:28 2014 +0000 +++ b/main.cpp Thu Oct 23 17:18:58 2014 +0000 @@ -86,6 +86,7 @@ reset_leds(); udp_timer.start(); send_msg("Ready"); + uint8_t before = t.read(); while( true ){ //FIXME colocar uma condicao aqui prompt_process( NULL ); @@ -174,6 +175,17 @@ }else type = __DO_NOTHING__; } //---------------------- + /* + if( (int)t.read() % 2 ){ + led3 = !led3; + } + */ + uint8_t now = t.read(); + if( before != now ){ + led3 = !led3; + before = now; + } + if( t.read() > 5 ){ static uint8_t count = 0; static int test_ext = 65531; @@ -194,7 +206,6 @@ } */ t.reset(); - led3 = !led3; CAB_LED = !CAB_LED; if( debug_cks ) send_msg("PKG_CSK OK: %d :: PKG_CSK ERR: %d", pkg_cksok, pkg_ckserr );