diff options
| author | Bruno Bousquet <[email protected]> | 2024-05-29 09:14:05 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-05-29 09:14:05 -0400 |
| commit | a23fa8dcb2e22ed2d8bac15fd875dfe53af43eda (patch) | |
| tree | 2a81baa9d8164366c6d264de0bde97e4b3515509 /embassy-stm32/src/timer/pwm_input.rs | |
| parent | 7f4803ddaf8f6eeeec45418f23b092bff95222d2 (diff) | |
Apply suggestions from code review
Co-authored-by: Romain Reignier <[email protected]>
Diffstat (limited to 'embassy-stm32/src/timer/pwm_input.rs')
| -rw-r--r-- | embassy-stm32/src/timer/pwm_input.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/embassy-stm32/src/timer/pwm_input.rs b/embassy-stm32/src/timer/pwm_input.rs index d34ba086f..d3fe7632a 100644 --- a/embassy-stm32/src/timer/pwm_input.rs +++ b/embassy-stm32/src/timer/pwm_input.rs | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | //! Input capture driver. | 1 | //! PWM Input driver. |
| 2 | 2 | ||
| 3 | use embassy_hal_internal::into_ref; | 3 | use embassy_hal_internal::into_ref; |
| 4 | 4 | ||
| @@ -8,7 +8,7 @@ use crate::gpio::{AFType, Pull}; | |||
| 8 | use crate::time::Hertz; | 8 | use crate::time::Hertz; |
| 9 | use crate::Peripheral; | 9 | use crate::Peripheral; |
| 10 | 10 | ||
| 11 | /// Input capture driver. | 11 | /// PWM Input driver. |
| 12 | pub struct PwmInput<'d, T: GeneralInstance4Channel> { | 12 | pub struct PwmInput<'d, T: GeneralInstance4Channel> { |
| 13 | channel: Channel, | 13 | channel: Channel, |
| 14 | inner: Timer<'d, T>, | 14 | inner: Timer<'d, T>, |
| @@ -20,7 +20,7 @@ fn regs_gp16(ptr: *mut ()) -> crate::pac::timer::TimGp16 { | |||
| 20 | } | 20 | } |
| 21 | 21 | ||
| 22 | impl<'d, T: GeneralInstance4Channel> PwmInput<'d, T> { | 22 | impl<'d, T: GeneralInstance4Channel> PwmInput<'d, T> { |
| 23 | /// Create a new input capture driver. | 23 | /// Create a new PWM input driver. |
| 24 | pub fn new( | 24 | pub fn new( |
| 25 | tim: impl Peripheral<P = T> + 'd, | 25 | tim: impl Peripheral<P = T> + 'd, |
| 26 | pin: impl Peripheral<P = impl Channel1Pin<T>> + 'd, | 26 | pin: impl Peripheral<P = impl Channel1Pin<T>> + 'd, |
| @@ -37,7 +37,7 @@ impl<'d, T: GeneralInstance4Channel> PwmInput<'d, T> { | |||
| 37 | Self::new_inner(tim, freq, Channel::Ch1, Channel::Ch2) | 37 | Self::new_inner(tim, freq, Channel::Ch1, Channel::Ch2) |
| 38 | } | 38 | } |
| 39 | 39 | ||
| 40 | /// Create a new input capture driver. | 40 | /// Create a new PWM input driver. |
| 41 | pub fn new_alt( | 41 | pub fn new_alt( |
| 42 | tim: impl Peripheral<P = T> + 'd, | 42 | tim: impl Peripheral<P = T> + 'd, |
| 43 | pin: impl Peripheral<P = impl Channel2Pin<T>> + 'd, | 43 | pin: impl Peripheral<P = impl Channel2Pin<T>> + 'd, |
