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

@ -11,7 +11,7 @@ use embassy_executor::Spawner;
use embassy_lora::iv::GenericSx126xInterfaceVariant;
use embassy_nrf::gpio::{Input, Level, Output, OutputDrive, Pin as _, Pull};
use embassy_nrf::{bind_interrupts, peripherals, spim};
use embassy_time::{Delay, Duration, Timer};
use embassy_time::{Delay, Timer};
use lora_phy::mod_params::*;
use lora_phy::sx1261_2::SX1261_2;
use lora_phy::LoRa;
@ -55,7 +55,7 @@ async fn main(_spawner: Spawner) {
let mut start_indicator = Output::new(p.P1_04, Level::Low, OutputDrive::Standard);
start_indicator.set_high();
Timer::after(Duration::from_secs(5)).await;
Timer::after_secs(5).await;
start_indicator.set_low();
let mdltn_params = {
@ -89,7 +89,7 @@ async fn main(_spawner: Spawner) {
info!("cad successful without activity detected")
}
debug_indicator.set_high();
Timer::after(Duration::from_secs(5)).await;
Timer::after_secs(5).await;
debug_indicator.set_low();
}
Err(err) => info!("cad unsuccessful = {}", err),