pub type R = crate::R<RISrs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum OVR_RIS {
Cleared = 0,
Occurred = 1,
}
impl From<OVR_RIS> for bool {
#[inline(always)]
fn from(variant: OVR_RIS) -> Self {
variant as u8 != 0
}
}
pub type OVR_RIS_R = crate::BitReader<OVR_RIS>;
impl OVR_RIS_R {
#[inline(always)]
pub const fn variant(&self) -> OVR_RIS {
match self.bits {
false => OVR_RIS::Cleared,
true => OVR_RIS::Occurred,
}
}
#[inline(always)]
pub fn is_cleared(&self) -> bool {
*self == OVR_RIS::Cleared
}
#[inline(always)]
pub fn is_occurred(&self) -> bool {
*self == OVR_RIS::Occurred
}
}
impl R {
#[inline(always)]
pub fn ovr_ris(&self) -> OVR_RIS_R {
OVR_RIS_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("RIS").field("ovr_ris", &self.ovr_ris()).finish()
}
}
pub struct RISrs;
impl crate::RegisterSpec for RISrs {
type Ux = u32;
}
impl crate::Readable for RISrs {}
impl crate::Resettable for RISrs {}