빌드 설정으로 디버그 로그 출력 제어

This commit is contained in:
2026-07-20 18:00:20 +09:00
parent 7a34ea6ea9
commit 1a4dec297b
2 changed files with 18 additions and 0 deletions
+12
View File
@@ -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
+6
View File
@@ -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 */