![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Versao com problema no socket rx
Dependencies: EthernetInterface NTPClient mbed-rtos mbed
debug.h@0:4d17cd9c8f9d, 2014-09-09 (annotated)
- Committer:
- klauss
- Date:
- Tue Sep 09 20:01:24 2014 +0000
- Revision:
- 0:4d17cd9c8f9d
20140726 copy
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
klauss | 0:4d17cd9c8f9d | 1 | #ifndef __DEBUG_H__ |
klauss | 0:4d17cd9c8f9d | 2 | #define __DEBUG_H__ |
klauss | 0:4d17cd9c8f9d | 3 | |
klauss | 0:4d17cd9c8f9d | 4 | #include <stdint.h> |
klauss | 0:4d17cd9c8f9d | 5 | #include <stdio.h> |
klauss | 0:4d17cd9c8f9d | 6 | #include "mbed.h" |
klauss | 0:4d17cd9c8f9d | 7 | #include "EthernetInterface.h" |
klauss | 0:4d17cd9c8f9d | 8 | |
klauss | 0:4d17cd9c8f9d | 9 | #include "configs.h" |
klauss | 0:4d17cd9c8f9d | 10 | |
klauss | 0:4d17cd9c8f9d | 11 | extern UDPSocket debug; |
klauss | 0:4d17cd9c8f9d | 12 | extern Endpoint debug_server; |
klauss | 0:4d17cd9c8f9d | 13 | extern char debug_msg1[ 1024+64 ]; |
klauss | 0:4d17cd9c8f9d | 14 | extern char debug_msg2[ 1024 ]; |
klauss | 0:4d17cd9c8f9d | 15 | |
klauss | 0:4d17cd9c8f9d | 16 | void debug_pkg( int size, uint8_t * pkg ); |
klauss | 0:4d17cd9c8f9d | 17 | |
klauss | 0:4d17cd9c8f9d | 18 | #define debug_msg(...) _debug_msg(__VA_ARGS__) |
klauss | 0:4d17cd9c8f9d | 19 | #define _debug_msg(...) { \ |
klauss | 0:4d17cd9c8f9d | 20 | sprintf(debug_msg1, "%s:%d ", __FILE__, __LINE__); \ |
klauss | 0:4d17cd9c8f9d | 21 | sprintf(debug_msg2, __VA_ARGS__); \ |
klauss | 0:4d17cd9c8f9d | 22 | strcat(debug_msg1, debug_msg2); \ |
klauss | 0:4d17cd9c8f9d | 23 | debug.sendTo( debug_server, debug_msg1, strlen( debug_msg1 ) ); \ |
klauss | 0:4d17cd9c8f9d | 24 | } |
klauss | 0:4d17cd9c8f9d | 25 | #endif |
klauss | 0:4d17cd9c8f9d | 26 | |
klauss | 0:4d17cd9c8f9d | 27 | |
klauss | 0:4d17cd9c8f9d | 28 | //debug.sendTo( debug_server, debug_msg1, strlen( debug_msg1 ) ); \ |
klauss | 0:4d17cd9c8f9d | 29 | //pc.printf( "%s\n\r", debug_msg1 ); \ |