File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed
Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ mod app {
4848 let mut pll_config = stm32g4xx_hal:: rcc:: PllConfig :: default ( ) ;
4949
5050 // Sysclock is based on PLL_R
51- pll_config. mux = stm32g4xx_hal:: rcc:: PLLSrc :: HSI ; // 16MHz
51+ pll_config. mux = stm32g4xx_hal:: rcc:: PllSrc :: HSI ; // 16MHz
5252 pll_config. n = stm32g4xx_hal:: rcc:: PllNMul :: MUL_32 ;
5353 pll_config. m = stm32g4xx_hal:: rcc:: PllMDiv :: DIV_2 ; // f(vco) = 16MHz*32/2 = 256MHz
5454 pll_config. r = Some ( stm32g4xx_hal:: rcc:: PllRDiv :: DIV_2 ) ; // f(sysclock) = 256MHz/2 = 128MHz
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ pub enum LSCOSrc {
4040
4141/// PLL clock input source
4242#[ derive( Clone , Copy ) ]
43- pub enum PLLSrc {
43+ pub enum PllSrc {
4444 HSI ,
4545 HSE ( Hertz ) ,
4646 HSE_BYPASS ( Hertz ) ,
@@ -304,7 +304,7 @@ impl PllNMul {
304304/// PLL config
305305#[ derive( Clone , Copy ) ]
306306pub struct PllConfig {
307- pub mux : PLLSrc ,
307+ pub mux : PllSrc ,
308308 pub m : PllMDiv ,
309309 pub n : PllNMul ,
310310 pub r : Option < PllRDiv > ,
@@ -315,7 +315,7 @@ pub struct PllConfig {
315315impl Default for PllConfig {
316316 fn default ( ) -> PllConfig {
317317 PllConfig {
318- mux : PLLSrc :: HSI ,
318+ mux : PllSrc :: HSI ,
319319 m : PllMDiv :: DIV_2 ,
320320 n : PllNMul :: MUL_8 ,
321321 r : Some ( PllRDiv :: DIV_2 ) ,
Original file line number Diff line number Diff line change @@ -244,15 +244,15 @@ impl Rcc {
244244
245245 // Enable the input clock feeding the PLL
246246 let ( pll_input_freq, pll_src_bits) = match pll_cfg. mux {
247- PLLSrc :: HSI => {
247+ PllSrc :: HSI => {
248248 self . enable_hsi ( ) ;
249249 ( HSI_FREQ , 0b10 )
250250 }
251- PLLSrc :: HSE ( freq) => {
251+ PllSrc :: HSE ( freq) => {
252252 self . enable_hse ( false ) ;
253253 ( freq. raw ( ) , 0b11 )
254254 }
255- PLLSrc :: HSE_BYPASS ( freq) => {
255+ PllSrc :: HSE_BYPASS ( freq) => {
256256 self . enable_hse ( true ) ;
257257 ( freq. raw ( ) , 0b11 )
258258 }
You can’t perform that action at this time.
0 commit comments