Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of nrf51_rtc by
Diff: nrf51_rtc.cpp
- Revision:
- 1:5917157d58c6
- Parent:
- 0:3677a016109b
- Child:
- 2:e1479e6ffc37
diff -r 3677a016109b -r 5917157d58c6 nrf51_rtc.cpp
--- a/nrf51_rtc.cpp Sun Feb 08 01:28:47 2015 +0000
+++ b/nrf51_rtc.cpp Mon Mar 02 08:54:40 2015 +0000
@@ -1,5 +1,9 @@
#include "nrf51_rtc.h"
+
+nrf51_rtc rtc;
+
+
int nrf51_rtc::set_time(time_t rawtime) {
// set the current time from a parameter
time_base = rawtime;
@@ -24,9 +28,7 @@
void nrf51_rtc::update_rtc() {
// for use as interrupt routine, same as "time" but doesn't return a value (as req'd for interrupt)
- // ...but this is useless since the compiler seems to be unable to correctly attach a member function to the ticker interrupt
- // ...the exact same interrupt routine attached to a ticker works fine when declared outside the method
- nrf51_rtc::time();
+ rtc.time();
}
nrf51_rtc::nrf51_rtc() {
