aboutsummaryrefslogtreecommitdiff
path: root/embassy-stm32
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2023-11-13 00:52:01 +0100
committerDario Nieuwenhuis <[email protected]>2023-11-13 00:52:01 +0100
commit4fe344ebc0f4e030ff7a03755f27e66e9ad0476f (patch)
treef4c40f8f346d52f2180ccf39f2d811337a2e9621 /embassy-stm32
parent39c737162185adb4f30f18f700da08a55be6b55a (diff)
stm32/rcc: consistent casing and naming for PLL enums.
Diffstat (limited to 'embassy-stm32')
-rw-r--r--embassy-stm32/src/rcc/f2.rs46
-rw-r--r--embassy-stm32/src/rcc/g0.rs14
-rw-r--r--embassy-stm32/src/rcc/g4.rs14
-rw-r--r--embassy-stm32/src/rcc/l0l1.rs10
-rw-r--r--embassy-stm32/src/rcc/l4l5.rs14
-rw-r--r--embassy-stm32/src/rcc/u5.rs22
-rw-r--r--embassy-stm32/src/rcc/wba.rs8
7 files changed, 64 insertions, 64 deletions
diff --git a/embassy-stm32/src/rcc/f2.rs b/embassy-stm32/src/rcc/f2.rs
index 9a66e75a4..00480222a 100644
--- a/embassy-stm32/src/rcc/f2.rs
+++ b/embassy-stm32/src/rcc/f2.rs
@@ -1,7 +1,7 @@
1use crate::pac::flash::vals::Latency; 1use crate::pac::flash::vals::Latency;
2use crate::pac::rcc::vals::Sw; 2use crate::pac::rcc::vals::Sw;
3pub use crate::pac::rcc::vals::{ 3pub use crate::pac::rcc::vals::{
4 Hpre as AHBPrescaler, Pllm as PLLPreDiv, Plln as PLLMul, Pllp as PLLPDiv, Pllq as PLLQDiv, Pllsrc as PLLSrc, 4 Hpre as AHBPrescaler, Pllm as PllPreDiv, Plln as PllMul, Pllp as PllPDiv, Pllq as PllQDiv, Pllsrc as PllSource,
5 Ppre as APBPrescaler, 5 Ppre as APBPrescaler,
6}; 6};
7use crate::pac::{FLASH, RCC}; 7use crate::pac::{FLASH, RCC};
@@ -35,30 +35,30 @@ pub enum HSESrc {
35} 35}
36 36
37#[derive(Clone, Copy)] 37#[derive(Clone, Copy)]
38pub struct PLLConfig { 38pub struct Pll {
39 pub pre_div: PLLPreDiv, 39 pub pre_div: PllPreDiv,
40 pub mul: PLLMul, 40 pub mul: PllMul,
41 pub p_div: PLLPDiv, 41 pub divp: PllPDiv,
42 pub q_div: PLLQDiv, 42 pub divq: PllQDiv,
43} 43}
44 44
45impl Default for PLLConfig { 45impl Default for Pll {
46 fn default() -> Self { 46 fn default() -> Self {
47 PLLConfig { 47 Pll {
48 pre_div: PLLPreDiv::DIV16, 48 pre_div: PllPreDiv::DIV16,
49 mul: PLLMul::MUL192, 49 mul: PllMul::MUL192,
50 p_div: PLLPDiv::DIV2, 50 divp: PllPDiv::DIV2,
51 q_div: PLLQDiv::DIV4, 51 divq: PllQDiv::DIV4,
52 } 52 }
53 } 53 }
54} 54}
55 55
56impl PLLConfig { 56impl Pll {
57 pub fn clocks(&self, src_freq: Hertz) -> PLLClocks { 57 pub fn clocks(&self, src_freq: Hertz) -> PLLClocks {
58 let in_freq = src_freq / self.pre_div; 58 let in_freq = src_freq / self.pre_div;
59 let vco_freq = src_freq / self.pre_div * self.mul; 59 let vco_freq = src_freq / self.pre_div * self.mul;
60 let main_freq = vco_freq / self.p_div; 60 let main_freq = vco_freq / self.divp;
61 let pll48_freq = vco_freq / self.q_div; 61 let pll48_freq = vco_freq / self.divq;
62 PLLClocks { 62 PLLClocks {
63 in_freq, 63 in_freq,
64 vco_freq, 64 vco_freq,
@@ -172,8 +172,8 @@ impl VoltageScale {
172pub struct Config { 172pub struct Config {
173 pub hse: Option<HSEConfig>, 173 pub hse: Option<HSEConfig>,
174 pub hsi: bool, 174 pub hsi: bool,
175 pub pll_mux: PLLSrc, 175 pub pll_mux: PllSource,
176 pub pll: PLLConfig, 176 pub pll: Pll,
177 pub mux: ClockSrc, 177 pub mux: ClockSrc,
178 pub voltage: VoltageScale, 178 pub voltage: VoltageScale,
179 pub ahb_pre: AHBPrescaler, 179 pub ahb_pre: AHBPrescaler,
@@ -188,8 +188,8 @@ impl Default for Config {
188 Config { 188 Config {
189 hse: None, 189 hse: None,
190 hsi: true, 190 hsi: true,
191 pll_mux: PLLSrc::HSI, 191 pll_mux: PllSource::HSI,
192 pll: PLLConfig::default(), 192 pll: Pll::default(),
193 voltage: VoltageScale::Range3, 193 voltage: VoltageScale::Range3,
194 mux: ClockSrc::HSI, 194 mux: ClockSrc::HSI,
195 ahb_pre: AHBPrescaler::DIV1, 195 ahb_pre: AHBPrescaler::DIV1,
@@ -217,13 +217,13 @@ pub(crate) unsafe fn init(config: Config) {
217 } 217 }
218 218
219 let pll_src_freq = match config.pll_mux { 219 let pll_src_freq = match config.pll_mux {
220 PLLSrc::HSE => { 220 PllSource::HSE => {
221 let hse_config = config 221 let hse_config = config
222 .hse 222 .hse
223 .unwrap_or_else(|| panic!("HSE must be configured to be used as PLL input")); 223 .unwrap_or_else(|| panic!("HSE must be configured to be used as PLL input"));
224 hse_config.frequency 224 hse_config.frequency
225 } 225 }
226 PLLSrc::HSI => HSI_FREQ, 226 PllSource::HSI => HSI_FREQ,
227 }; 227 };
228 228
229 // Reference: STM32F215xx/217xx datasheet Table 33. Main PLL characteristics 229 // Reference: STM32F215xx/217xx datasheet Table 33. Main PLL characteristics
@@ -238,8 +238,8 @@ pub(crate) unsafe fn init(config: Config) {
238 w.set_pllsrc(config.pll_mux); 238 w.set_pllsrc(config.pll_mux);
239 w.set_pllm(config.pll.pre_div); 239 w.set_pllm(config.pll.pre_div);
240 w.set_plln(config.pll.mul); 240 w.set_plln(config.pll.mul);
241 w.set_pllp(config.pll.p_div); 241 w.set_pllp(config.pll.divp);
242 w.set_pllq(config.pll.q_div); 242 w.set_pllq(config.pll.divq);
243 }); 243 });
244 244
245 let (sys_clk, sw) = match config.mux { 245 let (sys_clk, sw) = match config.mux {
diff --git a/embassy-stm32/src/rcc/g0.rs b/embassy-stm32/src/rcc/g0.rs
index 45d41a4e0..75613dd2b 100644
--- a/embassy-stm32/src/rcc/g0.rs
+++ b/embassy-stm32/src/rcc/g0.rs
@@ -28,7 +28,7 @@ pub enum ClockSrc {
28#[derive(Clone, Copy)] 28#[derive(Clone, Copy)]
29pub struct PllConfig { 29pub struct PllConfig {
30 /// The source from which the PLL receives a clock signal 30 /// The source from which the PLL receives a clock signal
31 pub source: PllSrc, 31 pub source: PllSource,
32 /// The initial divisor of that clock signal 32 /// The initial divisor of that clock signal
33 pub m: Pllm, 33 pub m: Pllm,
34 /// The PLL VCO multiplier, which must be in the range `8..=86`. 34 /// The PLL VCO multiplier, which must be in the range `8..=86`.
@@ -48,7 +48,7 @@ impl Default for PllConfig {
48 fn default() -> PllConfig { 48 fn default() -> PllConfig {
49 // HSI / 1 * 8 / 2 = 64 MHz 49 // HSI / 1 * 8 / 2 = 64 MHz
50 PllConfig { 50 PllConfig {
51 source: PllSrc::HSI, 51 source: PllSource::HSI,
52 m: Pllm::DIV1, 52 m: Pllm::DIV1,
53 n: Plln::MUL8, 53 n: Plln::MUL8,
54 r: Pllr::DIV2, 54 r: Pllr::DIV2,
@@ -59,7 +59,7 @@ impl Default for PllConfig {
59} 59}
60 60
61#[derive(Clone, Copy, Eq, PartialEq)] 61#[derive(Clone, Copy, Eq, PartialEq)]
62pub enum PllSrc { 62pub enum PllSource {
63 HSI, 63 HSI,
64 HSE(Hertz), 64 HSE(Hertz),
65} 65}
@@ -89,8 +89,8 @@ impl Default for Config {
89impl PllConfig { 89impl PllConfig {
90 pub(crate) fn init(self) -> Hertz { 90 pub(crate) fn init(self) -> Hertz {
91 let (src, input_freq) = match self.source { 91 let (src, input_freq) = match self.source {
92 PllSrc::HSI => (vals::Pllsrc::HSI, HSI_FREQ), 92 PllSource::HSI => (vals::Pllsrc::HSI, HSI_FREQ),
93 PllSrc::HSE(freq) => (vals::Pllsrc::HSE, freq), 93 PllSource::HSE(freq) => (vals::Pllsrc::HSE, freq),
94 }; 94 };
95 95
96 let m_freq = input_freq / self.m; 96 let m_freq = input_freq / self.m;
@@ -121,11 +121,11 @@ impl PllConfig {
121 // > 3. Change the desired parameter. 121 // > 3. Change the desired parameter.
122 // Enable whichever clock source we're using, and wait for it to become ready 122 // Enable whichever clock source we're using, and wait for it to become ready
123 match self.source { 123 match self.source {
124 PllSrc::HSI => { 124 PllSource::HSI => {
125 RCC.cr().write(|w| w.set_hsion(true)); 125 RCC.cr().write(|w| w.set_hsion(true));
126 while !RCC.cr().read().hsirdy() {} 126 while !RCC.cr().read().hsirdy() {}
127 } 127 }
128 PllSrc::HSE(_) => { 128 PllSource::HSE(_) => {
129 RCC.cr().write(|w| w.set_hseon(true)); 129 RCC.cr().write(|w| w.set_hseon(true));
130 while !RCC.cr().read().hserdy() {} 130 while !RCC.cr().read().hserdy() {}
131 } 131 }
diff --git a/embassy-stm32/src/rcc/g4.rs b/embassy-stm32/src/rcc/g4.rs
index 13eb0c48d..48b27255d 100644
--- a/embassy-stm32/src/rcc/g4.rs
+++ b/embassy-stm32/src/rcc/g4.rs
@@ -23,16 +23,16 @@ pub enum ClockSrc {
23 23
24/// PLL clock input source 24/// PLL clock input source
25#[derive(Clone, Copy, Debug)] 25#[derive(Clone, Copy, Debug)]
26pub enum PllSrc { 26pub enum PllSource {
27 HSI, 27 HSI,
28 HSE(Hertz), 28 HSE(Hertz),
29} 29}
30 30
31impl Into<Pllsrc> for PllSrc { 31impl Into<Pllsrc> for PllSource {
32 fn into(self) -> Pllsrc { 32 fn into(self) -> Pllsrc {
33 match self { 33 match self {
34 PllSrc::HSE(..) => Pllsrc::HSE, 34 PllSource::HSE(..) => Pllsrc::HSE,
35 PllSrc::HSI => Pllsrc::HSI, 35 PllSource::HSI => Pllsrc::HSI,
36 } 36 }
37 } 37 }
38} 38}
@@ -44,7 +44,7 @@ impl Into<Pllsrc> for PllSrc {
44/// frequency ranges for each of these settings. 44/// frequency ranges for each of these settings.
45pub struct Pll { 45pub struct Pll {
46 /// PLL Source clock selection. 46 /// PLL Source clock selection.
47 pub source: PllSrc, 47 pub source: PllSource,
48 48
49 /// PLL pre-divider 49 /// PLL pre-divider
50 pub prediv_m: PllM, 50 pub prediv_m: PllM,
@@ -118,13 +118,13 @@ pub struct PllFreq {
118pub(crate) unsafe fn init(config: Config) { 118pub(crate) unsafe fn init(config: Config) {
119 let pll_freq = config.pll.map(|pll_config| { 119 let pll_freq = config.pll.map(|pll_config| {
120 let src_freq = match pll_config.source { 120 let src_freq = match pll_config.source {
121 PllSrc::HSI => { 121 PllSource::HSI => {
122 RCC.cr().write(|w| w.set_hsion(true)); 122 RCC.cr().write(|w| w.set_hsion(true));
123 while !RCC.cr().read().hsirdy() {} 123 while !RCC.cr().read().hsirdy() {}
124 124
125 HSI_FREQ 125 HSI_FREQ
126 } 126 }
127 PllSrc::HSE(freq) => { 127 PllSource::HSE(freq) => {
128 RCC.cr().write(|w| w.set_hseon(true)); 128 RCC.cr().write(|w| w.set_hseon(true));
129 while !RCC.cr().read().hserdy() {} 129 while !RCC.cr().read().hserdy() {}
130 freq 130 freq
diff --git a/embassy-stm32/src/rcc/l0l1.rs b/embassy-stm32/src/rcc/l0l1.rs
index 25a7762a3..c3d58e8ec 100644
--- a/embassy-stm32/src/rcc/l0l1.rs
+++ b/embassy-stm32/src/rcc/l0l1.rs
@@ -1,7 +1,7 @@
1pub use crate::pac::pwr::vals::Vos as VoltageScale; 1pub use crate::pac::pwr::vals::Vos as VoltageScale;
2pub use crate::pac::rcc::vals::{ 2pub use crate::pac::rcc::vals::{
3 Hpre as AHBPrescaler, Msirange as MSIRange, Plldiv as PLLDiv, Plldiv as PllDiv, Pllmul as PLLMul, Pllmul as PllMul, 3 Hpre as AHBPrescaler, Msirange as MSIRange, Plldiv as PllDiv, Pllmul as PllMul, Pllsrc as PllSource,
4 Pllsrc as PLLSource, Ppre as APBPrescaler, Sw as ClockSrc, 4 Ppre as APBPrescaler, Sw as ClockSrc,
5}; 5};
6use crate::pac::{FLASH, PWR, RCC}; 6use crate::pac::{FLASH, PWR, RCC};
7use crate::rcc::{set_freqs, Clocks}; 7use crate::rcc::{set_freqs, Clocks};
@@ -29,7 +29,7 @@ pub struct Hse {
29#[derive(Clone, Copy)] 29#[derive(Clone, Copy)]
30pub struct Pll { 30pub struct Pll {
31 /// PLL source 31 /// PLL source
32 pub source: PLLSource, 32 pub source: PllSource,
33 33
34 /// PLL multiplication factor. 34 /// PLL multiplication factor.
35 pub mul: PllMul, 35 pub mul: PllMul,
@@ -116,8 +116,8 @@ pub(crate) unsafe fn init(config: Config) {
116 116
117 let pll = config.pll.map(|pll| { 117 let pll = config.pll.map(|pll| {
118 let freq = match pll.source { 118 let freq = match pll.source {
119 PLLSource::HSE => hse.unwrap(), 119 PllSource::HSE => hse.unwrap(),
120 PLLSource::HSI => hsi.unwrap(), 120 PllSource::HSI => hsi.unwrap(),
121 }; 121 };
122 122
123 // Disable PLL 123 // Disable PLL
diff --git a/embassy-stm32/src/rcc/l4l5.rs b/embassy-stm32/src/rcc/l4l5.rs
index c44839104..97f231f61 100644
--- a/embassy-stm32/src/rcc/l4l5.rs
+++ b/embassy-stm32/src/rcc/l4l5.rs
@@ -5,7 +5,7 @@ pub use crate::pac::rcc::vals::Clk48sel as Clk48Src;
5pub use crate::pac::rcc::vals::Hsepre as HsePrescaler; 5pub use crate::pac::rcc::vals::Hsepre as HsePrescaler;
6pub use crate::pac::rcc::vals::{ 6pub use crate::pac::rcc::vals::{
7 Adcsel as AdcClockSource, Hpre as AHBPrescaler, Msirange as MSIRange, Pllm as PllPreDiv, Plln as PllMul, 7 Adcsel as AdcClockSource, Hpre as AHBPrescaler, Msirange as MSIRange, Pllm as PllPreDiv, Plln as PllMul,
8 Pllp as PllPDiv, Pllq as PllQDiv, Pllr as PllRDiv, Pllsrc as PLLSource, Ppre as APBPrescaler, Sw as ClockSrc, 8 Pllp as PllPDiv, Pllq as PllQDiv, Pllr as PllRDiv, Pllsrc as PllSource, Ppre as APBPrescaler, Sw as ClockSrc,
9}; 9};
10use crate::pac::{FLASH, RCC}; 10use crate::pac::{FLASH, RCC};
11use crate::rcc::{set_freqs, Clocks}; 11use crate::rcc::{set_freqs, Clocks};
@@ -36,7 +36,7 @@ pub struct Hse {
36#[derive(Clone, Copy)] 36#[derive(Clone, Copy)]
37pub struct Pll { 37pub struct Pll {
38 /// PLL source 38 /// PLL source
39 pub source: PLLSource, 39 pub source: PllSource,
40 40
41 /// PLL pre-divider (DIVM). 41 /// PLL pre-divider (DIVM).
42 pub prediv: PllPreDiv, 42 pub prediv: PllPreDiv,
@@ -135,7 +135,7 @@ pub const WPAN_DEFAULT: Config = Config {
135 ls: super::LsConfig::default_lse(), 135 ls: super::LsConfig::default_lse(),
136 136
137 pll: Some(Pll { 137 pll: Some(Pll {
138 source: PLLSource::HSE, 138 source: PllSource::HSE,
139 prediv: PllPreDiv::DIV2, 139 prediv: PllPreDiv::DIV2,
140 mul: PllMul::MUL12, 140 mul: PllMul::MUL12,
141 divp: Some(PllPDiv::DIV3), // 32 / 2 * 12 / 3 = 64Mhz 141 divp: Some(PllPDiv::DIV3), // 32 / 2 * 12 / 3 = 64Mhz
@@ -456,10 +456,10 @@ fn init_pll(instance: PllInstance, config: Option<Pll>, input: &PllInput) -> Pll
456 let Some(pll) = config else { return PllOutput::default() }; 456 let Some(pll) = config else { return PllOutput::default() };
457 457
458 let pll_src = match pll.source { 458 let pll_src = match pll.source {
459 PLLSource::DISABLE => panic!("must not select PLL source as DISABLE"), 459 PllSource::DISABLE => panic!("must not select PLL source as DISABLE"),
460 PLLSource::HSE => input.hse, 460 PllSource::HSE => input.hse,
461 PLLSource::HSI => input.hsi, 461 PllSource::HSI => input.hsi,
462 PLLSource::MSI => input.msi, 462 PllSource::MSI => input.msi,
463 }; 463 };
464 464
465 let pll_src = pll_src.unwrap(); 465 let pll_src = pll_src.unwrap();
diff --git a/embassy-stm32/src/rcc/u5.rs b/embassy-stm32/src/rcc/u5.rs
index c111362bf..81bdec881 100644
--- a/embassy-stm32/src/rcc/u5.rs
+++ b/embassy-stm32/src/rcc/u5.rs
@@ -35,7 +35,7 @@ impl Default for ClockSrc {
35#[derive(Clone, Copy)] 35#[derive(Clone, Copy)]
36pub struct PllConfig { 36pub struct PllConfig {
37 /// The clock source for the PLL. 37 /// The clock source for the PLL.
38 pub source: PllSrc, 38 pub source: PllSource,
39 /// The PLL prescaler. 39 /// The PLL prescaler.
40 /// 40 ///
41 /// The clock speed of the `source` divided by `m` must be between 4 and 16 MHz. 41 /// The clock speed of the `source` divided by `m` must be between 4 and 16 MHz.
@@ -57,7 +57,7 @@ impl PllConfig {
57 /// A configuration for HSI / 1 * 10 / 1 = 160 MHz 57 /// A configuration for HSI / 1 * 10 / 1 = 160 MHz
58 pub const fn hsi_160mhz() -> Self { 58 pub const fn hsi_160mhz() -> Self {
59 PllConfig { 59 PllConfig {
60 source: PllSrc::HSI, 60 source: PllSource::HSI,
61 m: Pllm::DIV1, 61 m: Pllm::DIV1,
62 n: Plln::MUL10, 62 n: Plln::MUL10,
63 r: Plldiv::DIV1, 63 r: Plldiv::DIV1,
@@ -67,7 +67,7 @@ impl PllConfig {
67 /// A configuration for MSIS @ 48 MHz / 3 * 10 / 1 = 160 MHz 67 /// A configuration for MSIS @ 48 MHz / 3 * 10 / 1 = 160 MHz
68 pub const fn msis_160mhz() -> Self { 68 pub const fn msis_160mhz() -> Self {
69 PllConfig { 69 PllConfig {
70 source: PllSrc::MSIS(Msirange::RANGE_48MHZ), 70 source: PllSource::MSIS(Msirange::RANGE_48MHZ),
71 m: Pllm::DIV3, 71 m: Pllm::DIV3,
72 n: Plln::MUL10, 72 n: Plln::MUL10,
73 r: Plldiv::DIV1, 73 r: Plldiv::DIV1,
@@ -76,7 +76,7 @@ impl PllConfig {
76} 76}
77 77
78#[derive(Clone, Copy)] 78#[derive(Clone, Copy)]
79pub enum PllSrc { 79pub enum PllSource {
80 /// Use an internal medium speed oscillator as the PLL source. 80 /// Use an internal medium speed oscillator as the PLL source.
81 MSIS(Msirange), 81 MSIS(Msirange),
82 /// Use the external high speed clock as the system PLL source. 82 /// Use the external high speed clock as the system PLL source.
@@ -88,12 +88,12 @@ pub enum PllSrc {
88 HSI, 88 HSI,
89} 89}
90 90
91impl Into<Pllsrc> for PllSrc { 91impl Into<Pllsrc> for PllSource {
92 fn into(self) -> Pllsrc { 92 fn into(self) -> Pllsrc {
93 match self { 93 match self {
94 PllSrc::MSIS(..) => Pllsrc::MSIS, 94 PllSource::MSIS(..) => Pllsrc::MSIS,
95 PllSrc::HSE(..) => Pllsrc::HSE, 95 PllSource::HSE(..) => Pllsrc::HSE,
96 PllSrc::HSI => Pllsrc::HSI, 96 PllSource::HSI => Pllsrc::HSI,
97 } 97 }
98 } 98 }
99} 99}
@@ -216,9 +216,9 @@ pub(crate) unsafe fn init(config: Config) {
216 ClockSrc::PLL1_R(pll) => { 216 ClockSrc::PLL1_R(pll) => {
217 // Configure the PLL source 217 // Configure the PLL source
218 let source_clk = match pll.source { 218 let source_clk = match pll.source {
219 PllSrc::MSIS(range) => config.init_msis(range), 219 PllSource::MSIS(range) => config.init_msis(range),
220 PllSrc::HSE(hertz) => config.init_hse(hertz), 220 PllSource::HSE(hertz) => config.init_hse(hertz),
221 PllSrc::HSI => config.init_hsi(), 221 PllSource::HSI => config.init_hsi(),
222 }; 222 };
223 223
224 // Calculate the reference clock, which is the source divided by m 224 // Calculate the reference clock, which is the source divided by m
diff --git a/embassy-stm32/src/rcc/wba.rs b/embassy-stm32/src/rcc/wba.rs
index 8925d9606..c0cd91507 100644
--- a/embassy-stm32/src/rcc/wba.rs
+++ b/embassy-stm32/src/rcc/wba.rs
@@ -17,16 +17,16 @@ pub enum ClockSrc {
17} 17}
18 18
19#[derive(Clone, Copy, Debug)] 19#[derive(Clone, Copy, Debug)]
20pub enum PllSrc { 20pub enum PllSource {
21 HSE(Hertz), 21 HSE(Hertz),
22 HSI, 22 HSI,
23} 23}
24 24
25impl Into<Pllsrc> for PllSrc { 25impl Into<Pllsrc> for PllSource {
26 fn into(self) -> Pllsrc { 26 fn into(self) -> Pllsrc {
27 match self { 27 match self {
28 PllSrc::HSE(..) => Pllsrc::HSE, 28 PllSource::HSE(..) => Pllsrc::HSE,
29 PllSrc::HSI => Pllsrc::HSI, 29 PllSource::HSI => Pllsrc::HSI,
30 } 30 }
31 } 31 }
32} 32}