tangled
alpha
login
or
join now
sachy.dev
/
strike-sensor
0
fork
atom
Repo for designs & driver for a TA7642 powered lightning detector
0
fork
atom
overview
issues
pulls
pipelines
Make timer source reset async
sachy.dev
1 month ago
f5866bc4
2210a4d3
0/1
test.yml
failed
11s
+4
-4
2 changed files
expand all
collapse all
unified
split
embassy-strike-driver
src
lib.rs
traits.rs
+3
-3
embassy-strike-driver/src/lib.rs
···
122
122
}
123
123
}
124
124
125
125
-
pub fn reset_timer_source(&mut self, timer_source: T::Source) {
126
126
-
self.timer.reset_from_source(timer_source);
125
125
+
pub async fn reset_timer_source(&mut self, timer_source: T::Source) {
126
126
+
self.timer.reset_from_source(timer_source).await;
127
127
}
128
128
129
129
pub fn get_timestamp(&self) -> i64 {
···
333
333
impl TimeSource for MockTimeSource {
334
334
type Source = ();
335
335
336
336
-
fn reset_from_source(&mut self, _source: Self::Source) {}
336
336
+
async fn reset_from_source(&mut self, _source: Self::Source) {}
337
337
338
338
fn timestamp(&self) -> i64 {
339
339
0
+1
-1
embassy-strike-driver/src/traits.rs
···
2
2
type Source;
3
3
4
4
fn timestamp(&self) -> i64;
5
5
-
fn reset_from_source(&mut self, source: Self::Source);
5
5
+
fn reset_from_source(&mut self, source: Self::Source) -> impl Future<Output = ()>;
6
6
}
7
7
8
8
pub trait AdcSource {