aboutsummaryrefslogtreecommitdiff
path: root/examples/stm32wle5/src/bin/blinky.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/stm32wle5/src/bin/blinky.rs')
-rw-r--r--examples/stm32wle5/src/bin/blinky.rs22
1 files changed, 2 insertions, 20 deletions
diff --git a/examples/stm32wle5/src/bin/blinky.rs b/examples/stm32wle5/src/bin/blinky.rs
index 9f0c04672..3b7eb7761 100644
--- a/examples/stm32wle5/src/bin/blinky.rs
+++ b/examples/stm32wle5/src/bin/blinky.rs
@@ -32,24 +32,6 @@ async fn async_main(_spawner: Spawner) {
32 // Initialize STM32WL peripherals (use default config like wio-e5-async example) 32 // Initialize STM32WL peripherals (use default config like wio-e5-async example)
33 let p = embassy_stm32::init(config); 33 let p = embassy_stm32::init(config);
34 34
35 // start with all GPIOs as analog to reduce power consumption
36 for r in [
37 embassy_stm32::pac::GPIOA,
38 embassy_stm32::pac::GPIOB,
39 embassy_stm32::pac::GPIOC,
40 embassy_stm32::pac::GPIOH,
41 ] {
42 r.moder().modify(|w| {
43 for i in 0..16 {
44 // don't reset these if probe-rs should stay connected!
45 #[cfg(feature = "defmt-rtt")]
46 if config.enable_debug_during_sleep && r == embassy_stm32::pac::GPIOA && [13, 14].contains(&i) {
47 continue;
48 }
49 w.set_moder(i, embassy_stm32::pac::gpio::vals::Moder::ANALOG);
50 }
51 });
52 }
53 #[cfg(feature = "defmt-serial")] 35 #[cfg(feature = "defmt-serial")]
54 { 36 {
55 use embassy_stm32::mode::Blocking; 37 use embassy_stm32::mode::Blocking;
@@ -67,10 +49,10 @@ async fn async_main(_spawner: Spawner) {
67 loop { 49 loop {
68 info!("low"); 50 info!("low");
69 led.set_low(); 51 led.set_low();
70 Timer::after_millis(500).await; 52 Timer::after_millis(15000).await;
71 53
72 info!("high"); 54 info!("high");
73 led.set_high(); 55 led.set_high();
74 Timer::after_millis(500).await; 56 Timer::after_millis(15000).await;
75 } 57 }
76} 58}