#ifndef _PDEBUG_H_ #define _PDEBUG_H_ #include "atmel_start.h" #include int pdebug_init(void); int pprintf(const char* fmt, ...); void passert(const bool cond, const char* msg_failure, const char* file, const int line); int _perr(const char* str, const char* file, int line); #ifdef DEBUG #define assert(cond_, f_) passert(cond_, f_, __FILE__, __LINE__) #define printf(f_, ...) pprintf((f_), ##__VA_ARGS__) #define perr(f_) _perr(f_, __FILE__, __LINE__) #else #define printf(f_, ...) void(f_, ...) #define assert(cond_, f_) void(cond_, f_) #define perr(f_) void(f_, __FILE__, __LINE__) #endif #endif