aboutsummaryrefslogtreecommitdiff
path: root/examples/stm32wl/src
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2022-07-29 21:58:35 +0200
committerDario Nieuwenhuis <[email protected]>2022-07-29 23:40:36 +0200
commita0f1b0ee01d461607660d2d56b5b1bdc57e0d3fb (patch)
treee60fc8f8db8ec07e55d655c1a830b07f4db0b7d2 /examples/stm32wl/src
parent8745d646f0976791b7098456aa61adb983fb1c18 (diff)
Split embassy crate into embassy-executor, embassy-util.
Diffstat (limited to 'examples/stm32wl/src')
-rw-r--r--examples/stm32wl/src/bin/blinky.rs6
-rw-r--r--examples/stm32wl/src/bin/button_exti.rs4
-rw-r--r--examples/stm32wl/src/bin/flash.rs4
-rw-r--r--examples/stm32wl/src/bin/lorawan.rs4
-rw-r--r--examples/stm32wl/src/bin/subghz.rs6
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
5use defmt::*; 5use defmt::*;
6use embassy::executor::Spawner; 6use embassy_executor::executor::Spawner;
7use embassy::time::{Duration, Timer}; 7use embassy_executor::time::{Duration, Timer};
8use embassy_stm32::gpio::{Level, Output, Speed}; 8use embassy_stm32::gpio::{Level, Output, Speed};
9use embassy_stm32::Peripherals; 9use embassy_stm32::Peripherals;
10use {defmt_rtt as _, panic_probe as _}; 10use {defmt_rtt as _, panic_probe as _};
11 11
12#[embassy::main] 12#[embassy_executor::main]
13async fn main(_spawner: Spawner, p: Peripherals) { 13async 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
5use defmt::*; 5use defmt::*;
6use embassy::executor::Spawner; 6use embassy_executor::executor::Spawner;
7use embassy_stm32::exti::ExtiInput; 7use embassy_stm32::exti::ExtiInput;
8use embassy_stm32::gpio::{Input, Pull}; 8use embassy_stm32::gpio::{Input, Pull};
9use embassy_stm32::Peripherals; 9use embassy_stm32::Peripherals;
10use {defmt_rtt as _, panic_probe as _}; 10use {defmt_rtt as _, panic_probe as _};
11 11
12#[embassy::main] 12#[embassy_executor::main]
13async fn main(_spawner: Spawner, p: Peripherals) { 13async 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
5use defmt::{info, unwrap}; 5use defmt::{info, unwrap};
6use embassy::executor::Spawner; 6use embassy_executor::executor::Spawner;
7use embassy_stm32::flash::Flash; 7use embassy_stm32::flash::Flash;
8use embassy_stm32::Peripherals; 8use embassy_stm32::Peripherals;
9use embedded_storage::nor_flash::{NorFlash, ReadNorFlash}; 9use embedded_storage::nor_flash::{NorFlash, ReadNorFlash};
10use {defmt_rtt as _, panic_probe as _}; 10use {defmt_rtt as _, panic_probe as _};
11 11
12#[embassy::main] 12#[embassy_executor::main]
13async fn main(_spawner: Spawner, p: Peripherals) { 13async 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()")]
27async fn main(_spawner: embassy::executor::Spawner, p: Peripherals) { 27async 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
8use defmt::*; 8use defmt::*;
9use embassy::channel::signal::Signal;
10use embassy_stm32::dma::NoDma; 9use embassy_stm32::dma::NoDma;
11use embassy_stm32::exti::ExtiInput; 10use embassy_stm32::exti::ExtiInput;
12use embassy_stm32::gpio::{Input, Level, Output, Pull, Speed}; 11use embassy_stm32::gpio::{Input, Level, Output, Pull, Speed};
13use embassy_stm32::interrupt::{Interrupt, InterruptExt}; 12use embassy_stm32::interrupt::{Interrupt, InterruptExt};
14use embassy_stm32::subghz::*; 13use embassy_stm32::subghz::*;
15use embassy_stm32::{interrupt, Peripherals}; 14use embassy_stm32::{interrupt, Peripherals};
15use embassy_util::channel::signal::Signal;
16use {defmt_rtt as _, panic_probe as _}; 16use {defmt_rtt as _, panic_probe as _};
17 17
18const PING_DATA: &str = "PING"; 18const 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()")]
61async fn main(_spawner: embassy::executor::Spawner, p: Peripherals) { 61async 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);