From e056bedd553e7fbc7d28f8f516c87fcd12859aef Mon Sep 17 00:00:00 2001 From: Matous Hybl Date: Wed, 8 Dec 2021 17:39:59 +0100 Subject: Port the PWM example to H7, add low-level API example implementing 32-bit PWM. --- examples/stm32g4/src/bin/pwm.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/stm32g4/src') diff --git a/examples/stm32g4/src/bin/pwm.rs b/examples/stm32g4/src/bin/pwm.rs index 1aa7b85f3..3dd45318d 100644 --- a/examples/stm32g4/src/bin/pwm.rs +++ b/examples/stm32g4/src/bin/pwm.rs @@ -7,7 +7,7 @@ mod example_common; use embassy::executor::Spawner; use embassy::time::{Duration, Timer}; use embassy_stm32::gpio::NoPin; -use embassy_stm32::pwm::{Channel, Pwm}; +use embassy_stm32::pwm::{simple_pwm::SimplePwm, Channel}; use embassy_stm32::time::U32Ext; use embassy_stm32::Peripherals; use example_common::*; @@ -16,7 +16,7 @@ use example_common::*; async fn main(_spawner: Spawner, p: Peripherals) { info!("Hello World!"); - let mut pwm = Pwm::new(p.TIM2, p.PA5, NoPin, NoPin, NoPin, 10000.hz()); + let mut pwm = SimplePwm::new(p.TIM2, p.PA5, NoPin, NoPin, NoPin, 10000.hz()); let max = pwm.get_max_duty(); pwm.enable(Channel::Ch1); -- cgit