![](/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
flood.cpp@74:81c47fff88a5, 2014-11-24 (annotated)
- Committer:
- klauss
- Date:
- Mon Nov 24 16:43:16 2014 +0000
- Revision:
- 74:81c47fff88a5
- Parent:
- 63:0d95da692bb4
- Child:
- 100:09a23fcd3bdf
validando organiza??o de arquivos | ainda em desenvolvimento.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Cola | 21:0bd688722e81 | 1 | #include "flood.h" |
Cola | 21:0bd688722e81 | 2 | |
Cola | 21:0bd688722e81 | 3 | uint8_t pflood = 0; |
Cola | 21:0bd688722e81 | 4 | |
Cola | 21:0bd688722e81 | 5 | Timer tflood; |
Cola | 21:0bd688722e81 | 6 | int floodcount = 0; |
Cola | 21:0bd688722e81 | 7 | |
klauss | 29:7246460b73f8 | 8 | void flood (){ |
klauss | 29:7246460b73f8 | 9 | if( tflood.read_us() > floodcount ){ |
klauss | 29:7246460b73f8 | 10 | while( tflood.read_us() > floodcount ){ |
klauss | 29:7246460b73f8 | 11 | floodcount += 20000; |
klauss | 29:7246460b73f8 | 12 | } |
klauss | 29:7246460b73f8 | 13 | uint8_t Bflood[300]; |
klauss | 29:7246460b73f8 | 14 | uint8_t j; |
klauss | 29:7246460b73f8 | 15 | static uint8_t flood_start =0; |
klauss | 29:7246460b73f8 | 16 | j = flood_start; |
klauss | 29:7246460b73f8 | 17 | for (int i = 0; i < 300; i++) { |
klauss | 29:7246460b73f8 | 18 | Bflood[i] = j++; |
klauss | 29:7246460b73f8 | 19 | } |
klauss | 29:7246460b73f8 | 20 | flood_start++; |
klauss | 29:7246460b73f8 | 21 | Bflood[6] = 0x40; |
klauss | 74:81c47fff88a5 | 22 | //xmemcpy( TXBuffer, Bflood, 300 ); |
klauss | 74:81c47fff88a5 | 23 | //xmemcpy( cb_tx_buffer, Bflood, 300 ); |
Cola | 21:0bd688722e81 | 24 | |
klauss | 74:81c47fff88a5 | 25 | send2callboxes( Bflood ); |
klauss | 29:7246460b73f8 | 26 | pc.printf("F"); |
klauss | 48:195c97f12e8e | 27 | if( tcp_session ){ |
klauss | 48:195c97f12e8e | 28 | tcp_client.send_all( "F", strlen( "F" ) ); |
klauss | 48:195c97f12e8e | 29 | } |
klauss | 29:7246460b73f8 | 30 | } |
Cola | 21:0bd688722e81 | 31 | } |