ex ELLA / nrf51_rtc

Fork of nrf51_rtc by Francis Schumacher

Revision:
1:5917157d58c6
Parent:
0:3677a016109b
Child:
2:e1479e6ffc37
diff -r 3677a016109b -r 5917157d58c6 nrf51_rtc.h
--- a/nrf51_rtc.h	Sun Feb 08 01:28:47 2015 +0000
+++ b/nrf51_rtc.h	Mon Mar 02 08:54:40 2015 +0000
@@ -1,22 +1,25 @@
 #ifndef NRF51_RTC_H
 #define NRF51_RTC_H
 
-#include "mbed.h"
+#include <mbed.h>
 
-static class nrf51_rtc {
+class nrf51_rtc {
     // class to create equivalent of time() and set_time()
     //   ...depends upon RTC1 to be running and to never stop -- a byproduct of instantiation of mbed library's "ticker"
-    public:
+public:
     nrf51_rtc();
     time_t time();
     int set_time(time_t rawtime);
     
+    static void update_rtc(); // similar to "time" but doesn't return the value, just updates underlying variables
+
     // these should be private
-    private:
+private:
     time_t time_base;
     unsigned int rtc_previous;
     unsigned int ticks_per_second, counter_size_in_seconds;
-    void update_rtc(); // similar to "time" but doesn't return the value, just updates underlying variables
+};
 
-} rtc;
+extern nrf51_rtc rtc;
+
 #endif
\ No newline at end of file