Skip to content

Commit 133ced1

Browse files
author
JD
committed
gating TIM2 PWM declaration to appropriate devices
1 parent f35313d commit 133ced1

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/pwm.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -906,7 +906,21 @@ macro_rules! pwm_1_channel_with_complementary_outputs {
906906

907907
use crate::pac::*;
908908

909+
#[cfg(any(
910+
feature = "stm32f031",
911+
feature = "stm32f038",
912+
feature = "stm32f042",
913+
feature = "stm32f048",
914+
feature = "stm32f051",
915+
feature = "stm32f058",
916+
feature = "stm32f071",
917+
feature = "stm32f072",
918+
feature = "stm32f078",
919+
feature = "stm32f091",
920+
feature = "stm32f098",
921+
))]
909922
pwm_4_channels!(TIM2: (tim2, tim2en, tim2rst, apb1enr, apb1rstr),);
923+
910924
pwm_4_channels!(TIM3: (tim3, tim3en, tim3rst, apb1enr, apb1rstr),);
911925

912926
pwm_4_channels_with_3_complementary_outputs!(TIM1: (tim1, tim1en, tim1rst, apb2enr, apb2rstr),);

0 commit comments

Comments
 (0)