aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2025-01-07 20:44:11 +0100
committerDario Nieuwenhuis <[email protected]>2025-01-07 20:46:08 +0100
commit103bb0dfaad02f8391872bfdbc6a7a26591aca11 (patch)
tree6784ac9551c06166658d29cb19061818c7ba8b0e /examples
parent2fecaeb0d0e560120bd7370308440ee05e704d4d (diff)
stm32: generate singletons only for pins that actually exist.
Before we'd generate all pins Px0..Px15 for each GPIOx port. This changes codegen to only generate singletons for actually-existing pins. (AFs were already previously filtered, so these non-existing pins were already mostly useless)
Diffstat (limited to 'examples')
-rw-r--r--examples/stm32u0/src/bin/spi.rs2
-rw-r--r--examples/stm32u5/src/bin/blinky.rs3
2 files changed, 3 insertions, 2 deletions
diff --git a/examples/stm32u0/src/bin/spi.rs b/examples/stm32u0/src/bin/spi.rs
index 5693a3765..e03591daf 100644
--- a/examples/stm32u0/src/bin/spi.rs
+++ b/examples/stm32u0/src/bin/spi.rs
@@ -18,7 +18,7 @@ fn main() -> ! {
18 18
19 let mut spi = Spi::new_blocking(p.SPI3, p.PC10, p.PC12, p.PC11, spi_config); 19 let mut spi = Spi::new_blocking(p.SPI3, p.PC10, p.PC12, p.PC11, spi_config);
20 20
21 let mut cs = Output::new(p.PE0, Level::High, Speed::VeryHigh); 21 let mut cs = Output::new(p.PC13, Level::High, Speed::VeryHigh);
22 22
23 loop { 23 loop {
24 let mut buf = [0x0Au8; 4]; 24 let mut buf = [0x0Au8; 4];
diff --git a/examples/stm32u5/src/bin/blinky.rs b/examples/stm32u5/src/bin/blinky.rs
index 7fe88c183..1fdfc7679 100644
--- a/examples/stm32u5/src/bin/blinky.rs
+++ b/examples/stm32u5/src/bin/blinky.rs
@@ -12,7 +12,8 @@ async fn main(_spawner: Spawner) -> ! {
12 let p = embassy_stm32::init(Default::default()); 12 let p = embassy_stm32::init(Default::default());
13 info!("Hello World!"); 13 info!("Hello World!");
14 14
15 let mut led = Output::new(p.PH7, Level::Low, Speed::Medium); 15 // replace PC13 with the right pin for your board.
16 let mut led = Output::new(p.PC13, Level::Low, Speed::Medium);
16 17
17 loop { 18 loop {
18 defmt::info!("on!"); 19 defmt::info!("on!");