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.
Dependencies: nRF51822
Diff: hw.cpp
- Revision:
- 9:0b017e956142
- Parent:
- 7:090f9eea7b3c
- Child:
- 10:b3553e75eee0
diff -r 5bb94184842d -r 0b017e956142 hw.cpp
--- a/hw.cpp Tue May 23 14:27:04 2017 +0000
+++ b/hw.cpp Tue May 30 19:01:17 2017 +0000
@@ -30,10 +30,20 @@
}
}
+void set_rtc(uint32_t s)
+{
+ seconds = s;
+}
+
+void update_rtc(uint32_t s)
+{
+ seconds += s;
+}
+
// RTC in seconds since boot
static void seconds_ticker_interrupt(void)
{
- seconds++;
+ seconds += 1;
}
/// Initialize the seconds clock to 's' seconds