diff options
| author | xoviat <[email protected]> | 2025-12-18 09:15:30 -0600 |
|---|---|---|
| committer | xoviat <[email protected]> | 2025-12-18 09:15:30 -0600 |
| commit | cec833c5f48ae93d1a47d5b763e613d8407d48a1 (patch) | |
| tree | 2fa25c7907ba8ef1923c4baeeb93dd88c57bce7e /embassy-mcxa/src/clocks/config.rs | |
| parent | a886e97a33690cf9724dedd272d3073a577f9fa4 (diff) | |
| parent | b5b49cbcf3a991bf6d434b0870da50f3ee722612 (diff) | |
Merge branch 'main' of github.com:embassy-rs/embassy into low-power-rtc
Diffstat (limited to 'embassy-mcxa/src/clocks/config.rs')
| -rw-r--r-- | embassy-mcxa/src/clocks/config.rs | 23 |
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)] | ||
| 128 | pub 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)] | ||
| 137 | pub 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 | } |
