summaryrefslogtreecommitdiffstats
path: root/ble/src
diff options
context:
space:
mode:
authorBrian Cully <bjc@kublai.com>2019-08-13 11:39:46 -0400
committerBrian Cully <bjc@kublai.com>2019-08-13 15:33:41 -0400
commitd23ecf5ed4632f75d239e0e3858a94234baa90cd (patch)
tree80f93c560556153c788b37784a5198e3bddea1fd /ble/src
parent432f0dec2d7a716d43e2195c3b89fd050e4c536f (diff)
downloadbleusb-d23ecf5ed4632f75d239e0e3858a94234baa90cd.tar.gz
bleusb-d23ecf5ed4632f75d239e0e3858a94234baa90cd.zip
Check rtc flags before updating counter.
Diffstat (limited to 'ble/src')
-rw-r--r--ble/src/rtc.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/ble/src/rtc.rs b/ble/src/rtc.rs
index 8fe581f..7b6faa2 100644
--- a/ble/src/rtc.rs
+++ b/ble/src/rtc.rs
@@ -62,7 +62,8 @@ fn handler<R>(rtc: &mut Rtc<R, rtc::Started>)
where
R: rtc::Instance,
{
- let _ = rtc.get_event_triggered(RtcInterrupt::Tick, true);
- CLOCK.add(1);
- log::logger().flush();
+ if rtc.get_event_triggered(RtcInterrupt::Tick, true) {
+ CLOCK.add(1);
+ log::logger().flush();
+ }
}