ex
Fork of mbed-os-example-mbed5-blinky by
DuerOS-Light-SDK-v1.1.0/duer-os-light/external/targets_ext/TARGET_UNO_91H/rda58xx/rda58xx_dbg.h@47:9e361da97763, 2017-07-18 (annotated)
- Committer:
- TMBOY
- Date:
- Tue Jul 18 16:54:45 2017 +0800
- Revision:
- 47:9e361da97763
?
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| TMBOY | 47:9e361da97763 | 1 | #ifndef RDA58XX_DBG_H |
| TMBOY | 47:9e361da97763 | 2 | #define RDA58XX_DBG_H |
| TMBOY | 47:9e361da97763 | 3 | |
| TMBOY | 47:9e361da97763 | 4 | enum { |
| TMBOY | 47:9e361da97763 | 5 | D_ERROR_LEVEL = 0, |
| TMBOY | 47:9e361da97763 | 6 | D_WARNING_LEVEL = 1, |
| TMBOY | 47:9e361da97763 | 7 | D_NOTICE_LEVEL = 2, |
| TMBOY | 47:9e361da97763 | 8 | D_INFO_LEVEL = 3, |
| TMBOY | 47:9e361da97763 | 9 | D_DEBUG_LEVEL = 4, |
| TMBOY | 47:9e361da97763 | 10 | D_TRACE_LEVEL = 5, |
| TMBOY | 47:9e361da97763 | 11 | }; |
| TMBOY | 47:9e361da97763 | 12 | |
| TMBOY | 47:9e361da97763 | 13 | #define codec_dbg_level D_DEBUG_LEVEL |
| TMBOY | 47:9e361da97763 | 14 | |
| TMBOY | 47:9e361da97763 | 15 | #define CODEC_LOG(level, fmt, ...) do {\ |
| TMBOY | 47:9e361da97763 | 16 | int dbg_level = D_##level##_LEVEL;\ |
| TMBOY | 47:9e361da97763 | 17 | if((dbg_level <= codec_dbg_level)){\ |
| TMBOY | 47:9e361da97763 | 18 | printf(fmt, ##__VA_ARGS__);\ |
| TMBOY | 47:9e361da97763 | 19 | }\ |
| TMBOY | 47:9e361da97763 | 20 | } while (0) |
| TMBOY | 47:9e361da97763 | 21 | |
| TMBOY | 47:9e361da97763 | 22 | #endif |
