빌드 설정으로 디버그 로그 출력 제어
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
source "Kconfig.zephyr"
|
||||
|
||||
menu "VesiScan application options"
|
||||
|
||||
config VESIS_DEBUG_PRINT
|
||||
bool "Enable VesiScan debug print output"
|
||||
default y
|
||||
help
|
||||
Enable DBG_PRINTF, DBG_CORE, and DBG_ERR output through printk().
|
||||
Disable this option to compile out these project debug prints.
|
||||
|
||||
endmenu
|
||||
@@ -14,8 +14,14 @@
|
||||
*/
|
||||
#include <zephyr/sys/printk.h>
|
||||
|
||||
#if defined(CONFIG_VESIS_DEBUG_PRINT)
|
||||
#define DBG_PRINTF(...) printk(__VA_ARGS__)
|
||||
#define DBG_CORE(...) printk(__VA_ARGS__)
|
||||
#define DBG_ERR(...) printk(__VA_ARGS__)
|
||||
#else
|
||||
#define DBG_PRINTF(...) do { } while (0)
|
||||
#define DBG_CORE(...) printk(__VA_ARGS__)
|
||||
#define DBG_ERR(...) printk(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
#endif /* DEBUG_PRINT_H */
|
||||
|
||||
Reference in New Issue
Block a user