@@ -178,7 +178,7 @@ pub trait HrPwmAdvExt: Sized {
178
178
self ,
179
179
_pins : PINS ,
180
180
rcc : & mut Rcc ,
181
- ) -> HrPwmBuilder < Self , Pscl128 , Self :: PreloadSource , PINS >
181
+ ) -> HrPwmBuilder < Self , PsclDefault , Self :: PreloadSource , PINS >
182
182
where
183
183
PINS : ToHrOut < Self > ;
184
184
}
@@ -551,7 +551,7 @@ macro_rules! hrtim_hal {
551
551
self ,
552
552
pins: PINS ,
553
553
_rcc: & mut Rcc ,
554
- ) -> HrPwmBuilder <Self , Pscl128 , Self :: PreloadSource , PINS >
554
+ ) -> HrPwmBuilder <Self , PsclDefault , Self :: PreloadSource , PINS >
555
555
where
556
556
PINS : ToHrOut <$TIMX>,
557
557
{
@@ -705,7 +705,7 @@ impl HrPwmAdvExt for HRTIM_MASTER {
705
705
self ,
706
706
pins : PINS ,
707
707
_rcc : & mut Rcc ,
708
- ) -> HrPwmBuilder < Self , Pscl128 , Self :: PreloadSource , PINS >
708
+ ) -> HrPwmBuilder < Self , PsclDefault , Self :: PreloadSource , PINS >
709
709
where
710
710
PINS : ToHrOut < HRTIM_MASTER > ,
711
711
{
@@ -815,6 +815,13 @@ macro_rules! impl_pscl {
815
815
) +} ;
816
816
}
817
817
818
+ #[ cfg( any( feature = "stm32f3" , feature = "stm32g4" ) ) ]
819
+ pub type PsclDefault = Pscl128 ;
820
+
821
+ #[ cfg( feature = "stm32h7" ) ]
822
+ pub type PsclDefault = Pscl4 ;
823
+
824
+ #[ cfg( any( feature = "stm32f3" , feature = "stm32g4" ) ) ]
818
825
impl_pscl ! {
819
826
Pscl1 => 0b000 , 1 , 0x0060 , 0xFFDF
820
827
Pscl2 => 0b001 , 2 , 0x0030 , 0xFFEF
@@ -826,6 +833,13 @@ impl_pscl! {
826
833
Pscl128 => 0b111 , 128 , 0x0003 , 0xFFFD
827
834
}
828
835
836
+ #[ cfg( feature = "stm32h7" ) ]
837
+ impl_pscl ! {
838
+ Pscl1 => 0b101 , 1 , 0x0003 , 0xFFFD
839
+ Pscl2 => 0b110 , 2 , 0x0003 , 0xFFFD
840
+ Pscl4 => 0b111 , 4 , 0x0003 , 0xFFFD
841
+ }
842
+
829
843
/*
830
844
/// HrTim timer
831
845
struct TimerHrTim<PSC>(PhantomData<PSC>);
0 commit comments