pub type R = crate::R<IERrs>;
pub type W = crate::W<IERrs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum OVR_IE {
Disabled = 0,
Enabled = 1,
}
impl From<OVR_IE> for bool {
#[inline(always)]
fn from(variant: OVR_IE) -> Self {
variant as u8 != 0
}
}
pub type OVR_IE_R = crate::BitReader<OVR_IE>;
impl OVR_IE_R {
#[inline(always)]
pub const fn variant(&self) -> OVR_IE {
match self.bits {
false => OVR_IE::Disabled,
true => OVR_IE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == OVR_IE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == OVR_IE::Enabled
}
}
pub type OVR_IE_W<'a, REG> = crate::BitWriter<'a, REG, OVR_IE>;
impl<'a, REG> OVR_IE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(OVR_IE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(OVR_IE::Enabled)
}
}
impl R {
#[inline(always)]
pub fn ovr_ie(&self) -> OVR_IE_R {
OVR_IE_R::new(((self.bits >> 1) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("IER").field("ovr_ie", &self.ovr_ie()).finish()
}
}
impl W {
#[inline(always)]
pub fn ovr_ie(&mut self) -> OVR_IE_W<IERrs> {
OVR_IE_W::new(self, 1)
}
}
pub struct IERrs;
impl crate::RegisterSpec for IERrs {
type Ux = u32;
}
impl crate::Readable for IERrs {}
impl crate::Writable for IERrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for IERrs {}