blob: 1a3265fd13dbab3649050ee5657123a79e3364d7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#ifndef APOS_DEBUG_H
#define APOS_DEBUG_H
#include <apos/attrs.h>
#include <apos/pmem.h>
#ifdef DEBUG
enum serial_dev {
/* only the NS16550A and compatible at the moment */
NS16550A,
};
struct dbg_info {
pm_t dbg_ptr;
enum serial_dev dev;
};
void __fmt(1, 2) dbg(const char *fmt, ...);
void setup_dbg(pm_t pt, enum serial_dev dev);
struct dbg_info dbg_from_fdt(void *fdt);
#else
#define dbg(...)
#define dbg_init(...)
#define dbg_from_fdt(...)
#endif /* DEBUG */
#endif /* APOS_DEBUG_H */
|