@@ -373,13 +373,21 @@ mod common {
373
373
}
374
374
375
375
pub ( super ) fn get_clock( clocks: & CoreClocks ) -> Option <Hertz > {
376
- let d1ccipr = unsafe { ( * stm32:: RCC :: ptr( ) ) . d1ccipr. read( ) } ;
377
-
378
- match d1ccipr. $ccip( ) . variant( ) {
379
- stm32:: rcc:: d1ccipr:: [ < $ccip: upper _A >] :: RCC_HCLK3 => Some ( clocks. hclk( ) ) ,
380
- stm32:: rcc:: d1ccipr:: [ < $ccip: upper _A >] :: PLL1_Q => clocks. pll1_q_ck( ) ,
381
- stm32:: rcc:: d1ccipr:: [ < $ccip: upper _A >] :: PLL2_R => clocks. pll2_r_ck( ) ,
382
- stm32:: rcc:: d1ccipr:: [ < $ccip: upper _A >] :: PER => clocks. per_ck( ) ,
376
+ #[ cfg( not( feature = "rm0455" ) ) ]
377
+ use stm32:: rcc:: d1ccipr as ccipr;
378
+ #[ cfg( feature = "rm0455" ) ]
379
+ use stm32:: rcc:: cdccipr as ccipr;
380
+
381
+ #[ cfg( not( feature = "rm0455" ) ) ]
382
+ let ccipr = unsafe { ( * stm32:: RCC :: ptr( ) ) . d1ccipr. read( ) } ;
383
+ #[ cfg( feature = "rm0455" ) ]
384
+ let ccipr = unsafe { ( * stm32:: RCC :: ptr( ) ) . cdccipr. read( ) } ;
385
+
386
+ match ccipr. $ccip( ) . variant( ) {
387
+ ccipr:: [ < $ccip: upper _A >] :: RCC_HCLK3 => Some ( clocks. hclk( ) ) ,
388
+ ccipr:: [ < $ccip: upper _A >] :: PLL1_Q => clocks. pll1_q_ck( ) ,
389
+ ccipr:: [ < $ccip: upper _A >] :: PLL2_R => clocks. pll2_r_ck( ) ,
390
+ ccipr:: [ < $ccip: upper _A >] :: PER => clocks. per_ck( ) ,
383
391
}
384
392
}
385
393
@@ -795,7 +803,7 @@ mod common {
795
803
#[ cfg( any( feature = "rm0433" , feature = "rm0399" ) ) ]
796
804
xspi_impl ! { stm32:: QUADSPI , rec:: Qspi , qspisel }
797
805
798
- #[ cfg( any( feature = "rm0455" , feature = "rm0468" ) ) ]
806
+ #[ cfg( any( feature = "rm0468" ) ) ] // TODO feature = "rm0455"
799
807
xspi_impl ! { stm32:: OCTOSPI1 , rec:: Octospi1 , octospisel }
800
808
#[ cfg( any( feature = "rm0455" , feature = "rm0468" ) ) ]
801
809
xspi_impl ! { stm32:: OCTOSPI2 , rec:: Octospi2 , octospisel }
0 commit comments