Modularizando o src

Dependencies:   EALib EthernetInterface_vz mbed-rtos mbed

Fork of header_main_colinas_V0-20-09-14 by VZTECH

Committer:
klauss
Date:
Sat Sep 13 19:21:48 2014 +0000
Revision:
7:019b08223b87
Parent:
1:a1758104fa1d
Child:
8:e3bfe62a477e
testando estabilidade do embarcado

Who changed what in which revision?

UserRevisionLine numberNew contents of line
klauss 0:4d17cd9c8f9d 1 #include "debug.h"
klauss 0:4d17cd9c8f9d 2 #include "string.h"
klauss 0:4d17cd9c8f9d 3
klauss 0:4d17cd9c8f9d 4 UDPSocket debug;
klauss 0:4d17cd9c8f9d 5 Endpoint debug_server;
klauss 0:4d17cd9c8f9d 6 char debug_msg1[ 1024+64 ];
klauss 0:4d17cd9c8f9d 7 char debug_msg2[ 1024 ];
klauss 0:4d17cd9c8f9d 8
klauss 0:4d17cd9c8f9d 9 void debug_pkg( int size, uint8_t * pkg ){
klauss 0:4d17cd9c8f9d 10 static uint8_t i=0;
klauss 0:4d17cd9c8f9d 11 strcpy( debug_msg1, "Pkg " );
klauss 0:4d17cd9c8f9d 12 memcpy( debug_msg1+5, pkg, size );
klauss 0:4d17cd9c8f9d 13 debug_msg1[ 4 ] = i++;
klauss 1:a1758104fa1d 14 debug.sendTo( debug_server, debug_msg1, size+5 );
klauss 7:019b08223b87 15 }
klauss 7:019b08223b87 16
klauss 7:019b08223b87 17 void debug_32( uint8_t * pkg ){
klauss 7:019b08223b87 18 pc.printf( "Rx :: " );
klauss 7:019b08223b87 19 for( register int i = 0; i < 32; i++ )
klauss 7:019b08223b87 20 pc.printf( "%x ", pkg[ i ] );
klauss 7:019b08223b87 21 pc.printf( "\n\r" );
klauss 0:4d17cd9c8f9d 22 }