Modularizando o src

Dependencies:   EALib EthernetInterface_vz mbed-rtos mbed

Fork of header_main_colinas_V0-20-09-14 by VZTECH

Revision:
99:e80850c51106
Parent:
98:43b45f26b430
Child:
100:09a23fcd3bdf
--- a/debug.cpp	Sun Jan 11 03:30:47 2015 +0000
+++ b/debug.cpp	Mon Jan 19 18:00:42 2015 +0000
@@ -1,23 +1,24 @@
 #include "debug.h"
 
-UDPSocket debug;
-Endpoint debug_server;
+UDPSocket eth_fw_debug;
+Endpoint eth_fw_debug_server;
+
+void init_fw_debug_eth( void ){
+    eth_fw_debug_server.set_address( "192.168.30.25" , 6667 );
+    eth_fw_debug.init();
+}
+
 char debug_msg1[ 1024+64 ];
 char debug_msg2[ 1024 ];
 char msg_[ 1024 ];
 
-void debug_pkg( int size, uint8_t * pkg ){
-    /*
-    if (debug_alive == true){
-         static uint8_t i=0;
-         strcpy( debug_msg1, "Pkg " );
-         memcpy( debug_msg1+5, pkg, size );
-         debug_msg1[ 4 ] = i++;
-         debug.sendTo( debug_server, debug_msg1, size+5 );
-    }else
-        {}
-    */
-    return;
+int eth_fw_debug_pkg( uint8_t * pkg, int size ){
+    int send = 0;
+    do{
+        send = eth_fw_debug.sendTo( eth_fw_debug_server, ( char * )pkg, size );
+    }while( send == 0 );
+
+    return send;
 }
 
 bool debug_invite = false;
@@ -36,7 +37,8 @@
 bool debug_prompt_eth = false;
 bool debug_file = false;
 bool debug_prompt = false;
-bool dparallel = false;
+//bool dparallel = false;
+bool dparallel = true;
 bool dbl = false;
 bool udp_request = false;
 bool cb_session = false;
@@ -64,4 +66,9 @@
 bool debug_memory = false;
 //bool debug_registry_rcv = true;
 bool debug_port_match = false;
-//bool debug_registry_rcv = false;
\ No newline at end of file
+//bool debug_registry_rcv = false;
+bool debug_boot = false;
+//bool debug_fw = false;
+bool debug_fw = true;
+bool debug_fw_print = false;
+