![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Versao com problema no socket rx
Dependencies: EthernetInterface NTPClient mbed-rtos mbed
debug.cpp@0:4d17cd9c8f9d, 2014-09-09 (annotated)
- Committer:
- klauss
- Date:
- Tue Sep 09 20:01:24 2014 +0000
- Revision:
- 0:4d17cd9c8f9d
- Child:
- 1:a1758104fa1d
20140726 copy
Who changed what in which revision?
User | Revision | Line number | New 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 | 0:4d17cd9c8f9d | 14 | // debug.sendTo( debug_server, debug_msg1, size+5 ); |
klauss | 0:4d17cd9c8f9d | 15 | } |