aboutsummaryrefslogtreecommitdiff
path: root/examples/stm32h5/src
diff options
context:
space:
mode:
authorxoviat <[email protected]>2025-11-16 07:50:49 -0600
committerxoviat <[email protected]>2025-11-16 07:50:49 -0600
commit29d4ade2866e6c8d2114b393853354ded1e61db7 (patch)
tree13d38bc6cce8f71ceccbde7877ffe66a8643e30d /examples/stm32h5/src
parenta51533c0b4edd551a1b9587b9272026b0b256d54 (diff)
low_power: misc cleanups and allow main macro
Diffstat (limited to 'examples/stm32h5/src')
-rw-r--r--examples/stm32h5/src/bin/stop.rs12
1 files changed, 2 insertions, 10 deletions
diff --git a/examples/stm32h5/src/bin/stop.rs b/examples/stm32h5/src/bin/stop.rs
index caebc9daf..8d5456b80 100644
--- a/examples/stm32h5/src/bin/stop.rs
+++ b/examples/stm32h5/src/bin/stop.rs
@@ -7,20 +7,12 @@
7use defmt::*; 7use defmt::*;
8use embassy_executor::Spawner; 8use embassy_executor::Spawner;
9use embassy_stm32::gpio::{AnyPin, Level, Output, Speed}; 9use embassy_stm32::gpio::{AnyPin, Level, Output, Speed};
10use embassy_stm32::low_power::Executor;
11use embassy_stm32::rcc::{HSIPrescaler, LsConfig}; 10use embassy_stm32::rcc::{HSIPrescaler, LsConfig};
12use embassy_stm32::{Config, Peri}; 11use embassy_stm32::{Config, Peri, low_power};
13use embassy_time::Timer; 12use embassy_time::Timer;
14use {defmt_rtt as _, panic_probe as _}; 13use {defmt_rtt as _, panic_probe as _};
15 14
16#[cortex_m_rt::entry] 15#[embassy_executor::main(executor = "low_power::Executor")]
17fn main() -> ! {
18 Executor::take().run(|spawner| {
19 spawner.spawn(unwrap!(async_main(spawner)));
20 })
21}
22
23#[embassy_executor::task]
24async fn async_main(spawner: Spawner) { 16async fn async_main(spawner: Spawner) {
25 defmt::info!("Program Start"); 17 defmt::info!("Program Start");
26 18