aboutsummaryrefslogtreecommitdiff
path: root/docs/modules/ROOT/examples/layer-by-layer/blinky-async
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2022-08-17 18:49:55 +0200
committerDario Nieuwenhuis <[email protected]>2022-08-17 22:16:46 +0200
commitfc6e1e06b305d302d1b7ad17e8ef3a9be986c358 (patch)
tree545ad829660f6053d29a01da286d03ec3d49f5ca /docs/modules/ROOT/examples/layer-by-layer/blinky-async
parentd881f3ad9186cf3279aa1ba27093bad94035c186 (diff)
Remove HAL initialization from #[embassy::main] macro.
Diffstat (limited to 'docs/modules/ROOT/examples/layer-by-layer/blinky-async')
-rw-r--r--docs/modules/ROOT/examples/layer-by-layer/blinky-async/src/main.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/modules/ROOT/examples/layer-by-layer/blinky-async/src/main.rs b/docs/modules/ROOT/examples/layer-by-layer/blinky-async/src/main.rs
index b944a7994..7d62b6107 100644
--- a/docs/modules/ROOT/examples/layer-by-layer/blinky-async/src/main.rs
+++ b/docs/modules/ROOT/examples/layer-by-layer/blinky-async/src/main.rs
@@ -5,11 +5,11 @@
5use embassy_executor::executor::Spawner; 5use embassy_executor::executor::Spawner;
6use embassy_stm32::exti::ExtiInput; 6use embassy_stm32::exti::ExtiInput;
7use embassy_stm32::gpio::{Input, Level, Output, Pull, Speed}; 7use embassy_stm32::gpio::{Input, Level, Output, Pull, Speed};
8use embassy_stm32::Peripherals;
9use {defmt_rtt as _, panic_probe as _}; 8use {defmt_rtt as _, panic_probe as _};
10 9
11#[embassy_executor::main] 10#[embassy_executor::main]
12async fn main(_s: Spawner, p: Peripherals) { 11async fn main(_spawner: Spawner) {
12 let p = embassy_stm32::init(Default::default());
13 let mut led = Output::new(p.PB14, Level::Low, Speed::VeryHigh); 13 let mut led = Output::new(p.PB14, Level::Low, Speed::VeryHigh);
14 let mut button = ExtiInput::new(Input::new(p.PC13, Pull::Up), p.EXTI13); 14 let mut button = ExtiInput::new(Input::new(p.PC13, Pull::Up), p.EXTI13);
15 15