From 07af47eca912f3b56f013749a268718d78656961 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Thu, 26 Aug 2021 20:41:45 +0300 Subject: Added debug flags and simple debug serial driver --- include/apos/debug.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 include/apos/debug.h (limited to 'include/apos/debug.h') diff --git a/include/apos/debug.h b/include/apos/debug.h new file mode 100644 index 0000000..021612d --- /dev/null +++ b/include/apos/debug.h @@ -0,0 +1,22 @@ +#ifndef APOS_DEBUG_H +#define APOS_DEBUG_H + +#include + +#ifdef DEBUG +enum serial_dev_t { + /* only the NS16550A and compatible at the moment */ + NS16550A, +}; + +void __fmt(1, 2) dbg(const char *fmt, ...); +void dbg_init(void *pt, enum serial_dev_t dev); + +#else + +#define dbg(...) +#define dbg_init(...) + +#endif /* DEBUG */ + +#endif /* APOS_DEBUG_H */ -- cgit v1.3