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 {
48
48
let mut pll_config = stm32g4xx_hal:: rcc:: PllConfig :: default ( ) ;
49
49
50
50
// 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
52
52
pll_config. n = stm32g4xx_hal:: rcc:: PllNMul :: MUL_32 ;
53
53
pll_config. m = stm32g4xx_hal:: rcc:: PllMDiv :: DIV_2 ; // f(vco) = 16MHz*32/2 = 256MHz
54
54
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 {
40
40
41
41
/// PLL clock input source
42
42
#[ derive( Clone , Copy ) ]
43
- pub enum PLLSrc {
43
+ pub enum PllSrc {
44
44
HSI ,
45
45
HSE ( Hertz ) ,
46
46
HSE_BYPASS ( Hertz ) ,
@@ -304,7 +304,7 @@ impl PllNMul {
304
304
/// PLL config
305
305
#[ derive( Clone , Copy ) ]
306
306
pub struct PllConfig {
307
- pub mux : PLLSrc ,
307
+ pub mux : PllSrc ,
308
308
pub m : PllMDiv ,
309
309
pub n : PllNMul ,
310
310
pub r : Option < PllRDiv > ,
@@ -315,7 +315,7 @@ pub struct PllConfig {
315
315
impl Default for PllConfig {
316
316
fn default ( ) -> PllConfig {
317
317
PllConfig {
318
- mux : PLLSrc :: HSI ,
318
+ mux : PllSrc :: HSI ,
319
319
m : PllMDiv :: DIV_2 ,
320
320
n : PllNMul :: MUL_8 ,
321
321
r : Some ( PllRDiv :: DIV_2 ) ,
Original file line number Diff line number Diff line change @@ -244,15 +244,15 @@ impl Rcc {
244
244
245
245
// Enable the input clock feeding the PLL
246
246
let ( pll_input_freq, pll_src_bits) = match pll_cfg. mux {
247
- PLLSrc :: HSI => {
247
+ PllSrc :: HSI => {
248
248
self . enable_hsi ( ) ;
249
249
( HSI_FREQ , 0b10 )
250
250
}
251
- PLLSrc :: HSE ( freq) => {
251
+ PllSrc :: HSE ( freq) => {
252
252
self . enable_hse ( false ) ;
253
253
( freq. raw ( ) , 0b11 )
254
254
}
255
- PLLSrc :: HSE_BYPASS ( freq) => {
255
+ PllSrc :: HSE_BYPASS ( freq) => {
256
256
self . enable_hse ( true ) ;
257
257
( freq. raw ( ) , 0b11 )
258
258
}
You can’t perform that action at this time.
0 commit comments