pub type R = crate::R<OPFCCRrs>;
pub type W = crate::W<OPFCCRrs>;
pub type CM_R = crate::FieldReader;
pub type CM_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
pub type SB_R = crate::BitReader;
pub type SB_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type AI_R = crate::BitReader;
pub type AI_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type RBS_R = crate::BitReader;
pub type RBS_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn cm(&self) -> CM_R {
CM_R::new((self.bits & 7) as u8)
}
#[inline(always)]
pub fn sb(&self) -> SB_R {
SB_R::new(((self.bits >> 8) & 1) != 0)
}
#[inline(always)]
pub fn ai(&self) -> AI_R {
AI_R::new(((self.bits >> 20) & 1) != 0)
}
#[inline(always)]
pub fn rbs(&self) -> RBS_R {
RBS_R::new(((self.bits >> 21) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("OPFCCR")
.field("cm", &self.cm())
.field("sb", &self.sb())
.field("ai", &self.ai())
.field("rbs", &self.rbs())
.finish()
}
}
impl W {
#[inline(always)]
pub fn cm(&mut self) -> CM_W<OPFCCRrs> {
CM_W::new(self, 0)
}
#[inline(always)]
pub fn sb(&mut self) -> SB_W<OPFCCRrs> {
SB_W::new(self, 8)
}
#[inline(always)]
pub fn ai(&mut self) -> AI_W<OPFCCRrs> {
AI_W::new(self, 20)
}
#[inline(always)]
pub fn rbs(&mut self) -> RBS_W<OPFCCRrs> {
RBS_W::new(self, 21)
}
}
pub struct OPFCCRrs;
impl crate::RegisterSpec for OPFCCRrs {
type Ux = u32;
}
impl crate::Readable for OPFCCRrs {}
impl crate::Writable for OPFCCRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for OPFCCRrs {}