diff --git a/embassy-stm32/src/rcc/mod.rs b/embassy-stm32/src/rcc/mod.rs index 0a52089d..d4bd3d6b 100644 --- a/embassy-stm32/src/rcc/mod.rs +++ b/embassy-stm32/src/rcc/mod.rs @@ -24,7 +24,8 @@ use crate::time::Hertz; mod _version; pub use _version::*; -#[derive(Clone, Copy)] +#[derive(Clone, Copy, Debug)] +#[cfg_attr(feature = "defmt", derive(defmt::Format))] pub struct Clocks { pub sys: Hertz, @@ -72,6 +73,7 @@ static mut CLOCK_FREQS: MaybeUninit = MaybeUninit::uninit(); /// /// Safety: Sets a mutable global. pub(crate) unsafe fn set_freqs(freqs: Clocks) { + debug!("rcc: {:?}", freqs); CLOCK_FREQS.as_mut_ptr().write(freqs); } diff --git a/embassy-stm32/src/time.rs b/embassy-stm32/src/time.rs index 49140bbe..975517a4 100644 --- a/embassy-stm32/src/time.rs +++ b/embassy-stm32/src/time.rs @@ -2,6 +2,7 @@ /// Hertz #[derive(PartialEq, PartialOrd, Clone, Copy, Debug, Eq)] +#[cfg_attr(feature = "defmt", derive(defmt::Format))] pub struct Hertz(pub u32); impl Hertz {