Skip to content

Commit

Permalink
defmt format for rcc clocks (#163)
Browse files Browse the repository at this point in the history
  • Loading branch information
AdinAck authored Jan 8, 2025
1 parent 0cd4131 commit 6c83185
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ paste = "1.0"
bitflags = "1.2"
vcell = "0.1"
static_assertions = "1.1"
fugit = "0.3.5"
fugit = "0.3.7"
stm32-usbd = { version = "0.7.0", optional = true }
fixed = { version = "1.28.0", optional = true }

Expand Down Expand Up @@ -93,7 +93,7 @@ stm32g4a1 = ["stm32g4/stm32g4a1"]
log-itm = ["cortex-m-log/itm"]
log-rtt = []
log-semihost = ["cortex-m-log/semihosting"]
defmt-logging = ["defmt"]
defmt = ["dep:defmt", "fugit/defmt"]
cordic = ["dep:fixed"]

[profile.dev]
Expand Down
2 changes: 2 additions & 0 deletions src/rcc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ pub const HSI_FREQ: u32 = 16_000_000;

/// Clock frequencies
#[derive(Clone, Copy, Debug)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub struct Clocks {
/// System frequency
pub sys_clk: Hertz,
Expand All @@ -37,6 +38,7 @@ pub struct Clocks {

/// PLL Clock frequencies
#[derive(Clone, Copy, Debug)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub struct PLLClocks {
/// R frequency
pub r: Option<Hertz>,
Expand Down

0 comments on commit 6c83185

Please sign in to comment.