time: Update examples, tests, and other code to use new Timer::after_x convenience methods

This commit is contained in:
Adam Greig
2023-10-15 00:57:25 +01:00
parent 7559f9e583
commit 0621e957a0
174 changed files with 496 additions and 501 deletions

View File

@ -306,7 +306,7 @@ async fn temp_task(temp_dev_i2c: TempSensI2c, mut led: Output<'static, periphera
loop {
led.set_low();
match select(temp_sens.read_temp(), Timer::after(Duration::from_millis(500))).await {
match select(temp_sens.read_temp(), Timer::after_millis(500)).await {
Either::First(i2c_ret) => match i2c_ret {
Ok(value) => {
led.set_high();
@ -424,7 +424,7 @@ where
// Start: One shot
let cfg = 0b01 << 5;
self.write_cfg(cfg).await?;
Timer::after(Duration::from_millis(250)).await;
Timer::after_millis(250).await;
self.bus
.write_read(self.addr, &[Registers::Temp_MSB as u8], &mut buffer)
.await