![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
USB composite device example program, drag-and-drop flash writer.
Dependencies: SWD USBDevice mbed BaseDAP
Diff: mydebug.h
- Revision:
- 1:ea8e179320d7
- Parent:
- 0:2385683c867a
--- a/mydebug.h Tue Sep 17 04:33:44 2013 +0000 +++ b/mydebug.h Sat Sep 28 03:21:14 2013 +0000 @@ -1,9 +1,7 @@ -// mydebug.h 2013/8/31 +// mydebug.h 2013/9/26 #pragma once -#define MY_DEBUG 1 - -#if MY_DEBUG +#ifdef 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__); @@ -19,3 +17,9 @@ #else #define TEST_ASSERT(A) while(0); #endif + +#ifndef CT_ASSERT +template <bool>struct CtAssert; +template <>struct CtAssert<true> {}; +#define CT_ASSERT(A) CtAssert<A>(); +#endif //CT_ASSERT