You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
445 B
C
18 lines
445 B
C
4 years ago
|
#ifndef _PDEBUG_H_
|
||
|
#define _PDEBUG_H_
|
||
|
|
||
|
#include "atmel_start.h"
|
||
|
int pdebug_init(void);
|
||
|
|
||
|
int pprintf(const char* fmt, ...);
|
||
|
|
||
|
void passert(const bool cond, const char* msg_failure, const char* file, const int line);
|
||
|
#ifdef DEBUG
|
||
|
#define assert(cond_, f_) passert(cond_, f_, __FILE__, __LINE__)
|
||
|
#define printf(f_, ...) pprintf((f_), ##__VA_ARGS__)
|
||
|
#else
|
||
|
#define printf(f_, ...) void(f_, ...)
|
||
|
#define assert(cond_, f_) void(cond_, f_)
|
||
|
#endif
|
||
|
#endif
|