diff options
| author | everdrone <[email protected]> | 2025-09-20 12:39:33 +0200 |
|---|---|---|
| committer | everdrone <[email protected]> | 2025-09-20 12:39:33 +0200 |
| commit | 5f4a411978b97fbb55475eb7dafafdedb452eb6a (patch) | |
| tree | 5b37060a98f56128f409d0d8330801217291f27a /embassy-stm32/src/rcc | |
| parent | c4b0e3a2bfc2c4b60f70f862a893b90b91954baa (diff) | |
Add N6 family RCC config
Diffstat (limited to 'embassy-stm32/src/rcc')
| -rw-r--r-- | embassy-stm32/src/rcc/mco.rs | 6 | ||||
| -rw-r--r-- | embassy-stm32/src/rcc/mod.rs | 1 | ||||
| -rw-r--r-- | embassy-stm32/src/rcc/n6.rs | 20 |
3 files changed, 25 insertions, 2 deletions
diff --git a/embassy-stm32/src/rcc/mco.rs b/embassy-stm32/src/rcc/mco.rs index 59ccc8cb5..3d0f510c0 100644 --- a/embassy-stm32/src/rcc/mco.rs +++ b/embassy-stm32/src/rcc/mco.rs | |||
| @@ -15,7 +15,8 @@ pub use crate::pac::rcc::vals::Mcopre as McoPrescaler; | |||
| 15 | rcc_h7ab, | 15 | rcc_h7ab, |
| 16 | rcc_h7rm0433, | 16 | rcc_h7rm0433, |
| 17 | rcc_h7, | 17 | rcc_h7, |
| 18 | rcc_h7rs | 18 | rcc_h7rs, |
| 19 | rcc_n6 | ||
| 19 | )))] | 20 | )))] |
| 20 | pub use crate::pac::rcc::vals::Mcosel as McoSource; | 21 | pub use crate::pac::rcc::vals::Mcosel as McoSource; |
| 21 | #[cfg(any( | 22 | #[cfg(any( |
| @@ -28,7 +29,8 @@ pub use crate::pac::rcc::vals::Mcosel as McoSource; | |||
| 28 | rcc_h7ab, | 29 | rcc_h7ab, |
| 29 | rcc_h7rm0433, | 30 | rcc_h7rm0433, |
| 30 | rcc_h7, | 31 | rcc_h7, |
| 31 | rcc_h7rs | 32 | rcc_h7rs, |
| 33 | rcc_n6 | ||
| 32 | ))] | 34 | ))] |
| 33 | pub use crate::pac::rcc::vals::{Mco1sel as Mco1Source, Mco2sel as Mco2Source}; | 35 | pub use crate::pac::rcc::vals::{Mco1sel as Mco1Source, Mco2sel as Mco2Source}; |
| 34 | use crate::pac::RCC; | 36 | use crate::pac::RCC; |
diff --git a/embassy-stm32/src/rcc/mod.rs b/embassy-stm32/src/rcc/mod.rs index c41f81816..1cd80c17f 100644 --- a/embassy-stm32/src/rcc/mod.rs +++ b/embassy-stm32/src/rcc/mod.rs | |||
| @@ -28,6 +28,7 @@ pub use hsi48::*; | |||
| 28 | #[cfg_attr(any(stm32l0, stm32l1, stm32l4, stm32l5, stm32wb, stm32wl, stm32u0), path = "l.rs")] | 28 | #[cfg_attr(any(stm32l0, stm32l1, stm32l4, stm32l5, stm32wb, stm32wl, stm32u0), path = "l.rs")] |
| 29 | #[cfg_attr(stm32u5, path = "u5.rs")] | 29 | #[cfg_attr(stm32u5, path = "u5.rs")] |
| 30 | #[cfg_attr(stm32wba, path = "wba.rs")] | 30 | #[cfg_attr(stm32wba, path = "wba.rs")] |
| 31 | #[cfg_attr(stm32n6, path = "n6.rs")] | ||
| 31 | mod _version; | 32 | mod _version; |
| 32 | 33 | ||
| 33 | pub use _version::*; | 34 | pub use _version::*; |
diff --git a/embassy-stm32/src/rcc/n6.rs b/embassy-stm32/src/rcc/n6.rs new file mode 100644 index 000000000..68627edfd --- /dev/null +++ b/embassy-stm32/src/rcc/n6.rs | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | /// Configuration of the core clocks | ||
| 2 | #[non_exhaustive] | ||
| 3 | #[derive(Clone, Copy)] | ||
| 4 | pub struct Config {} | ||
| 5 | |||
| 6 | impl Config { | ||
| 7 | pub const fn new() -> Self { | ||
| 8 | Self {} | ||
| 9 | } | ||
| 10 | } | ||
| 11 | |||
| 12 | impl Default for Config { | ||
| 13 | fn default() -> Self { | ||
| 14 | Self::new() | ||
| 15 | } | ||
| 16 | } | ||
| 17 | |||
| 18 | pub(crate) unsafe fn init(config: Config) { | ||
| 19 | todo!() | ||
| 20 | } | ||
