pub type R = crate::R<MACCRrs>;
pub type W = crate::W<MACCRrs>;
pub type RE_R = crate::BitReader;
pub type RE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type TE_R = crate::BitReader;
pub type TE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type DC_R = crate::BitReader;
pub type DC_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type BL_R = crate::FieldReader;
pub type BL_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type APCS_R = crate::BitReader;
pub type APCS_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type RD_R = crate::BitReader;
pub type RD_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type IPCO_R = crate::BitReader;
pub type IPCO_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type DM_R = crate::BitReader;
pub type DM_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type LM_R = crate::BitReader;
pub type LM_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type ROD_R = crate::BitReader;
pub type ROD_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type FES_R = crate::BitReader;
pub type FES_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type CSD_R = crate::BitReader;
pub type CSD_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type IFG_R = crate::FieldReader;
pub type IFG_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
pub type JD_R = crate::BitReader;
pub type JD_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type WD_R = crate::BitReader;
pub type WD_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type CSTF_R = crate::BitReader;
pub type CSTF_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn re(&self) -> RE_R {
RE_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn te(&self) -> TE_R {
TE_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn dc(&self) -> DC_R {
DC_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn bl(&self) -> BL_R {
BL_R::new(((self.bits >> 5) & 3) as u8)
}
#[inline(always)]
pub fn apcs(&self) -> APCS_R {
APCS_R::new(((self.bits >> 7) & 1) != 0)
}
#[inline(always)]
pub fn rd(&self) -> RD_R {
RD_R::new(((self.bits >> 9) & 1) != 0)
}
#[inline(always)]
pub fn ipco(&self) -> IPCO_R {
IPCO_R::new(((self.bits >> 10) & 1) != 0)
}
#[inline(always)]
pub fn dm(&self) -> DM_R {
DM_R::new(((self.bits >> 11) & 1) != 0)
}
#[inline(always)]
pub fn lm(&self) -> LM_R {
LM_R::new(((self.bits >> 12) & 1) != 0)
}
#[inline(always)]
pub fn rod(&self) -> ROD_R {
ROD_R::new(((self.bits >> 13) & 1) != 0)
}
#[inline(always)]
pub fn fes(&self) -> FES_R {
FES_R::new(((self.bits >> 14) & 1) != 0)
}
#[inline(always)]
pub fn csd(&self) -> CSD_R {
CSD_R::new(((self.bits >> 16) & 1) != 0)
}
#[inline(always)]
pub fn ifg(&self) -> IFG_R {
IFG_R::new(((self.bits >> 17) & 7) as u8)
}
#[inline(always)]
pub fn jd(&self) -> JD_R {
JD_R::new(((self.bits >> 22) & 1) != 0)
}
#[inline(always)]
pub fn wd(&self) -> WD_R {
WD_R::new(((self.bits >> 23) & 1) != 0)
}
#[inline(always)]
pub fn cstf(&self) -> CSTF_R {
CSTF_R::new(((self.bits >> 25) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("MACCR")
.field("re", &self.re())
.field("te", &self.te())
.field("dc", &self.dc())
.field("bl", &self.bl())
.field("apcs", &self.apcs())
.field("rd", &self.rd())
.field("ipco", &self.ipco())
.field("dm", &self.dm())
.field("lm", &self.lm())
.field("rod", &self.rod())
.field("fes", &self.fes())
.field("csd", &self.csd())
.field("ifg", &self.ifg())
.field("jd", &self.jd())
.field("wd", &self.wd())
.field("cstf", &self.cstf())
.finish()
}
}
impl W {
#[inline(always)]
pub fn re(&mut self) -> RE_W<MACCRrs> {
RE_W::new(self, 2)
}
#[inline(always)]
pub fn te(&mut self) -> TE_W<MACCRrs> {
TE_W::new(self, 3)
}
#[inline(always)]
pub fn dc(&mut self) -> DC_W<MACCRrs> {
DC_W::new(self, 4)
}
#[inline(always)]
pub fn bl(&mut self) -> BL_W<MACCRrs> {
BL_W::new(self, 5)
}
#[inline(always)]
pub fn apcs(&mut self) -> APCS_W<MACCRrs> {
APCS_W::new(self, 7)
}
#[inline(always)]
pub fn rd(&mut self) -> RD_W<MACCRrs> {
RD_W::new(self, 9)
}
#[inline(always)]
pub fn ipco(&mut self) -> IPCO_W<MACCRrs> {
IPCO_W::new(self, 10)
}
#[inline(always)]
pub fn dm(&mut self) -> DM_W<MACCRrs> {
DM_W::new(self, 11)
}
#[inline(always)]
pub fn lm(&mut self) -> LM_W<MACCRrs> {
LM_W::new(self, 12)
}
#[inline(always)]
pub fn rod(&mut self) -> ROD_W<MACCRrs> {
ROD_W::new(self, 13)
}
#[inline(always)]
pub fn fes(&mut self) -> FES_W<MACCRrs> {
FES_W::new(self, 14)
}
#[inline(always)]
pub fn csd(&mut self) -> CSD_W<MACCRrs> {
CSD_W::new(self, 16)
}
#[inline(always)]
pub fn ifg(&mut self) -> IFG_W<MACCRrs> {
IFG_W::new(self, 17)
}
#[inline(always)]
pub fn jd(&mut self) -> JD_W<MACCRrs> {
JD_W::new(self, 22)
}
#[inline(always)]
pub fn wd(&mut self) -> WD_W<MACCRrs> {
WD_W::new(self, 23)
}
#[inline(always)]
pub fn cstf(&mut self) -> CSTF_W<MACCRrs> {
CSTF_W::new(self, 25)
}
}
pub struct MACCRrs;
impl crate::RegisterSpec for MACCRrs {
type Ux = u32;
}
impl crate::Readable for MACCRrs {}
impl crate::Writable for MACCRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for MACCRrs {
const RESET_VALUE: u32 = 0x8000;
}