diff options
Diffstat (limited to 'examples/stm32l0/src/bin')
| -rw-r--r-- | examples/stm32l0/src/bin/blinky.rs | 6 | ||||
| -rw-r--r-- | examples/stm32l0/src/bin/lora_cad.rs | 6 | ||||
| -rw-r--r-- | examples/stm32l0/src/bin/lora_p2p_receive.rs | 6 | ||||
| -rw-r--r-- | examples/stm32l0/src/bin/raw_spawn.rs | 6 |
4 files changed, 12 insertions, 12 deletions
diff --git a/examples/stm32l0/src/bin/blinky.rs b/examples/stm32l0/src/bin/blinky.rs index 07fad07c6..ea40bfc48 100644 --- a/examples/stm32l0/src/bin/blinky.rs +++ b/examples/stm32l0/src/bin/blinky.rs | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | use defmt::*; | 5 | use defmt::*; |
| 6 | use embassy_executor::Spawner; | 6 | use embassy_executor::Spawner; |
| 7 | use embassy_stm32::gpio::{Level, Output, Speed}; | 7 | use embassy_stm32::gpio::{Level, Output, Speed}; |
| 8 | use embassy_time::{Duration, Timer}; | 8 | use embassy_time::Timer; |
| 9 | use {defmt_rtt as _, panic_probe as _}; | 9 | use {defmt_rtt as _, panic_probe as _}; |
| 10 | 10 | ||
| 11 | #[embassy_executor::main] | 11 | #[embassy_executor::main] |
| @@ -18,10 +18,10 @@ async fn main(_spawner: Spawner) { | |||
| 18 | loop { | 18 | loop { |
| 19 | info!("high"); | 19 | info!("high"); |
| 20 | led.set_high(); | 20 | led.set_high(); |
| 21 | Timer::after(Duration::from_millis(300)).await; | 21 | Timer::after_millis(300).await; |
| 22 | 22 | ||
| 23 | info!("low"); | 23 | info!("low"); |
| 24 | led.set_low(); | 24 | led.set_low(); |
| 25 | Timer::after(Duration::from_millis(300)).await; | 25 | Timer::after_millis(300).await; |
| 26 | } | 26 | } |
| 27 | } | 27 | } |
diff --git a/examples/stm32l0/src/bin/lora_cad.rs b/examples/stm32l0/src/bin/lora_cad.rs index 900848fd8..987cdba01 100644 --- a/examples/stm32l0/src/bin/lora_cad.rs +++ b/examples/stm32l0/src/bin/lora_cad.rs | |||
| @@ -12,7 +12,7 @@ use embassy_stm32::exti::{Channel, ExtiInput}; | |||
| 12 | use embassy_stm32::gpio::{Input, Level, Output, Pin, Pull, Speed}; | 12 | use embassy_stm32::gpio::{Input, Level, Output, Pin, Pull, Speed}; |
| 13 | use embassy_stm32::spi; | 13 | use embassy_stm32::spi; |
| 14 | use embassy_stm32::time::khz; | 14 | use embassy_stm32::time::khz; |
| 15 | use embassy_time::{Delay, Duration, Timer}; | 15 | use embassy_time::{Delay, Timer}; |
| 16 | use lora_phy::mod_params::*; | 16 | use lora_phy::mod_params::*; |
| 17 | use lora_phy::sx1276_7_8_9::SX1276_7_8_9; | 17 | use lora_phy::sx1276_7_8_9::SX1276_7_8_9; |
| 18 | use lora_phy::LoRa; | 18 | use lora_phy::LoRa; |
| @@ -55,7 +55,7 @@ async fn main(_spawner: Spawner) { | |||
| 55 | let mut start_indicator = Output::new(p.PB6, Level::Low, Speed::Low); | 55 | let mut start_indicator = Output::new(p.PB6, Level::Low, Speed::Low); |
| 56 | 56 | ||
| 57 | start_indicator.set_high(); | 57 | start_indicator.set_high(); |
| 58 | Timer::after(Duration::from_secs(5)).await; | 58 | Timer::after_secs(5).await; |
| 59 | start_indicator.set_low(); | 59 | start_indicator.set_low(); |
| 60 | 60 | ||
| 61 | let mdltn_params = { | 61 | let mdltn_params = { |
| @@ -89,7 +89,7 @@ async fn main(_spawner: Spawner) { | |||
| 89 | info!("cad successful without activity detected") | 89 | info!("cad successful without activity detected") |
| 90 | } | 90 | } |
| 91 | debug_indicator.set_high(); | 91 | debug_indicator.set_high(); |
| 92 | Timer::after(Duration::from_secs(5)).await; | 92 | Timer::after_secs(5).await; |
| 93 | debug_indicator.set_low(); | 93 | debug_indicator.set_low(); |
| 94 | } | 94 | } |
| 95 | Err(err) => info!("cad unsuccessful = {}", err), | 95 | Err(err) => info!("cad unsuccessful = {}", err), |
diff --git a/examples/stm32l0/src/bin/lora_p2p_receive.rs b/examples/stm32l0/src/bin/lora_p2p_receive.rs index edd14bb81..06e2744a4 100644 --- a/examples/stm32l0/src/bin/lora_p2p_receive.rs +++ b/examples/stm32l0/src/bin/lora_p2p_receive.rs | |||
| @@ -12,7 +12,7 @@ use embassy_stm32::exti::{Channel, ExtiInput}; | |||
| 12 | use embassy_stm32::gpio::{Input, Level, Output, Pin, Pull, Speed}; | 12 | use embassy_stm32::gpio::{Input, Level, Output, Pin, Pull, Speed}; |
| 13 | use embassy_stm32::spi; | 13 | use embassy_stm32::spi; |
| 14 | use embassy_stm32::time::khz; | 14 | use embassy_stm32::time::khz; |
| 15 | use embassy_time::{Delay, Duration, Timer}; | 15 | use embassy_time::{Delay, Timer}; |
| 16 | use lora_phy::mod_params::*; | 16 | use lora_phy::mod_params::*; |
| 17 | use lora_phy::sx1276_7_8_9::SX1276_7_8_9; | 17 | use lora_phy::sx1276_7_8_9::SX1276_7_8_9; |
| 18 | use lora_phy::LoRa; | 18 | use lora_phy::LoRa; |
| @@ -55,7 +55,7 @@ async fn main(_spawner: Spawner) { | |||
| 55 | let mut start_indicator = Output::new(p.PB6, Level::Low, Speed::Low); | 55 | let mut start_indicator = Output::new(p.PB6, Level::Low, Speed::Low); |
| 56 | 56 | ||
| 57 | start_indicator.set_high(); | 57 | start_indicator.set_high(); |
| 58 | Timer::after(Duration::from_secs(5)).await; | 58 | Timer::after_secs(5).await; |
| 59 | start_indicator.set_low(); | 59 | start_indicator.set_low(); |
| 60 | 60 | ||
| 61 | let mut receiving_buffer = [00u8; 100]; | 61 | let mut receiving_buffer = [00u8; 100]; |
| @@ -107,7 +107,7 @@ async fn main(_spawner: Spawner) { | |||
| 107 | { | 107 | { |
| 108 | info!("rx successful"); | 108 | info!("rx successful"); |
| 109 | debug_indicator.set_high(); | 109 | debug_indicator.set_high(); |
| 110 | Timer::after(Duration::from_secs(5)).await; | 110 | Timer::after_secs(5).await; |
| 111 | debug_indicator.set_low(); | 111 | debug_indicator.set_low(); |
| 112 | } else { | 112 | } else { |
| 113 | info!("rx unknown packet"); | 113 | info!("rx unknown packet"); |
diff --git a/examples/stm32l0/src/bin/raw_spawn.rs b/examples/stm32l0/src/bin/raw_spawn.rs index edc17304a..29c7e0dc7 100644 --- a/examples/stm32l0/src/bin/raw_spawn.rs +++ b/examples/stm32l0/src/bin/raw_spawn.rs | |||
| @@ -7,21 +7,21 @@ use cortex_m_rt::entry; | |||
| 7 | use defmt::*; | 7 | use defmt::*; |
| 8 | use embassy_executor::raw::TaskStorage; | 8 | use embassy_executor::raw::TaskStorage; |
| 9 | use embassy_executor::Executor; | 9 | use embassy_executor::Executor; |
| 10 | use embassy_time::{Duration, Timer}; | 10 | use embassy_time::Timer; |
| 11 | use static_cell::StaticCell; | 11 | use static_cell::StaticCell; |
| 12 | use {defmt_rtt as _, panic_probe as _}; | 12 | use {defmt_rtt as _, panic_probe as _}; |
| 13 | 13 | ||
| 14 | async fn run1() { | 14 | async fn run1() { |
| 15 | loop { | 15 | loop { |
| 16 | info!("BIG INFREQUENT TICK"); | 16 | info!("BIG INFREQUENT TICK"); |
| 17 | Timer::after(Duration::from_ticks(64000)).await; | 17 | Timer::after_ticks(64000).await; |
| 18 | } | 18 | } |
| 19 | } | 19 | } |
| 20 | 20 | ||
| 21 | async fn run2() { | 21 | async fn run2() { |
| 22 | loop { | 22 | loop { |
| 23 | info!("tick"); | 23 | info!("tick"); |
| 24 | Timer::after(Duration::from_ticks(13000)).await; | 24 | Timer::after_ticks(13000).await; |
| 25 | } | 25 | } |
| 26 | } | 26 | } |
| 27 | 27 | ||
