aboutsummaryrefslogtreecommitdiff
path: root/examples/stm32h7/src/bin/low_level_timer_api.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/stm32h7/src/bin/low_level_timer_api.rs')
-rw-r--r--examples/stm32h7/src/bin/low_level_timer_api.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/stm32h7/src/bin/low_level_timer_api.rs b/examples/stm32h7/src/bin/low_level_timer_api.rs
index f2477c7a7..e759c47a8 100644
--- a/examples/stm32h7/src/bin/low_level_timer_api.rs
+++ b/examples/stm32h7/src/bin/low_level_timer_api.rs
@@ -9,7 +9,7 @@ use embassy_stm32::gpio::low_level::AFType;
9use embassy_stm32::gpio::Speed; 9use embassy_stm32::gpio::Speed;
10use embassy_stm32::pwm::*; 10use embassy_stm32::pwm::*;
11use embassy_stm32::time::{khz, mhz, Hertz}; 11use embassy_stm32::time::{khz, mhz, Hertz};
12use embassy_stm32::{into_ref, Config, Peripheral, PeripheralRef, Peripherals}; 12use embassy_stm32::{into_ref, Config, Peripheral, PeripheralRef};
13use {defmt_rtt as _, panic_probe as _}; 13use {defmt_rtt as _, panic_probe as _};
14 14
15pub fn config() -> Config { 15pub fn config() -> Config {
@@ -24,8 +24,9 @@ pub fn config() -> Config {
24 config 24 config
25} 25}
26 26
27#[embassy_executor::main(config = "config()")] 27#[embassy_executor::main]
28async fn main(_spawner: Spawner, p: Peripherals) { 28async fn main(_spawner: Spawner) {
29 let p = embassy_stm32::init(config());
29 info!("Hello World!"); 30 info!("Hello World!");
30 31
31 let mut pwm = SimplePwm32::new(p.TIM5, p.PA0, p.PA1, p.PA2, p.PA3, khz(10)); 32 let mut pwm = SimplePwm32::new(p.TIM5, p.PA0, p.PA1, p.PA2, p.PA3, khz(10));