diff options
| author | Dario Nieuwenhuis <[email protected]> | 2022-07-29 21:58:35 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2022-07-29 23:40:36 +0200 |
| commit | a0f1b0ee01d461607660d2d56b5b1bdc57e0d3fb (patch) | |
| tree | e60fc8f8db8ec07e55d655c1a830b07f4db0b7d2 /examples/stm32wl/src | |
| parent | 8745d646f0976791b7098456aa61adb983fb1c18 (diff) | |
Split embassy crate into embassy-executor, embassy-util.
Diffstat (limited to 'examples/stm32wl/src')
| -rw-r--r-- | examples/stm32wl/src/bin/blinky.rs | 6 | ||||
| -rw-r--r-- | examples/stm32wl/src/bin/button_exti.rs | 4 | ||||
| -rw-r--r-- | examples/stm32wl/src/bin/flash.rs | 4 | ||||
| -rw-r--r-- | examples/stm32wl/src/bin/lorawan.rs | 4 | ||||
| -rw-r--r-- | examples/stm32wl/src/bin/subghz.rs | 6 |
5 files changed, 12 insertions, 12 deletions
diff --git a/examples/stm32wl/src/bin/blinky.rs b/examples/stm32wl/src/bin/blinky.rs index 9393af1c6..e764b4cc3 100644 --- a/examples/stm32wl/src/bin/blinky.rs +++ b/examples/stm32wl/src/bin/blinky.rs | |||
| @@ -3,13 +3,13 @@ | |||
| 3 | #![feature(type_alias_impl_trait)] | 3 | #![feature(type_alias_impl_trait)] |
| 4 | 4 | ||
| 5 | use defmt::*; | 5 | use defmt::*; |
| 6 | use embassy::executor::Spawner; | 6 | use embassy_executor::executor::Spawner; |
| 7 | use embassy::time::{Duration, Timer}; | 7 | use embassy_executor::time::{Duration, Timer}; |
| 8 | use embassy_stm32::gpio::{Level, Output, Speed}; | 8 | use embassy_stm32::gpio::{Level, Output, Speed}; |
| 9 | use embassy_stm32::Peripherals; | 9 | use embassy_stm32::Peripherals; |
| 10 | use {defmt_rtt as _, panic_probe as _}; | 10 | use {defmt_rtt as _, panic_probe as _}; |
| 11 | 11 | ||
| 12 | #[embassy::main] | 12 | #[embassy_executor::main] |
| 13 | async fn main(_spawner: Spawner, p: Peripherals) { | 13 | async fn main(_spawner: Spawner, p: Peripherals) { |
| 14 | info!("Hello World!"); | 14 | info!("Hello World!"); |
| 15 | 15 | ||
diff --git a/examples/stm32wl/src/bin/button_exti.rs b/examples/stm32wl/src/bin/button_exti.rs index 7d5c1b3cb..9f143597d 100644 --- a/examples/stm32wl/src/bin/button_exti.rs +++ b/examples/stm32wl/src/bin/button_exti.rs | |||
| @@ -3,13 +3,13 @@ | |||
| 3 | #![feature(type_alias_impl_trait)] | 3 | #![feature(type_alias_impl_trait)] |
| 4 | 4 | ||
| 5 | use defmt::*; | 5 | use defmt::*; |
| 6 | use embassy::executor::Spawner; | 6 | use embassy_executor::executor::Spawner; |
| 7 | use embassy_stm32::exti::ExtiInput; | 7 | use embassy_stm32::exti::ExtiInput; |
| 8 | use embassy_stm32::gpio::{Input, Pull}; | 8 | use embassy_stm32::gpio::{Input, Pull}; |
| 9 | use embassy_stm32::Peripherals; | 9 | use embassy_stm32::Peripherals; |
| 10 | use {defmt_rtt as _, panic_probe as _}; | 10 | use {defmt_rtt as _, panic_probe as _}; |
| 11 | 11 | ||
| 12 | #[embassy::main] | 12 | #[embassy_executor::main] |
| 13 | async fn main(_spawner: Spawner, p: Peripherals) { | 13 | async fn main(_spawner: Spawner, p: Peripherals) { |
| 14 | info!("Hello World!"); | 14 | info!("Hello World!"); |
| 15 | 15 | ||
diff --git a/examples/stm32wl/src/bin/flash.rs b/examples/stm32wl/src/bin/flash.rs index 6531feae9..46183b8a2 100644 --- a/examples/stm32wl/src/bin/flash.rs +++ b/examples/stm32wl/src/bin/flash.rs | |||
| @@ -3,13 +3,13 @@ | |||
| 3 | #![feature(type_alias_impl_trait)] | 3 | #![feature(type_alias_impl_trait)] |
| 4 | 4 | ||
| 5 | use defmt::{info, unwrap}; | 5 | use defmt::{info, unwrap}; |
| 6 | use embassy::executor::Spawner; | 6 | use embassy_executor::executor::Spawner; |
| 7 | use embassy_stm32::flash::Flash; | 7 | use embassy_stm32::flash::Flash; |
| 8 | use embassy_stm32::Peripherals; | 8 | use embassy_stm32::Peripherals; |
| 9 | use embedded_storage::nor_flash::{NorFlash, ReadNorFlash}; | 9 | use embedded_storage::nor_flash::{NorFlash, ReadNorFlash}; |
| 10 | use {defmt_rtt as _, panic_probe as _}; | 10 | use {defmt_rtt as _, panic_probe as _}; |
| 11 | 11 | ||
| 12 | #[embassy::main] | 12 | #[embassy_executor::main] |
| 13 | async fn main(_spawner: Spawner, p: Peripherals) { | 13 | async fn main(_spawner: Spawner, p: Peripherals) { |
| 14 | info!("Hello Flash!"); | 14 | info!("Hello Flash!"); |
| 15 | 15 | ||
diff --git a/examples/stm32wl/src/bin/lorawan.rs b/examples/stm32wl/src/bin/lorawan.rs index 158c17e18..2db022ea2 100644 --- a/examples/stm32wl/src/bin/lorawan.rs +++ b/examples/stm32wl/src/bin/lorawan.rs | |||
| @@ -23,8 +23,8 @@ fn config() -> embassy_stm32::Config { | |||
| 23 | config | 23 | config |
| 24 | } | 24 | } |
| 25 | 25 | ||
| 26 | #[embassy::main(config = "config()")] | 26 | #[embassy_executor::main(config = "config()")] |
| 27 | async fn main(_spawner: embassy::executor::Spawner, p: Peripherals) { | 27 | async fn main(_spawner: embassy_executor::executor::Spawner, p: Peripherals) { |
| 28 | unsafe { pac::RCC.ccipr().modify(|w| w.set_rngsel(0b01)) } | 28 | unsafe { pac::RCC.ccipr().modify(|w| w.set_rngsel(0b01)) } |
| 29 | 29 | ||
| 30 | let ctrl1 = Output::new(p.PC3.degrade(), Level::High, Speed::High); | 30 | let ctrl1 = Output::new(p.PC3.degrade(), Level::High, Speed::High); |
diff --git a/examples/stm32wl/src/bin/subghz.rs b/examples/stm32wl/src/bin/subghz.rs index c5f6e502a..775dfbbfc 100644 --- a/examples/stm32wl/src/bin/subghz.rs +++ b/examples/stm32wl/src/bin/subghz.rs | |||
| @@ -6,13 +6,13 @@ | |||
| 6 | #![feature(type_alias_impl_trait)] | 6 | #![feature(type_alias_impl_trait)] |
| 7 | 7 | ||
| 8 | use defmt::*; | 8 | use defmt::*; |
| 9 | use embassy::channel::signal::Signal; | ||
| 10 | use embassy_stm32::dma::NoDma; | 9 | use embassy_stm32::dma::NoDma; |
| 11 | use embassy_stm32::exti::ExtiInput; | 10 | use embassy_stm32::exti::ExtiInput; |
| 12 | use embassy_stm32::gpio::{Input, Level, Output, Pull, Speed}; | 11 | use embassy_stm32::gpio::{Input, Level, Output, Pull, Speed}; |
| 13 | use embassy_stm32::interrupt::{Interrupt, InterruptExt}; | 12 | use embassy_stm32::interrupt::{Interrupt, InterruptExt}; |
| 14 | use embassy_stm32::subghz::*; | 13 | use embassy_stm32::subghz::*; |
| 15 | use embassy_stm32::{interrupt, Peripherals}; | 14 | use embassy_stm32::{interrupt, Peripherals}; |
| 15 | use embassy_util::channel::signal::Signal; | ||
| 16 | use {defmt_rtt as _, panic_probe as _}; | 16 | use {defmt_rtt as _, panic_probe as _}; |
| 17 | 17 | ||
| 18 | const PING_DATA: &str = "PING"; | 18 | const PING_DATA: &str = "PING"; |
| @@ -57,8 +57,8 @@ fn config() -> embassy_stm32::Config { | |||
| 57 | config | 57 | config |
| 58 | } | 58 | } |
| 59 | 59 | ||
| 60 | #[embassy::main(config = "config()")] | 60 | #[embassy_executor::main(config = "config()")] |
| 61 | async fn main(_spawner: embassy::executor::Spawner, p: Peripherals) { | 61 | async fn main(_spawner: embassy_executor::executor::Spawner, p: Peripherals) { |
| 62 | let mut led1 = Output::new(p.PB15, Level::High, Speed::Low); | 62 | let mut led1 = Output::new(p.PB15, Level::High, Speed::Low); |
| 63 | let mut led2 = Output::new(p.PB9, Level::Low, Speed::Low); | 63 | let mut led2 = Output::new(p.PB9, Level::Low, Speed::Low); |
| 64 | let mut led3 = Output::new(p.PB11, Level::Low, Speed::Low); | 64 | let mut led3 = Output::new(p.PB11, Level::Low, Speed::Low); |
