mirror of
https://github.com/italicsjenga/rp-hal-boards.git
synced 2025-01-10 20:41:31 +11:00
Add derive(Debug) and derive(defmt::Format) to error types
This commit is contained in:
parent
8e79f438ba
commit
219d393085
|
@ -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,
|
||||
|
|
|
@ -73,6 +73,8 @@ impl<S: State, D: PhaseLockedLoopDevice> PhaseLockedLoop<S, D> {
|
|||
|
||||
/// 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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue