Modularizando o src

Dependencies:   EALib EthernetInterface_vz mbed-rtos mbed

Fork of header_main_colinas_V0-20-09-14 by VZTECH

Committer:
klauss
Date:
Mon Oct 20 16:13:10 2014 +0000
Revision:
48:195c97f12e8e
Parent:
29:7246460b73f8
Child:
63:0d95da692bb4
versao em validacao

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Cola 21:0bd688722e81 1 #include "mbed.h"
Cola 21:0bd688722e81 2 #include "flood.h"
Cola 21:0bd688722e81 3 #include "parallelcpld.h"
klauss 48:195c97f12e8e 4 #include "prompt.h"
Cola 21:0bd688722e81 5
Cola 21:0bd688722e81 6 uint8_t pflood = 0;
Cola 21:0bd688722e81 7
Cola 21:0bd688722e81 8 Timer tflood;
Cola 21:0bd688722e81 9 int floodcount = 0;
Cola 21:0bd688722e81 10
klauss 29:7246460b73f8 11 void flood (){
klauss 29:7246460b73f8 12 if( tflood.read_us() > floodcount ){
klauss 29:7246460b73f8 13 while( tflood.read_us() > floodcount ){
klauss 29:7246460b73f8 14 floodcount += 20000;
klauss 29:7246460b73f8 15 }
klauss 29:7246460b73f8 16 uint8_t Bflood[300];
klauss 29:7246460b73f8 17 uint8_t j;
klauss 29:7246460b73f8 18 static uint8_t flood_start =0;
klauss 29:7246460b73f8 19 j = flood_start;
klauss 29:7246460b73f8 20 for (int i = 0; i < 300; i++) {
klauss 29:7246460b73f8 21 Bflood[i] = j++;
klauss 29:7246460b73f8 22 }
klauss 29:7246460b73f8 23 flood_start++;
klauss 29:7246460b73f8 24 Bflood[6] = 0x40;
klauss 29:7246460b73f8 25 xmemcpy(TXBuffer, Bflood, 300);
Cola 21:0bd688722e81 26
klauss 29:7246460b73f8 27 send2callboxes();
klauss 29:7246460b73f8 28 pc.printf("F");
klauss 48:195c97f12e8e 29 if( tcp_session ){
klauss 48:195c97f12e8e 30 tcp_client.send_all( "F", strlen( "F" ) );
klauss 48:195c97f12e8e 31 }
klauss 29:7246460b73f8 32 }
Cola 21:0bd688722e81 33 }