aboutsummaryrefslogtreecommitdiffstats
path: root/app/src/rtc.rs
diff options
context:
space:
mode:
authorBrian Cully <bjc@kublai.com>2019-07-24 17:35:24 -0400
committerBrian Cully <bjc@kublai.com>2019-07-24 17:35:24 -0400
commit87015d0256e5c3888681da6d469e515b58efbb5f (patch)
treedcab0ddbe85a09b988808ce00729bf1cdd3927c9 /app/src/rtc.rs
parentcd47fb1f4887ea863b7e90d476a8366634ce9980 (diff)
downloadsamd21-demo-87015d0256e5c3888681da6d469e515b58efbb5f.tar.gz
samd21-demo-87015d0256e5c3888681da6d469e515b58efbb5f.zip
Use log crate instead of hand-rolled solution.
* Remove my logging macros except *_now variants, since those are still handy. * Move log flush into RTC handler. This probably belongs in a separate timer at some point. * Change all old log messages to log crate's macros, except the Panic and HardFault calls.
Diffstat (limited to 'app/src/rtc.rs')
-rw-r--r--app/src/rtc.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/src/rtc.rs b/app/src/rtc.rs
index 0d39d31..79e450a 100644
--- a/app/src/rtc.rs
+++ b/app/src/rtc.rs
@@ -1,4 +1,5 @@
use core::sync::atomic::{AtomicUsize, Ordering};
+use log;
use trinket_m0::{clock::GenericClockController, RTC};
struct Clock(AtomicUsize);
@@ -67,5 +68,7 @@ fn handler(rtc: &mut RTC) {
CLOCK.set(TICKS);
}
ADD = !ADD;
+
+ log::logger().flush();
}
}