diff --git a/rp2040-hal/src/multicore.rs b/rp2040-hal/src/multicore.rs index 341f583..2039b51 100644 --- a/rp2040-hal/src/multicore.rs +++ b/rp2040-hal/src/multicore.rs @@ -43,6 +43,7 @@ use crate::Sio; /// Errors for multicore operations. #[derive(Debug)] +#[cfg_attr(feature = "defmt", derive(defmt::Format))] pub enum Error { /// Operation is invalid on this core. InvalidCore, diff --git a/rp2040-hal/src/pll.rs b/rp2040-hal/src/pll.rs index 7d5956d..9d3a926 100644 --- a/rp2040-hal/src/pll.rs +++ b/rp2040-hal/src/pll.rs @@ -73,6 +73,8 @@ impl PhaseLockedLoop { /// Error type for the PLL module. /// See Chapter 2, Section 18 ยง2 for details on constraints triggering these errors. +#[derive(Debug)] +#[cfg_attr(feature = "defmt", derive(defmt::Format))] pub enum Error { /// Proposed VCO frequency is out of range. VcoFreqOutOfRange, diff --git a/rp2040-hal/src/rtc/datetime_no_deps.rs b/rp2040-hal/src/rtc/datetime_no_deps.rs index 4a1dc24..f57b8d9 100644 --- a/rp2040-hal/src/rtc/datetime_no_deps.rs +++ b/rp2040-hal/src/rtc/datetime_no_deps.rs @@ -4,6 +4,7 @@ use rp2040_pac::rtc::{rtc_0, rtc_1, setup_0, setup_1}; /// /// [`DateTimeFilter`]: struct.DateTimeFilter.html #[derive(Clone, Debug, PartialEq, Eq)] +#[cfg_attr(feature = "defmt", derive(defmt::Format))] pub enum Error { /// The [DateTime] contains an invalid year value. Must be between `0..=4095`. InvalidYear, diff --git a/rp2040-hal/src/uart/utils.rs b/rp2040-hal/src/uart/utils.rs index f2eb9e7..5ce9447 100644 --- a/rp2040-hal/src/uart/utils.rs +++ b/rp2040-hal/src/uart/utils.rs @@ -5,6 +5,7 @@ use fugit::HertzU32; /// Error type for UART operations. #[derive(Debug)] +#[cfg_attr(feature = "defmt", derive(defmt::Format))] pub enum Error { /// Bad argument : when things overflow, ... BadArgument, diff --git a/rp2040-hal/src/xosc.rs b/rp2040-hal/src/xosc.rs index 328d7d9..db3bcba 100644 --- a/rp2040-hal/src/xosc.rs +++ b/rp2040-hal/src/xosc.rs @@ -32,6 +32,8 @@ impl State for Stable {} impl State for Dormant {} /// Possible errors when initializing the CrystalOscillator +#[derive(Debug)] +#[cfg_attr(feature = "defmt", derive(defmt::Format))] pub enum Error { /// Frequency is out of the 1-15MHz range (see datasheet) FrequencyOutOfRange,