aboutsummaryrefslogtreecommitdiff
path: root/examples/stm32g4/src
diff options
context:
space:
mode:
Diffstat (limited to 'examples/stm32g4/src')
-rw-r--r--examples/stm32g4/src/bin/pwm.rs4
1 files changed, 2 insertions, 2 deletions
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;
7use embassy::executor::Spawner; 7use embassy::executor::Spawner;
8use embassy::time::{Duration, Timer}; 8use embassy::time::{Duration, Timer};
9use embassy_stm32::gpio::NoPin; 9use embassy_stm32::gpio::NoPin;
10use embassy_stm32::pwm::{Channel, Pwm}; 10use embassy_stm32::pwm::{simple_pwm::SimplePwm, Channel};
11use embassy_stm32::time::U32Ext; 11use embassy_stm32::time::U32Ext;
12use embassy_stm32::Peripherals; 12use embassy_stm32::Peripherals;
13use example_common::*; 13use example_common::*;
@@ -16,7 +16,7 @@ use example_common::*;
16async fn main(_spawner: Spawner, p: Peripherals) { 16async fn main(_spawner: Spawner, p: Peripherals) {
17 info!("Hello World!"); 17 info!("Hello World!");
18 18
19 let mut pwm = Pwm::new(p.TIM2, p.PA5, NoPin, NoPin, NoPin, 10000.hz()); 19 let mut pwm = SimplePwm::new(p.TIM2, p.PA5, NoPin, NoPin, NoPin, 10000.hz());
20 let max = pwm.get_max_duty(); 20 let max = pwm.get_max_duty();
21 pwm.enable(Channel::Ch1); 21 pwm.enable(Channel::Ch1);
22 22