diff options
| author | Dario Nieuwenhuis <[email protected]> | 2023-10-20 16:39:30 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-10-20 16:39:30 +0000 |
| commit | b1d0947a18ffaa55d9307b2e563f7e3662486eb9 (patch) | |
| tree | c2b2920f63d83e32dd7f3f2ef18c64d73b997557 /examples | |
| parent | 88ada521461031b7241b09e40aa56f4e64827967 (diff) | |
| parent | 5b3f75dc726afaf21b6c957b88f8eeb0c9ae322c (diff) | |
Merge pull request #1991 from diondokter/center-align
stm32: Add the ability to center-align timers
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/stm32f4/src/bin/pwm.rs | 2 | ||||
| -rw-r--r-- | examples/stm32f4/src/bin/pwm_complementary.rs | 1 | ||||
| -rw-r--r-- | examples/stm32g4/src/bin/pwm.rs | 2 | ||||
| -rw-r--r-- | examples/stm32h7/src/bin/pwm.rs | 2 |
4 files changed, 4 insertions, 3 deletions
diff --git a/examples/stm32f4/src/bin/pwm.rs b/examples/stm32f4/src/bin/pwm.rs index 538427e89..8e41d0e78 100644 --- a/examples/stm32f4/src/bin/pwm.rs +++ b/examples/stm32f4/src/bin/pwm.rs | |||
| @@ -17,7 +17,7 @@ async fn main(_spawner: Spawner) { | |||
| 17 | info!("Hello World!"); | 17 | info!("Hello World!"); |
| 18 | 18 | ||
| 19 | let ch1 = PwmPin::new_ch1(p.PE9, OutputType::PushPull); | 19 | let ch1 = PwmPin::new_ch1(p.PE9, OutputType::PushPull); |
| 20 | let mut pwm = SimplePwm::new(p.TIM1, Some(ch1), None, None, None, khz(10)); | 20 | let mut pwm = SimplePwm::new(p.TIM1, Some(ch1), None, None, None, khz(10), Default::default()); |
| 21 | let max = pwm.get_max_duty(); | 21 | let max = pwm.get_max_duty(); |
| 22 | pwm.enable(Channel::Ch1); | 22 | pwm.enable(Channel::Ch1); |
| 23 | 23 | ||
diff --git a/examples/stm32f4/src/bin/pwm_complementary.rs b/examples/stm32f4/src/bin/pwm_complementary.rs index a8211f6e0..d925f26d9 100644 --- a/examples/stm32f4/src/bin/pwm_complementary.rs +++ b/examples/stm32f4/src/bin/pwm_complementary.rs | |||
| @@ -30,6 +30,7 @@ async fn main(_spawner: Spawner) { | |||
| 30 | None, | 30 | None, |
| 31 | None, | 31 | None, |
| 32 | khz(10), | 32 | khz(10), |
| 33 | Default::default(), | ||
| 33 | ); | 34 | ); |
| 34 | 35 | ||
| 35 | let max = pwm.get_max_duty(); | 36 | let max = pwm.get_max_duty(); |
diff --git a/examples/stm32g4/src/bin/pwm.rs b/examples/stm32g4/src/bin/pwm.rs index eed0b6ad7..a84394005 100644 --- a/examples/stm32g4/src/bin/pwm.rs +++ b/examples/stm32g4/src/bin/pwm.rs | |||
| @@ -17,7 +17,7 @@ async fn main(_spawner: Spawner) { | |||
| 17 | info!("Hello World!"); | 17 | info!("Hello World!"); |
| 18 | 18 | ||
| 19 | let ch1 = PwmPin::new_ch1(p.PC0, OutputType::PushPull); | 19 | let ch1 = PwmPin::new_ch1(p.PC0, OutputType::PushPull); |
| 20 | let mut pwm = SimplePwm::new(p.TIM1, Some(ch1), None, None, None, khz(10)); | 20 | let mut pwm = SimplePwm::new(p.TIM1, Some(ch1), None, None, None, khz(10), Default::default()); |
| 21 | let max = pwm.get_max_duty(); | 21 | let max = pwm.get_max_duty(); |
| 22 | pwm.enable(Channel::Ch1); | 22 | pwm.enable(Channel::Ch1); |
| 23 | 23 | ||
diff --git a/examples/stm32h7/src/bin/pwm.rs b/examples/stm32h7/src/bin/pwm.rs index 3bf373c7e..973a10cdd 100644 --- a/examples/stm32h7/src/bin/pwm.rs +++ b/examples/stm32h7/src/bin/pwm.rs | |||
| @@ -39,7 +39,7 @@ async fn main(_spawner: Spawner) { | |||
| 39 | info!("Hello World!"); | 39 | info!("Hello World!"); |
| 40 | 40 | ||
| 41 | let ch1 = PwmPin::new_ch1(p.PA6, OutputType::PushPull); | 41 | let ch1 = PwmPin::new_ch1(p.PA6, OutputType::PushPull); |
| 42 | let mut pwm = SimplePwm::new(p.TIM3, Some(ch1), None, None, None, khz(10)); | 42 | let mut pwm = SimplePwm::new(p.TIM3, Some(ch1), None, None, None, khz(10), Default::default()); |
| 43 | let max = pwm.get_max_duty(); | 43 | let max = pwm.get_max_duty(); |
| 44 | pwm.enable(Channel::Ch1); | 44 | pwm.enable(Channel::Ch1); |
| 45 | 45 | ||
