Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: EthernetInterface NTPClient mbed-rtos mbed
debug.h
00001 #ifndef __DEBUG_H__ 00002 #define __DEBUG_H__ 00003 00004 #include <stdint.h> 00005 #include <stdio.h> 00006 #include "mbed.h" 00007 #include "EthernetInterface.h" 00008 00009 #include "configs.h" 00010 00011 extern UDPSocket debug; 00012 extern Endpoint debug_server; 00013 extern char debug_msg1[ 1024+64 ]; 00014 extern char debug_msg2[ 1024 ]; 00015 00016 void debug_pkg( int size, uint8_t * pkg ); 00017 00018 #define debug_msg(...) _debug_msg(__VA_ARGS__) 00019 #define _debug_msg(...) { \ 00020 sprintf(debug_msg1, "%s:%d ", __FILE__, __LINE__); \ 00021 sprintf(debug_msg2, __VA_ARGS__); \ 00022 strcat(debug_msg1, debug_msg2); \ 00023 debug.sendTo( debug_server, debug_msg1, strlen( debug_msg1 ) ); \ 00024 } 00025 #endif 00026 00027 00028 //debug.sendTo( debug_server, debug_msg1, strlen( debug_msg1 ) ); \ 00029 //pc.printf( "%s\n\r", debug_msg1 ); \
Generated on Fri Jul 22 2022 09:19:18 by
1.7.2