summaryrefslogtreecommitdiff
path: root/fw/fe310/eos/log.h
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2025-07-28 23:27:12 +0200
committerUros Majstorovic <majstor@majstor.org>2025-07-28 23:27:12 +0200
commit58f41971b1e801ad2fbcea08e5152afa2b18ca73 (patch)
tree51793b55b350f7807d5d1b7e1401b50f402ccc48 /fw/fe310/eos/log.h
parentdab5a1fbd188f8f9436df1b3dff6e344c444fc23 (diff)
sys logging added; power management reimplemented; bugfixes;
Diffstat (limited to 'fw/fe310/eos/log.h')
-rw-r--r--fw/fe310/eos/log.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/fw/fe310/eos/log.h b/fw/fe310/eos/log.h
new file mode 100644
index 0000000..be9b024
--- /dev/null
+++ b/fw/fe310/eos/log.h
@@ -0,0 +1,15 @@
+#include <stdio.h>
+
+#define EOS_LOG_DEBUG 1
+#define EOS_LOG_INFO 2
+#define EOS_LOG_ERR 3
+
+#define EOS_LOG_NONE 255
+
+#ifdef EOS_DEBUG
+#define EOS_LOG_LEVEL EOS_LOG_DEBUG
+#else
+#define EOS_LOG_LEVEL EOS_LOG_NONE
+#endif
+
+#define EOS_LOG(l, ...) ((l) >= EOS_LOG_LEVEL ? printf(__VA_ARGS__) : 0 )