#[derive(PartialEq, Eq, Copy, Clone, Debug)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum DecodingError {
Address,
Data,
Validation,
RemoteControlError,
}
#[derive(PartialEq, Eq, Copy, Clone, Debug)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Error<PinErr> {
Address,
Data,
Validation,
RemoteControlError,
Hal(PinErr),
}
impl<PinErr> From<DecodingError> for Error<PinErr> {
fn from(derr: DecodingError) -> Error<PinErr> {
match derr {
DecodingError::Address => Error::Address,
DecodingError::Data => Error::Data,
DecodingError::Validation => Error::Validation,
DecodingError::RemoteControlError => Error::RemoteControlError,
}
}
}