diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2021-08-26 20:41:45 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2021-08-26 20:43:08 +0300 |
| commit | 07af47eca912f3b56f013749a268718d78656961 (patch) | |
| tree | 1bb933b33af06b9ae1e4849a9e108de1a695a894 /include/apos/debug.h | |
| parent | 5dfac4879ce5f34503ae7537eefd3fc48d6fa750 (diff) | |
| download | kmi-07af47eca912f3b56f013749a268718d78656961.tar.gz kmi-07af47eca912f3b56f013749a268718d78656961.zip | |
Added debug flags and simple debug serial driver
Diffstat (limited to 'include/apos/debug.h')
| -rw-r--r-- | include/apos/debug.h | 22 |
1 files changed, 22 insertions, 0 deletions
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 <apos/attrs.h> + +#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 */ |
