summaryrefslogtreecommitdiff
path: root/fw/fe310/eos/log.h
diff options
context:
space:
mode:
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 )