16 lines
248 B
C
16 lines
248 B
C
#ifndef ASSERT_H_
|
|
#define ASSERT_H_
|
|
|
|
#include "kprintf.h"
|
|
#include "hal/hal.h"
|
|
|
|
#define ASSERT(mod, cond, fmt, ...) \
|
|
do { \
|
|
if (!(cond)) { \
|
|
ERR(mod, fmt, ##__VA_ARGS__); \
|
|
hal_hang(); \
|
|
} \
|
|
} while(0)
|
|
|
|
#endif // ASSERT_H_
|