Modularizando o src
Dependencies: EALib EthernetInterface_vz mbed-rtos mbed
Fork of header_main_colinas_V0-20-09-14 by
Diff: flood.cpp
- Revision:
- 29:7246460b73f8
- Parent:
- 21:0bd688722e81
- Child:
- 48:195c97f12e8e
diff -r 94aec56c6329 -r 7246460b73f8 flood.cpp --- a/flood.cpp Tue Sep 23 18:28:37 2014 +0000 +++ b/flood.cpp Wed Sep 24 18:02:18 2014 +0000 @@ -7,26 +7,23 @@ Timer tflood; int floodcount = 0; - +void flood (){ + if( tflood.read_us() > floodcount ){ + while( tflood.read_us() > floodcount ){ + floodcount += 20000; + } + uint8_t Bflood[300]; + uint8_t j; + static uint8_t flood_start =0; + j = flood_start; + for (int i = 0; i < 300; i++) { + Bflood[i] = j++; + } + flood_start++; + Bflood[6] = 0x40; + xmemcpy(TXBuffer, Bflood, 300); -void flood () { - - if (tflood.read_us()> floodcount){ - while (tflood.read_us()> floodcount){ - floodcount += 20000; - } - uint8_t Bflood[300]; - uint8_t j; - static uint8_t flood_start =0; - j = flood_start; - for (int i = 0; i < 300; i++){ - Bflood[i] = j++; - } - flood_start++; - Bflood[6] = 0x40; - xmemcpy(TXBuffer, Bflood, 300); - - send2callboxes(); - pc.printf("F"); - } + send2callboxes(); + pc.printf("F"); + } } \ No newline at end of file