summaryrefslogtreecommitdiff
path: root/platformio/temphum/src/logging.h
diff options
context:
space:
mode:
Diffstat (limited to 'platformio/temphum/src/logging.h')
-rw-r--r--platformio/temphum/src/logging.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/platformio/temphum/src/logging.h b/platformio/temphum/src/logging.h
new file mode 100644
index 0000000..070f367
--- /dev/null
+++ b/platformio/temphum/src/logging.h
@@ -0,0 +1,18 @@
+#pragma once
+
+#include <stdlib.h>
+#include "config.def.h"
+
+#ifdef DEBUG
+
+#define PRINTLN(s) Serial.println(s)
+#define PRINT(s) Serial.print(s)
+#define PRINTF(fmt, ...) Serial.printf(fmt, ##__VA_ARGS__)
+
+#else
+
+#define PRINTLN(s)
+#define PRINT(s)
+#define PRINTF(...)
+
+#endif