diff options
| author | eZio Pan <[email protected]> | 2024-02-01 17:10:47 +0800 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2024-02-10 00:00:43 +0100 |
| commit | d538829f2f3542c78ee9eb218c0b5c982acfb46b (patch) | |
| tree | 317e50ed33a5c69cec040f6a56768e58659f50f2 /examples | |
| parent | 53bf0332e9e862fa5c09a1e9ab9a6d7116219ed7 (diff) | |
add methods with macro
Diffstat (limited to 'examples')
| -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..0be3eccb7 100644 --- a/examples/stm32h7/src/bin/low_level_timer_api.rs +++ b/examples/stm32h7/src/bin/low_level_timer_api.rs | |||
| @@ -56,11 +56,11 @@ async fn main(_spawner: Spawner) { | |||
| 56 | Timer::after_millis(300).await; | 56 | Timer::after_millis(300).await; |
| 57 | } | 57 | } |
| 58 | } | 58 | } |
| 59 | pub struct SimplePwm32<'d, T: CaptureCompare32bitInstance> { | 59 | pub struct SimplePwm32<'d, T: GeneralPurpose32bitInstance> { |
| 60 | inner: PeripheralRef<'d, T>, | 60 | inner: PeripheralRef<'d, T>, |
| 61 | } | 61 | } |
| 62 | 62 | ||
| 63 | impl<'d, T: CaptureCompare32bitInstance> SimplePwm32<'d, T> { | 63 | impl<'d, T: GeneralPurpose32bitInstance> SimplePwm32<'d, T> { |
| 64 | pub fn new( | 64 | pub fn new( |
| 65 | tim: impl Peripheral<P = T> + 'd, | 65 | tim: impl Peripheral<P = T> + 'd, |
| 66 | ch1: impl Peripheral<P = impl Channel1Pin<T>> + 'd, | 66 | ch1: impl Peripheral<P = impl Channel1Pin<T>> + 'd, |
