Skip to content

Commit 66f3a1f

Browse files
authored
gpio: add AF for TIM16 and TIM17
1 parent 8ba57cd commit 66f3a1f

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

hal/src/gpio.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,12 @@ pub(crate) mod sealed {
259259
af_trait!(LpTim3Out, set_lptim3_out_af);
260260
af_trait!(LpTim3Etr, set_lptim3_etr_af);
261261
af_trait!(LpTim3In1, set_lptim3_in1_af);
262+
af_trait!(Tim16Ch1, set_tim16_ch1_af);
263+
af_trait!(Tim16Bkin, set_tim16_bkin_af);
264+
af_trait!(Tim16Ch1n, set_tim16_ch1n_af);
265+
af_trait!(Tim17Ch1, set_tim17_ch1_af);
266+
af_trait!(Tim17Bkin, set_tim17_bkin_af);
267+
af_trait!(Tim17Ch1n, set_tim17_ch1n_af);
262268

263269
/// Indicate a GPIO pin can be sampled by the ADC.
264270
pub trait AdcCh {
@@ -702,6 +708,16 @@ pub mod pins {
702708
impl_af!(LpTim2In1, C0, set_lptim2_in1_af, 14);
703709
impl_af!(LpTim2Etr, C3, set_lptim2_etr_af, 14);
704710

711+
impl_af!(Tim16Ch1, A6, set_tim16_ch1_af, 14);
712+
impl_af!(Tim17Ch1, A7, set_tim17_ch1_af, 14);
713+
impl_af!(Tim17Bkin, A10, set_tim17_bkin_af, 14);
714+
impl_af!(Tim17Bkin, B4, set_tim17_bkin_af, 14);
715+
impl_af!(Tim16Bkin, B5, set_tim16_bkin_af, 14);
716+
impl_af!(Tim16Ch1n, B6, set_tim16_ch1n_af, 14);
717+
impl_af!(Tim17Ch1n, B7, set_tim17_ch1n_af, 14);
718+
impl_af!(Tim16Ch1, B8, set_tim16_ch1_af, 14);
719+
impl_af!(Tim17Ch1, B9, set_tim17_ch1_af, 14);
720+
705721
// keep the trait separate from the pin so that users cant use the ADC_CH
706722
// but are unable to implement the sealed trait themselves
707723
macro_rules! impl_adc_ch {

0 commit comments

Comments
 (0)