aboutsummaryrefslogtreecommitdiff
path: root/embassy-mcxa/src/clocks/config.rs
diff options
context:
space:
mode:
Diffstat (limited to 'embassy-mcxa/src/clocks/config.rs')
-rw-r--r--embassy-mcxa/src/clocks/config.rs23
1 files changed, 23 insertions, 0 deletions
diff --git a/embassy-mcxa/src/clocks/config.rs b/embassy-mcxa/src/clocks/config.rs
index 0563b8917..9f97160ff 100644
--- a/embassy-mcxa/src/clocks/config.rs
+++ b/embassy-mcxa/src/clocks/config.rs
@@ -119,6 +119,28 @@ pub struct ClocksConfig {
119 pub sirc: SircConfig, 119 pub sirc: SircConfig,
120 /// FRO16K clock source 120 /// FRO16K clock source
121 pub fro16k: Option<Fro16KConfig>, 121 pub fro16k: Option<Fro16KConfig>,
122 /// SOSC, clk_in clock source
123 pub sosc: Option<SoscConfig>,
124}
125
126/// The mode of the external reference clock
127#[derive(Copy, Clone)]
128pub enum SoscMode {
129 /// Passive crystal oscillators
130 CrystalOscillator,
131 /// Active external reference clock
132 ActiveClock,
133}
134
135// SOSC/clk_in configuration
136#[derive(Copy, Clone)]
137pub struct SoscConfig {
138 /// Mode of the external reference clock
139 pub mode: SoscMode,
140 /// Specific frequency of the external reference clock
141 pub frequency: u32,
142 /// Power state of the external reference clock
143 pub power: PoweredClock,
122} 144}
123 145
124// FIRC/FRO180M 146// FIRC/FRO180M
@@ -199,6 +221,7 @@ impl Default for ClocksConfig {
199 vsys_domain_active: true, 221 vsys_domain_active: true,
200 vdd_core_domain_active: true, 222 vdd_core_domain_active: true,
201 }), 223 }),
224 sosc: None,
202 } 225 }
203 } 226 }
204} 227}