tangled
alpha
login
or
join now
sachy.dev
/
sachy-parasite
1
fork
atom
Firmware for the b-parasite board, but in Rust.
1
fork
atom
overview
issues
pulls
pipelines
Remove redundant reset future
sachy.dev
3 months ago
9f4abc46
be0c46a0
+1
-10
1 changed file
expand all
collapse all
unified
split
src
shtc3.rs
+1
-10
src/shtc3.rs
···
43
43
Ok(m)
44
44
}
45
45
46
46
-
async fn reset<I>(sht: &mut ShtC3<I>) -> Result<(), ShtError<I::Error>>
47
47
-
where
48
48
-
I: I2c<SevenBitAddress>,
49
49
-
{
50
50
-
sht.reset_async(&mut Delay).await?;
51
51
-
52
52
-
Ok(())
53
53
-
}
54
54
-
55
46
fn init_sht3<'scope>(
56
47
spio: Peri<'scope, peripherals::TWISPI0>,
57
48
sda: Peri<'scope, peripherals::P0_24>,
···
88
79
error!("SHTC3 error: {:?}", e);
89
80
90
81
// Attempt to reset the sensor
91
91
-
if let Err(e) = reset(&mut sht).await {
82
82
+
if let Err(e) = sht.reset_async(&mut Delay).await {
92
83
error!("SHTC3 reset error: {:?}", e);
93
84
}
94
85
}