aboutsummaryrefslogtreecommitdiffstats
path: root/init.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'init.cpp')
-rw-r--r--init.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/init.cpp b/init.cpp
index eb33533..7e7056d 100644
--- a/init.cpp
+++ b/init.cpp
@@ -1,12 +1,15 @@
#include <stdio.h>
#include "pico/stdlib.h"
+#ifndef SDL2_BUILD
#include "hardware/i2c.h"
extern "C" {
#include "hardware/rtc.h"
}
+#endif
#include "init.hpp"
+#ifndef SDL2_BUILD
void init_rtc() {
datetime_t init_date = {
.year = INIT_DATETIME_YEAR,
@@ -19,8 +22,11 @@ void init_rtc() {
rtc_init();
rtc_set_datetime(&init_date);
}
+#endif
void init_all() {
+#ifndef SDL2_BUILD
stdio_init_all();
init_rtc();
+#endif
}