diff options
| author | melvdl <[email protected]> | 2025-06-27 01:08:45 +0200 |
|---|---|---|
| committer | melvdl <[email protected]> | 2025-06-27 01:08:45 +0200 |
| commit | 41327c1325367177548dabc644636617274de7f4 (patch) | |
| tree | b389d87f80f0843db946635837691982e41740a0 /examples/stm32l0/src/bin/dds.rs | |
| parent | 6f88c2c73caa63a6e534130f4a064cb95d3e9d7d (diff) | |
stm32: adapt examples to timer API changes
Diffstat (limited to 'examples/stm32l0/src/bin/dds.rs')
| -rw-r--r-- | examples/stm32l0/src/bin/dds.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/stm32l0/src/bin/dds.rs b/examples/stm32l0/src/bin/dds.rs index a54b28a93..eaa7a61a8 100644 --- a/examples/stm32l0/src/bin/dds.rs +++ b/examples/stm32l0/src/bin/dds.rs | |||
| @@ -11,7 +11,7 @@ use embassy_stm32::rcc::*; | |||
| 11 | use embassy_stm32::time::hz; | 11 | use embassy_stm32::time::hz; |
| 12 | use embassy_stm32::timer::low_level::{Timer as LLTimer, *}; | 12 | use embassy_stm32::timer::low_level::{Timer as LLTimer, *}; |
| 13 | use embassy_stm32::timer::simple_pwm::PwmPin; | 13 | use embassy_stm32::timer::simple_pwm::PwmPin; |
| 14 | use embassy_stm32::timer::Channel; | 14 | use embassy_stm32::timer::{Ch3, Channel}; |
| 15 | use embassy_stm32::{interrupt, pac, Config}; | 15 | use embassy_stm32::{interrupt, pac, Config}; |
| 16 | use panic_probe as _; | 16 | use panic_probe as _; |
| 17 | 17 | ||
| @@ -70,7 +70,7 @@ async fn main(_spawner: Spawner) { | |||
| 70 | let p = embassy_stm32::init(config); | 70 | let p = embassy_stm32::init(config); |
| 71 | 71 | ||
| 72 | // setup PWM pin in AF mode | 72 | // setup PWM pin in AF mode |
| 73 | let _ch3 = PwmPin::new_ch3(p.PA2, OutputType::PushPull); | 73 | let _ch3 = PwmPin::<_, Ch3>::new(p.PA2, OutputType::PushPull); |
| 74 | 74 | ||
| 75 | // initialize timer | 75 | // initialize timer |
| 76 | // we cannot use SimplePWM here because the Time is privately encapsulated | 76 | // we cannot use SimplePWM here because the Time is privately encapsulated |
