From 1a4dec297bcdb1f67267e7506167401d7c32d039 Mon Sep 17 00:00:00 2001 From: jhchun Date: Mon, 20 Jul 2026 18:00:20 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B9=8C=EB=93=9C=20=EC=84=A4=EC=A0=95?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=EB=94=94=EB=B2=84=EA=B7=B8=20=EB=A1=9C?= =?UTF-8?q?=EA=B7=B8=20=EC=B6=9C=EB=A0=A5=20=EC=A0=9C=EC=96=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Kconfig | 12 ++++++++++++ src/debug_print.h | 6 ++++++ 2 files changed, 18 insertions(+) create mode 100644 Kconfig diff --git a/Kconfig b/Kconfig new file mode 100644 index 0000000..8359103 --- /dev/null +++ b/Kconfig @@ -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 diff --git a/src/debug_print.h b/src/debug_print.h index 389d8b8..13fb61e 100644 --- a/src/debug_print.h +++ b/src/debug_print.h @@ -14,8 +14,14 @@ */ #include +#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 */