aboutsummaryrefslogtreecommitdiff
path: root/docs/examples/layer-by-layer
diff options
context:
space:
mode:
authorRaul Alimbekov <[email protected]>2025-12-16 09:05:22 +0300
committerGitHub <[email protected]>2025-12-16 09:05:22 +0300
commitc9a04b4b732b7a3b696eb8223664c1a7942b1875 (patch)
tree6dbe5c02e66eed8d8762f13f95afd24f8db2b38c /docs/examples/layer-by-layer
parentcde24a3ef1117653ba5ed4184102b33f745782fb (diff)
parent5ae6e060ec1c90561719aabdc29d5b6e7b8b0a82 (diff)
Merge branch 'main' into main
Diffstat (limited to 'docs/examples/layer-by-layer')
-rw-r--r--docs/examples/layer-by-layer/blinky-async/Cargo.toml2
-rw-r--r--docs/examples/layer-by-layer/blinky-async/src/main.rs10
-rw-r--r--docs/examples/layer-by-layer/blinky-hal/Cargo.toml2
-rw-r--r--docs/examples/layer-by-layer/blinky-irq/Cargo.toml2
-rw-r--r--docs/examples/layer-by-layer/blinky-pac/Cargo.toml2
5 files changed, 12 insertions, 6 deletions
diff --git a/docs/examples/layer-by-layer/blinky-async/Cargo.toml b/docs/examples/layer-by-layer/blinky-async/Cargo.toml
index ec718022c..797ae3097 100644
--- a/docs/examples/layer-by-layer/blinky-async/Cargo.toml
+++ b/docs/examples/layer-by-layer/blinky-async/Cargo.toml
@@ -1,7 +1,7 @@
1[package] 1[package]
2name = "blinky-async" 2name = "blinky-async"
3version = "0.1.0" 3version = "0.1.0"
4edition = "2021" 4edition = "2024"
5license = "MIT OR Apache-2.0" 5license = "MIT OR Apache-2.0"
6 6
7publish = false 7publish = false
diff --git a/docs/examples/layer-by-layer/blinky-async/src/main.rs b/docs/examples/layer-by-layer/blinky-async/src/main.rs
index 004602816..007f7da46 100644
--- a/docs/examples/layer-by-layer/blinky-async/src/main.rs
+++ b/docs/examples/layer-by-layer/blinky-async/src/main.rs
@@ -2,15 +2,21 @@
2#![no_main] 2#![no_main]
3 3
4use embassy_executor::Spawner; 4use embassy_executor::Spawner;
5use embassy_stm32::exti::ExtiInput; 5use embassy_stm32::exti::{self, ExtiInput};
6use embassy_stm32::gpio::{Level, Output, Pull, Speed}; 6use embassy_stm32::gpio::{Level, Output, Pull, Speed};
7use embassy_stm32::{bind_interrupts, interrupt};
7use {defmt_rtt as _, panic_probe as _}; 8use {defmt_rtt as _, panic_probe as _};
8 9
10bind_interrupts!(
11 pub struct Irqs{
12 EXTI15_10 => exti::InterruptHandler<interrupt::typelevel::EXTI15_10 >;
13});
14
9#[embassy_executor::main] 15#[embassy_executor::main]
10async fn main(_spawner: Spawner) { 16async fn main(_spawner: Spawner) {
11 let p = embassy_stm32::init(Default::default()); 17 let p = embassy_stm32::init(Default::default());
12 let mut led = Output::new(p.PB14, Level::Low, Speed::VeryHigh); 18 let mut led = Output::new(p.PB14, Level::Low, Speed::VeryHigh);
13 let mut button = ExtiInput::new(p.PC13, p.EXTI13, Pull::Up); 19 let mut button = ExtiInput::new(p.PC13, p.EXTI13, Pull::Up, Irqs);
14 20
15 loop { 21 loop {
16 button.wait_for_any_edge().await; 22 button.wait_for_any_edge().await;
diff --git a/docs/examples/layer-by-layer/blinky-hal/Cargo.toml b/docs/examples/layer-by-layer/blinky-hal/Cargo.toml
index 4a0b03a83..802b8b32e 100644
--- a/docs/examples/layer-by-layer/blinky-hal/Cargo.toml
+++ b/docs/examples/layer-by-layer/blinky-hal/Cargo.toml
@@ -1,7 +1,7 @@
1[package] 1[package]
2name = "blinky-hal" 2name = "blinky-hal"
3version = "0.1.0" 3version = "0.1.0"
4edition = "2021" 4edition = "2024"
5license = "MIT OR Apache-2.0" 5license = "MIT OR Apache-2.0"
6 6
7publish = false 7publish = false
diff --git a/docs/examples/layer-by-layer/blinky-irq/Cargo.toml b/docs/examples/layer-by-layer/blinky-irq/Cargo.toml
index 3c4bf8446..d1b893a1e 100644
--- a/docs/examples/layer-by-layer/blinky-irq/Cargo.toml
+++ b/docs/examples/layer-by-layer/blinky-irq/Cargo.toml
@@ -3,7 +3,7 @@
3[package] 3[package]
4name = "blinky-irq" 4name = "blinky-irq"
5version = "0.1.0" 5version = "0.1.0"
6edition = "2021" 6edition = "2024"
7license = "MIT OR Apache-2.0" 7license = "MIT OR Apache-2.0"
8 8
9publish = false 9publish = false
diff --git a/docs/examples/layer-by-layer/blinky-pac/Cargo.toml b/docs/examples/layer-by-layer/blinky-pac/Cargo.toml
index 0d4711da2..fa093a3af 100644
--- a/docs/examples/layer-by-layer/blinky-pac/Cargo.toml
+++ b/docs/examples/layer-by-layer/blinky-pac/Cargo.toml
@@ -1,7 +1,7 @@
1[package] 1[package]
2name = "blinky-pac" 2name = "blinky-pac"
3version = "0.1.0" 3version = "0.1.0"
4edition = "2021" 4edition = "2024"
5license = "MIT OR Apache-2.0" 5license = "MIT OR Apache-2.0"
6 6
7publish = false 7publish = false