27 lines
647 B
C
27 lines
647 B
C
#ifndef MAD_CORE_COMMON_H
|
|
#define MAD_CORE_COMMON_H
|
|
|
|
#include "common/math.h"
|
|
#include "common/types.h"
|
|
#include "common/watchdog.h"
|
|
#include "common/memory.h"
|
|
#include "common/parser.h"
|
|
|
|
#include <stddef.h>
|
|
#include <stdarg.h>
|
|
|
|
#define UNUSED(s) (void)(s)
|
|
#define BIT(n) (0x1U << (n))
|
|
#define MAX(a, b) ((a) > (b) ? (a) : (b))
|
|
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
|
#define CLAMP(n, hi, lo) (MIN((hi), MAX((n), (lo))))
|
|
|
|
void Info(const char *fmt, ...);
|
|
void Error(const char *fmt, ...);
|
|
void Print(const char *fmt, ...);
|
|
|
|
#include <util/delay.h>
|
|
#define Sleep(ms) _delay_ms(ms)
|
|
|
|
#endif // MAD_CORE_COMMON_H
|