mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-21 22:32:29 +00:00
Add some uncontroversial derives to Error types
This commit is contained in:
parent
65ed19aae2
commit
930b8f3495
@ -11,7 +11,7 @@ pub use asynch::Partition;
|
|||||||
pub use blocking::BlockingPartition;
|
pub use blocking::BlockingPartition;
|
||||||
|
|
||||||
/// Partition error
|
/// Partition error
|
||||||
#[derive(Debug)]
|
#[derive(Debug, PartialEq, Eq)]
|
||||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||||
pub enum Error<T> {
|
pub enum Error<T> {
|
||||||
/// The requested flash area is outside the partition
|
/// The requested flash area is outside the partition
|
||||||
|
@ -27,7 +27,7 @@ pub enum AbortReason {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// I2C error
|
/// I2C error
|
||||||
#[derive(Debug)]
|
#[derive(Debug, PartialEq, Eq)]
|
||||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||||
pub enum Error {
|
pub enum Error {
|
||||||
/// I2C abort with error
|
/// I2C abort with error
|
||||||
|
@ -10,7 +10,7 @@ use crate::interrupt::typelevel::{Binding, Interrupt};
|
|||||||
use crate::{pac, Peripheral};
|
use crate::{pac, Peripheral};
|
||||||
|
|
||||||
/// I2C error
|
/// I2C error
|
||||||
#[derive(Debug)]
|
#[derive(Debug, PartialEq, Eq)]
|
||||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||||
#[non_exhaustive]
|
#[non_exhaustive]
|
||||||
pub enum Error {
|
pub enum Error {
|
||||||
|
@ -11,7 +11,7 @@ use crate::{peripherals, Peripheral};
|
|||||||
|
|
||||||
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
|
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
|
||||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||||
/// Curstom Errors
|
/// Custom Errors
|
||||||
pub enum Error {
|
pub enum Error {
|
||||||
UnconfiguredChannel,
|
UnconfiguredChannel,
|
||||||
InvalidValue,
|
InvalidValue,
|
||||||
|
@ -14,7 +14,7 @@ pub use timeout::*;
|
|||||||
|
|
||||||
use crate::peripherals;
|
use crate::peripherals;
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, PartialEq, Eq)]
|
||||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||||
pub enum Error {
|
pub enum Error {
|
||||||
Bus,
|
Bus,
|
||||||
|
@ -13,6 +13,7 @@ use crate::{interrupt, pac, peripherals, Peripheral};
|
|||||||
|
|
||||||
static RNG_WAKER: AtomicWaker = AtomicWaker::new();
|
static RNG_WAKER: AtomicWaker = AtomicWaker::new();
|
||||||
|
|
||||||
|
#[derive(Debug, PartialEq, Eq)]
|
||||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||||
pub enum Error {
|
pub enum Error {
|
||||||
SeedError,
|
SeedError,
|
||||||
|
@ -11,7 +11,7 @@ use crate::pac::sai::{vals, Sai as Regs};
|
|||||||
use crate::rcc::RccPeripheral;
|
use crate::rcc::RccPeripheral;
|
||||||
use crate::{peripherals, Peripheral};
|
use crate::{peripherals, Peripheral};
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, PartialEq, Eq)]
|
||||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||||
pub enum Error {
|
pub enum Error {
|
||||||
NotATransmitter,
|
NotATransmitter,
|
||||||
|
@ -15,7 +15,7 @@ use crate::rcc::RccPeripheral;
|
|||||||
use crate::time::Hertz;
|
use crate::time::Hertz;
|
||||||
use crate::{peripherals, Peripheral};
|
use crate::{peripherals, Peripheral};
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, PartialEq, Eq)]
|
||||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||||
pub enum Error {
|
pub enum Error {
|
||||||
Framing,
|
Framing,
|
||||||
|
@ -184,7 +184,7 @@ mod ov7725 {
|
|||||||
|
|
||||||
const CAM_ADDR: u8 = 0x21;
|
const CAM_ADDR: u8 = 0x21;
|
||||||
|
|
||||||
#[derive(Format)]
|
#[derive(Format, PartialEq, Eq)]
|
||||||
pub enum Error<I2cError: Format> {
|
pub enum Error<I2cError: Format> {
|
||||||
I2c(I2cError),
|
I2c(I2cError),
|
||||||
}
|
}
|
||||||
|
@ -366,7 +366,7 @@ pub struct ADT7422<'d, BUS: I2cBus> {
|
|||||||
bus: BUS,
|
bus: BUS,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Format)]
|
#[derive(Debug, Format, PartialEq, Eq)]
|
||||||
pub enum Error<I2cError: Format> {
|
pub enum Error<I2cError: Format> {
|
||||||
I2c(I2cError),
|
I2c(I2cError),
|
||||||
Address,
|
Address,
|
||||||
|
Loading…
Reference in New Issue
Block a user