Merge pull request #3407 from armink/fix_eclipse
[rtdbg] Add for cpp support.
This commit is contained in:
commit
7335fd389e
|
@ -32,6 +32,10 @@
|
||||||
|
|
||||||
#include <rtconfig.h>
|
#include <rtconfig.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
/* the debug log will force enable when RT_DEBUG macro is defined */
|
/* the debug log will force enable when RT_DEBUG macro is defined */
|
||||||
#if defined(RT_DEBUG) && !defined(DBG_ENABLE)
|
#if defined(RT_DEBUG) && !defined(DBG_ENABLE)
|
||||||
#define DBG_ENABLE
|
#define DBG_ENABLE
|
||||||
|
@ -91,13 +95,13 @@
|
||||||
#ifdef DBG_COLOR
|
#ifdef DBG_COLOR
|
||||||
#define _DBG_COLOR(n) rt_kprintf("\033["#n"m")
|
#define _DBG_COLOR(n) rt_kprintf("\033["#n"m")
|
||||||
#define _DBG_LOG_HDR(lvl_name, color_n) \
|
#define _DBG_LOG_HDR(lvl_name, color_n) \
|
||||||
rt_kprintf("\033["#color_n"m["lvl_name"/"DBG_SECTION_NAME"] ")
|
rt_kprintf("\033["#color_n"m[" lvl_name "/" DBG_SECTION_NAME "] ")
|
||||||
#define _DBG_LOG_X_END \
|
#define _DBG_LOG_X_END \
|
||||||
rt_kprintf("\033[0m\n")
|
rt_kprintf("\033[0m\n")
|
||||||
#else
|
#else
|
||||||
#define _DBG_COLOR(n)
|
#define _DBG_COLOR(n)
|
||||||
#define _DBG_LOG_HDR(lvl_name, color_n) \
|
#define _DBG_LOG_HDR(lvl_name, color_n) \
|
||||||
rt_kprintf("["lvl_name"/"DBG_SECTION_NAME"] ")
|
rt_kprintf("[" lvl_name "/" DBG_SECTION_NAME "] ")
|
||||||
#define _DBG_LOG_X_END \
|
#define _DBG_LOG_X_END \
|
||||||
rt_kprintf("\n")
|
rt_kprintf("\n")
|
||||||
#endif /* DBG_COLOR */
|
#endif /* DBG_COLOR */
|
||||||
|
@ -176,4 +180,8 @@
|
||||||
|
|
||||||
#endif /* defined(RT_USING_ULOG) && define(DBG_ENABLE) */
|
#endif /* defined(RT_USING_ULOG) && define(DBG_ENABLE) */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* RT_DBG_H__ */
|
#endif /* RT_DBG_H__ */
|
||||||
|
|
Loading…
Reference in New Issue