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 */