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_old mbed
Fork of header_main_public by
debug.h
- Committer:
- klauss
- Date:
- 2014-09-11
- Revision:
- 4:de46f0d9b14d
- Parent:
- 2:93bec7313ccc
- Child:
- 6:a10de9926fbe
File content as of revision 4:de46f0d9b14d:
#ifndef __DEBUG_H__
#define __DEBUG_H__
#include <stdint.h>
#include <stdio.h>
#include "mbed.h"
#include "EthernetInterface.h"
#include "configs.h"
//extern UDPSocket debug;
//extern Endpoint debug_server;
extern char debug_msg1[ 1024+64 ];
extern char debug_msg2[ 1024 ];
void debug_pkg( int size, uint8_t * pkg );
#define debug_msg(...) _debug_msg(__VA_ARGS__)
#define _debug_msg(...) { \
sprintf(debug_msg1, "%s:%d ", __FILE__, __LINE__); \
sprintf(debug_msg2, __VA_ARGS__); \
strcat(debug_msg1, debug_msg2); \
pc.printf( "%s\n\r", debug_msg1 ); \
}
#endif
//debug.sendTo( debug_server, debug_msg1, strlen( debug_msg1 ) ); \
//pc.printf( "%s\n\r", debug_msg1 ); \
