#ifndef DEBUG_CONFIG_H #define DEBUG_CONFIG_H #define DEBUG #ifdef DEBUG #define DLOG_INIT() Serial.begin(9600) #define DLOG(msg) Serial.print(msg); #define DLOGLN(msg) Serial.println(msg); #define WARN_IF(cond, msg) if(cond) Serial.print(msg); #define ASSERT(condition, msg) \ if (!(condition)) { \ Serial.print("!!! ASSERTION FAILED: "); \ Serial.print(msg); \ Serial.print(" [F:"); Serial.print(__FILE__); \ Serial.print(" L:"); Serial.print(__LINE__); \ Serial.println("]"); \ while (true); \ } #else #define DLOG_INIT() #define DLOG(msg) #define DLOGLN(msg) #define WARN_IF(cond, msg) #define ASSERT(condition, msg) #endif #endif