Repo for designs & driver for a TA7642 powered lightning detector

Make timer source reset async

+4 -4
+3 -3
embassy-strike-driver/src/lib.rs
··· 122 } 123 } 124 125 - pub fn reset_timer_source(&mut self, timer_source: T::Source) { 126 - self.timer.reset_from_source(timer_source); 127 } 128 129 pub fn get_timestamp(&self) -> i64 { ··· 333 impl TimeSource for MockTimeSource { 334 type Source = (); 335 336 - fn reset_from_source(&mut self, _source: Self::Source) {} 337 338 fn timestamp(&self) -> i64 { 339 0
··· 122 } 123 } 124 125 + pub async fn reset_timer_source(&mut self, timer_source: T::Source) { 126 + self.timer.reset_from_source(timer_source).await; 127 } 128 129 pub fn get_timestamp(&self) -> i64 { ··· 333 impl TimeSource for MockTimeSource { 334 type Source = (); 335 336 + async fn reset_from_source(&mut self, _source: Self::Source) {} 337 338 fn timestamp(&self) -> i64 { 339 0
+1 -1
embassy-strike-driver/src/traits.rs
··· 2 type Source; 3 4 fn timestamp(&self) -> i64; 5 - fn reset_from_source(&mut self, source: Self::Source); 6 } 7 8 pub trait AdcSource {
··· 2 type Source; 3 4 fn timestamp(&self) -> i64; 5 + fn reset_from_source(&mut self, source: Self::Source) -> impl Future<Output = ()>; 6 } 7 8 pub trait AdcSource {