Skip to content

Commit 0f24906

Browse files
author
Henrik Snöman
committed
Added debugging attributes
1 parent badcb4c commit 0f24906

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

src/gpio/dynamic.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ pub enum Dynamic {
2525

2626
/// Error for [DynamicPin]
2727
#[derive(Debug, PartialEq, Eq)]
28+
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
2829
pub enum PinModeError {
2930
/// For operations unsupported in current mode
3031
IncorrectMode,

src/rcc/pll.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ impl Default for PllConfig {
4343
}
4444

4545
#[derive(Debug)]
46+
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
4647
struct VcoRange {
4748
output_range: RangeInclusive<u32>,
4849
input_range: RangeInclusive<u32>,
@@ -61,12 +62,14 @@ const VCO_RANGE_WIDE: VcoRange = VcoRange {
6162
};
6263

6364
#[derive(Debug)]
65+
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
6466
struct PllOutput {
6567
ck: u32,
6668
div: u32,
6769
}
6870

6971
#[derive(Debug)]
72+
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
7073
struct PllSetup {
7174
vco_range: VcoRange,
7275
vco_out_target: u32,

src/rcc/reset_reason.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ pub fn get_reset_reason(rcc: &mut crate::stm32::RCC) -> ResetReason {
5454

5555
/// Gives the reason why the mcu was reset
5656
#[derive(Debug, Copy, Clone)]
57+
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
5758
pub enum ResetReason {
5859
/// The mcu went from not having power to having power and resetting
5960
PowerOnReset,

0 commit comments

Comments
 (0)