diff options
| author | Caleb Garrett <[email protected]> | 2024-02-29 15:21:06 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-02-29 15:21:06 -0500 |
| commit | 998532c33e037368fc3dcfa2ad59f7478c87f6ce (patch) | |
| tree | 653909b504e3786492fbb1f1554ce703ba056fa3 /examples/stm32h7/src/bin/low_level_timer_api.rs | |
| parent | 54f502e5e6a355e0f132f33f3eecd2a0abe298bc (diff) | |
| parent | 715b6d52e08944665728eed160a8408a8fbc4570 (diff) | |
Merge branch 'embassy-rs:main' into cryp
Diffstat (limited to 'examples/stm32h7/src/bin/low_level_timer_api.rs')
| -rw-r--r-- | examples/stm32h7/src/bin/low_level_timer_api.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/stm32h7/src/bin/low_level_timer_api.rs b/examples/stm32h7/src/bin/low_level_timer_api.rs index cc508c3cf..049d9967d 100644 --- a/examples/stm32h7/src/bin/low_level_timer_api.rs +++ b/examples/stm32h7/src/bin/low_level_timer_api.rs | |||
| @@ -113,11 +113,11 @@ impl<'d, T: CaptureCompare32bitInstance> SimplePwm32<'d, T> { | |||
| 113 | } | 113 | } |
| 114 | 114 | ||
| 115 | pub fn get_max_duty(&self) -> u32 { | 115 | pub fn get_max_duty(&self) -> u32 { |
| 116 | T::regs_gp32().arr().read().arr() | 116 | T::regs_gp32().arr().read() |
| 117 | } | 117 | } |
| 118 | 118 | ||
| 119 | pub fn set_duty(&mut self, channel: Channel, duty: u32) { | 119 | pub fn set_duty(&mut self, channel: Channel, duty: u32) { |
| 120 | defmt::assert!(duty < self.get_max_duty()); | 120 | defmt::assert!(duty < self.get_max_duty()); |
| 121 | T::regs_gp32().ccr(channel.index()).modify(|w| w.set_ccr(duty)) | 121 | T::regs_gp32().ccr(channel.index()).write_value(duty) |
| 122 | } | 122 | } |
| 123 | } | 123 | } |
