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: FatFileSystem TB6612FNG2 mbed
usb/mydbg.h@0:de03cbbcd0ff, 2015-11-30 (annotated)
- Committer:
- mbed_Cookbook_SE
- Date:
- Mon Nov 30 09:32:15 2015 +0000
- Revision:
- 0:de03cbbcd0ff
??
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 1 | #ifndef _MYDBG_H_ |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 2 | #define _MYDBG_H_ |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 3 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 4 | #ifdef __DEBUG |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 5 | #include "Utils.h" |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 6 | #define DBG(...) do{fprintf(stderr,"[%s@%d] ",__PRETTY_FUNCTION__,__LINE__);fprintf(stderr,__VA_ARGS__);} while(0); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 7 | #define DBG2(...) do{fprintf(stderr,"[%d] ",__LINE__);fprintf(stderr,__VA_ARGS__);} while(0); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 8 | #define DBG_BYTES(A,B,C) do{printf("[%s@%d] ",__PRETTY_FUNCTION__,__LINE__);printfBytes(A,B,C);}while(0); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 9 | #define DBG_HEX(A,B) do{printf("[%s@%d]\n",__PRETTY_FUNCTION__,__LINE__);printHex(A,B);}while(0); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 10 | #define DBG_LED4(A) led4.write(A) |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 11 | #define DBG_PRINTF(...) do{fprintf(stderr,__VA_ARGS__);} while(0); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 12 | #else //__DEBUG |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 13 | #define DBG(...) while(0); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 14 | #define DBG2(...) while(0); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 15 | #define DBG_BYTES(A,B,C) while(0); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 16 | #define DBG_HEX(A,B) while(0); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 17 | #define DBG_LED4(A) while(0); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 18 | #define DBG_PRINTF(...) while(0); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 19 | #endif //__DEBUG |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 20 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 21 | #ifdef __DEBUG3 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 22 | #define DBG3(...) do{fprintf(stderr,"[%s@%d] ",__PRETTY_FUNCTION__,__LINE__);fprintf(stderr,__VA_ARGS__);} while(0); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 23 | #else //__DEBUG3 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 24 | #define DBG3(...) while(0); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 25 | #endif //__DEBUG3 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 26 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 27 | #ifndef __NODEBUG |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 28 | #define DBG_ASSERT(A) while(!(A)){fprintf(stderr,"\n\n%s@%d %s ASSERT!\n\n",__PRETTY_FUNCTION__,__LINE__,#A);exit(1);}; |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 29 | #else |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 30 | #define DBG_ASSERT(A) while(0); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 31 | #endif |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 32 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 33 | #define VERBOSE(...) do{printf(__VA_ARGS__);} while(0); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 34 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 35 | #endif //_MYDBG_H_ |