aboutsummaryrefslogtreecommitdiffstats
path: root/api.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'api.cpp')
-rw-r--r--api.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/api.cpp b/api.cpp
index 60c0bcd..98b10f1 100644
--- a/api.cpp
+++ b/api.cpp
@@ -1,5 +1,9 @@
#include <stdio.h>
#include "pico/stdlib.h"
+extern "C" {
+#include "hardware/rtc.h"
+}
+#include "pico/util/datetime.h"
#include "oled/ss_oled.h"
#include "api.hpp"
@@ -26,3 +30,7 @@ int Api::dispWriteString(int iScrollX, int x, int y, char *szMsg, int iSize, int
void Api::dispFill(unsigned char ucData, int bRender) {
oledFill(&m_oled, ucData, bRender);
}
+
+bool Api::getDatetime(datetime_t *t) {
+ return rtc_get_datetime(t);
+}