diff options
Diffstat (limited to 'examples/stm32wle5/src/bin/button_exti.rs')
| -rw-r--r-- | examples/stm32wle5/src/bin/button_exti.rs | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/examples/stm32wle5/src/bin/button_exti.rs b/examples/stm32wle5/src/bin/button_exti.rs index f248b6147..9ffc39948 100644 --- a/examples/stm32wle5/src/bin/button_exti.rs +++ b/examples/stm32wle5/src/bin/button_exti.rs | |||
| @@ -39,24 +39,6 @@ async fn async_main(_spawner: Spawner) { | |||
| 39 | // Initialize STM32WL peripherals (use default config like wio-e5-async example) | 39 | // Initialize STM32WL peripherals (use default config like wio-e5-async example) |
| 40 | let p = embassy_stm32::init(config); | 40 | let p = embassy_stm32::init(config); |
| 41 | 41 | ||
| 42 | // start with all GPIOs as analog to reduce power consumption | ||
| 43 | for r in [ | ||
| 44 | embassy_stm32::pac::GPIOA, | ||
| 45 | embassy_stm32::pac::GPIOB, | ||
| 46 | embassy_stm32::pac::GPIOC, | ||
| 47 | embassy_stm32::pac::GPIOH, | ||
| 48 | ] { | ||
| 49 | r.moder().modify(|w| { | ||
| 50 | for i in 0..16 { | ||
| 51 | // don't reset these if probe-rs should stay connected! | ||
| 52 | #[cfg(feature = "defmt-rtt")] | ||
| 53 | if config.enable_debug_during_sleep && r == embassy_stm32::pac::GPIOA && [13, 14].contains(&i) { | ||
| 54 | continue; | ||
| 55 | } | ||
| 56 | w.set_moder(i, embassy_stm32::pac::gpio::vals::Moder::ANALOG); | ||
| 57 | } | ||
| 58 | }); | ||
| 59 | } | ||
| 60 | #[cfg(feature = "defmt-serial")] | 42 | #[cfg(feature = "defmt-serial")] |
| 61 | { | 43 | { |
| 62 | use embassy_stm32::mode::Blocking; | 44 | use embassy_stm32::mode::Blocking; |
