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: SWD USBDevice mbed BaseDAP
mydebug.h
00001 // mydebug.h 2013/9/26 00002 #pragma once 00003 00004 #ifdef MY_DEBUG 00005 #include "mbed_debug.h" 00006 extern void debug_hex(uint8_t* buf, int len); 00007 #define DBG(x, ...) debug("[%s:%d]"x"\r\n", __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); 00008 #define DBG_HEX(A,B) do{debug("[%s:%d]\r\n",__PRETTY_FUNCTION__, __LINE__);debug_hex(A,B);}while(0); 00009 #else 00010 #define DBG(x, ...) while(0); 00011 #define DBG_HEX(A,B) while(0); 00012 #endif 00013 00014 #if 1 00015 #include "mbed_debug.h" 00016 #define TEST_ASSERT(A) while(!(A)){debug("\n\n%s@%d %s ASSERT!\n\n",__PRETTY_FUNCTION__,__LINE__,#A);exit(1);}; 00017 #else 00018 #define TEST_ASSERT(A) while(0); 00019 #endif 00020 00021 #ifndef CT_ASSERT 00022 template <bool>struct CtAssert; 00023 template <>struct CtAssert<true> {}; 00024 #define CT_ASSERT(A) CtAssert<A>(); 00025 #endif //CT_ASSERT
Generated on Wed Jul 13 2022 08:08:25 by
 1.7.2
 1.7.2