pub type R = crate::R<ICRrs>;
pub type W = crate::W<ICRrs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum CLRJOVRFW {
Clear = 1,
}
impl From<CLRJOVRFW> for bool {
#[inline(always)]
fn from(variant: CLRJOVRFW) -> Self {
variant as u8 != 0
}
}
pub type CLRJOVRF_R = crate::BitReader<CLRJOVRFW>;
impl CLRJOVRF_R {
#[inline(always)]
pub const fn variant(&self) -> Option<CLRJOVRFW> {
match self.bits {
true => Some(CLRJOVRFW::Clear),
_ => None,
}
}
#[inline(always)]
pub fn is_clear(&self) -> bool {
*self == CLRJOVRFW::Clear
}
}
pub type CLRJOVRF_W<'a, REG> = crate::BitWriter<'a, REG, CLRJOVRFW>;
impl<'a, REG> CLRJOVRF_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn clear(self) -> &'a mut crate::W<REG> {
self.variant(CLRJOVRFW::Clear)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum CLRROVRFW {
Clear = 1,
}
impl From<CLRROVRFW> for bool {
#[inline(always)]
fn from(variant: CLRROVRFW) -> Self {
variant as u8 != 0
}
}
pub type CLRROVRF_R = crate::BitReader<CLRROVRFW>;
impl CLRROVRF_R {
#[inline(always)]
pub const fn variant(&self) -> Option<CLRROVRFW> {
match self.bits {
true => Some(CLRROVRFW::Clear),
_ => None,
}
}
#[inline(always)]
pub fn is_clear(&self) -> bool {
*self == CLRROVRFW::Clear
}
}
pub type CLRROVRF_W<'a, REG> = crate::BitWriter<'a, REG, CLRROVRFW>;
impl<'a, REG> CLRROVRF_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn clear(self) -> &'a mut crate::W<REG> {
self.variant(CLRROVRFW::Clear)
}
}
pub type CLRCKABF_R = crate::FieldReader;
pub type CLRCKABF_W<'a, REG> = crate::FieldWriter<'a, REG, 8, u8, crate::Safe>;
pub type CLRSCDF_R = crate::FieldReader;
pub type CLRSCDF_W<'a, REG> = crate::FieldWriter<'a, REG, 8, u8, crate::Safe>;
impl R {
#[inline(always)]
pub fn clrjovrf(&self) -> CLRJOVRF_R {
CLRJOVRF_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn clrrovrf(&self) -> CLRROVRF_R {
CLRROVRF_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn clrckabf(&self) -> CLRCKABF_R {
CLRCKABF_R::new(((self.bits >> 16) & 0xff) as u8)
}
#[inline(always)]
pub fn clrscdf(&self) -> CLRSCDF_R {
CLRSCDF_R::new(((self.bits >> 24) & 0xff) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("ICR")
.field("clrjovrf", &self.clrjovrf())
.field("clrrovrf", &self.clrrovrf())
.field("clrckabf", &self.clrckabf())
.field("clrscdf", &self.clrscdf())
.finish()
}
}
impl W {
#[inline(always)]
pub fn clrjovrf(&mut self) -> CLRJOVRF_W<ICRrs> {
CLRJOVRF_W::new(self, 2)
}
#[inline(always)]
pub fn clrrovrf(&mut self) -> CLRROVRF_W<ICRrs> {
CLRROVRF_W::new(self, 3)
}
#[inline(always)]
pub fn clrckabf(&mut self) -> CLRCKABF_W<ICRrs> {
CLRCKABF_W::new(self, 16)
}
#[inline(always)]
pub fn clrscdf(&mut self) -> CLRSCDF_W<ICRrs> {
CLRSCDF_W::new(self, 24)
}
}
pub struct ICRrs;
impl crate::RegisterSpec for ICRrs {
type Ux = u32;
}
impl crate::Readable for ICRrs {}
impl crate::Writable for ICRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for ICRrs {}