aboutsummaryrefslogtreecommitdiff
path: root/docs/modules/ROOT/examples/layer-by-layer/blinky-async/src
diff options
context:
space:
mode:
Diffstat (limited to 'docs/modules/ROOT/examples/layer-by-layer/blinky-async/src')
-rw-r--r--docs/modules/ROOT/examples/layer-by-layer/blinky-async/src/main.rs23
1 files changed, 0 insertions, 23 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
deleted file mode 100644
index 004602816..000000000
--- a/docs/modules/ROOT/examples/layer-by-layer/blinky-async/src/main.rs
+++ /dev/null
@@ -1,23 +0,0 @@
1#![no_std]
2#![no_main]
3
4use embassy_executor::Spawner;
5use embassy_stm32::exti::ExtiInput;
6use embassy_stm32::gpio::{Level, Output, Pull, Speed};
7use {defmt_rtt as _, panic_probe as _};
8
9#[embassy_executor::main]
10async fn main(_spawner: Spawner) {
11 let p = embassy_stm32::init(Default::default());
12 let mut led = Output::new(p.PB14, Level::Low, Speed::VeryHigh);
13 let mut button = ExtiInput::new(p.PC13, p.EXTI13, Pull::Up);
14
15 loop {
16 button.wait_for_any_edge().await;
17 if button.is_low() {
18 led.set_high();
19 } else {
20 led.set_low();
21 }
22 }
23}