// file: debug_print.h #ifndef DEBUG_PRINT_H #define DEBUG_PRINT_H #define ENABLE_PRINTF 1 // Set to 0 to disable globally #if ENABLE_PRINTF #include "SEGGER_RTT.h" #define DBG_PRINTF(...) SEGGER_RTT_printf(0, __VA_ARGS__) #else #define DBG_PRINTF(...) // Do nothing #endif #endif // DEBUG_PRINT_H