USB composite device example program, drag-and-drop flash writer.
Dependencies: SWD USBDevice mbed BaseDAP
Diff: mydebug.h
- Revision:
- 0:2385683c867a
- Child:
- 1:ea8e179320d7
diff -r 000000000000 -r 2385683c867a mydebug.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mydebug.h Tue Sep 17 04:33:44 2013 +0000 @@ -0,0 +1,21 @@ +// mydebug.h 2013/8/31 +#pragma once + +#define MY_DEBUG 1 + +#if MY_DEBUG +#include "mbed_debug.h" +extern void debug_hex(uint8_t* buf, int len); +#define DBG(x, ...) debug("[%s:%d]"x"\r\n", __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); +#define DBG_HEX(A,B) do{debug("[%s:%d]\r\n",__PRETTY_FUNCTION__, __LINE__);debug_hex(A,B);}while(0); +#else +#define DBG(x, ...) while(0); +#define DBG_HEX(A,B) while(0); +#endif + +#if 1 +#include "mbed_debug.h" +#define TEST_ASSERT(A) while(!(A)){debug("\n\n%s@%d %s ASSERT!\n\n",__PRETTY_FUNCTION__,__LINE__,#A);exit(1);}; +#else +#define TEST_ASSERT(A) while(0); +#endif