Framework for exporting system header to user space (#59)
[lunaix-os.git] / lunaix-os / includes / lunaix / clock.h
index 4eea312fedc7206bbee01af4c1f8e138a0ead913..3cb1e4e5f6838398c0d04419bf74106ab3869f7f 100644 (file)
@@ -2,6 +2,13 @@
 #define __LUNAIX_CLOCK_H
 
 #include <lunaix/time.h>
+
+#include <hal/hwrtc.h>
+#include <hal/hwtimer.h>
+
+extern const struct hwrtc_potens* sysrtc;
+extern const struct hwtimer_pot* systimer;
+
 void
 clock_walltime(datetime_t* datetime);
 
@@ -16,4 +23,10 @@ clock_systime();
 time_t
 clock_unixtime();
 
+static inline void
+clock_init()
+{
+    hwrtc_init();
+}
+
 #endif /* __LUNAIX_CLOCK_H */