diff options
| author | Dario Nieuwenhuis <[email protected]> | 2025-09-06 00:11:59 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2025-09-06 00:14:03 +0200 |
| commit | a23c4b7bca15bc00f4b5c4af200f17eb0097e94b (patch) | |
| tree | f293891a3dad44dc808f31f7aa6fd7fcdb21bbe5 /embassy-stm32/src/hrtim | |
| parent | 35f4ae378cbc9a1263e46baaeac536cae2337896 (diff) | |
stm32/afio: make af_num() unavailable in afio chips.
Diffstat (limited to 'embassy-stm32/src/hrtim')
| -rw-r--r-- | embassy-stm32/src/hrtim/mod.rs | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/embassy-stm32/src/hrtim/mod.rs b/embassy-stm32/src/hrtim/mod.rs index 1d0594125..6fece5eb2 100644 --- a/embassy-stm32/src/hrtim/mod.rs +++ b/embassy-stm32/src/hrtim/mod.rs | |||
| @@ -79,10 +79,7 @@ macro_rules! advanced_channel_impl { | |||
| 79 | pub fn $new_chx(pin: Peri<'d, impl $pin_trait<T>>) -> Self { | 79 | pub fn $new_chx(pin: Peri<'d, impl $pin_trait<T>>) -> Self { |
| 80 | critical_section::with(|_| { | 80 | critical_section::with(|_| { |
| 81 | pin.set_low(); | 81 | pin.set_low(); |
| 82 | pin.set_as_af( | 82 | set_as_af!(pin, AfType::output(OutputType::PushPull, Speed::VeryHigh)); |
| 83 | pin.af_num(), | ||
| 84 | AfType::output(OutputType::PushPull, Speed::VeryHigh), | ||
| 85 | ); | ||
| 86 | }); | 83 | }); |
| 87 | PwmPin { | 84 | PwmPin { |
| 88 | _pin: pin.into(), | 85 | _pin: pin.into(), |
| @@ -96,10 +93,7 @@ macro_rules! advanced_channel_impl { | |||
| 96 | pub fn $new_chx(pin: Peri<'d, impl $complementary_pin_trait<T>>) -> Self { | 93 | pub fn $new_chx(pin: Peri<'d, impl $complementary_pin_trait<T>>) -> Self { |
| 97 | critical_section::with(|_| { | 94 | critical_section::with(|_| { |
| 98 | pin.set_low(); | 95 | pin.set_low(); |
| 99 | pin.set_as_af( | 96 | set_as_af!(pin, AfType::output(OutputType::PushPull, Speed::VeryHigh)); |
| 100 | pin.af_num(), | ||
| 101 | AfType::output(OutputType::PushPull, Speed::VeryHigh), | ||
| 102 | ); | ||
| 103 | }); | 97 | }); |
| 104 | ComplementaryPwmPin { | 98 | ComplementaryPwmPin { |
| 105 | _pin: pin.into(), | 99 | _pin: pin.into(), |
