Skip to content

Commit 6c83185

Browse files
authored
defmt format for rcc clocks (#163)
1 parent 0cd4131 commit 6c83185

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ paste = "1.0"
1818
bitflags = "1.2"
1919
vcell = "0.1"
2020
static_assertions = "1.1"
21-
fugit = "0.3.5"
21+
fugit = "0.3.7"
2222
stm32-usbd = { version = "0.7.0", optional = true }
2323
fixed = { version = "1.28.0", optional = true }
2424

@@ -93,7 +93,7 @@ stm32g4a1 = ["stm32g4/stm32g4a1"]
9393
log-itm = ["cortex-m-log/itm"]
9494
log-rtt = []
9595
log-semihost = ["cortex-m-log/semihosting"]
96-
defmt-logging = ["defmt"]
96+
defmt = ["dep:defmt", "fugit/defmt"]
9797
cordic = ["dep:fixed"]
9898

9999
[profile.dev]

src/rcc/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ pub const HSI_FREQ: u32 = 16_000_000;
1616

1717
/// Clock frequencies
1818
#[derive(Clone, Copy, Debug)]
19+
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
1920
pub struct Clocks {
2021
/// System frequency
2122
pub sys_clk: Hertz,
@@ -37,6 +38,7 @@ pub struct Clocks {
3738

3839
/// PLL Clock frequencies
3940
#[derive(Clone, Copy, Debug)]
41+
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
4042
pub struct PLLClocks {
4143
/// R frequency
4244
pub r: Option<Hertz>,

0 commit comments

Comments
 (0)