pub type R = crate::R<CRrs>;
pub type W = crate::W<CRrs>;
pub type EN_R = crate::BitReader;
pub type EN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type WRIE_R = crate::BitReader;
pub type WRIE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type RDIE_R = crate::BitReader;
pub type RDIE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type EIE_R = crate::BitReader;
pub type EIE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type DPC_R = crate::BitReader;
pub type DPC_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type PORT_ADDRESS_R = crate::FieldReader;
pub type PORT_ADDRESS_W<'a, REG> = crate::FieldWriter<'a, REG, 5>;
impl R {
#[inline(always)]
pub fn en(&self) -> EN_R {
EN_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn wrie(&self) -> WRIE_R {
WRIE_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn rdie(&self) -> RDIE_R {
RDIE_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn eie(&self) -> EIE_R {
EIE_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn dpc(&self) -> DPC_R {
DPC_R::new(((self.bits >> 7) & 1) != 0)
}
#[inline(always)]
pub fn port_address(&self) -> PORT_ADDRESS_R {
PORT_ADDRESS_R::new(((self.bits >> 8) & 0x1f) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CR")
.field("en", &self.en())
.field("wrie", &self.wrie())
.field("rdie", &self.rdie())
.field("eie", &self.eie())
.field("dpc", &self.dpc())
.field("port_address", &self.port_address())
.finish()
}
}
impl W {
#[inline(always)]
pub fn en(&mut self) -> EN_W<CRrs> {
EN_W::new(self, 0)
}
#[inline(always)]
pub fn wrie(&mut self) -> WRIE_W<CRrs> {
WRIE_W::new(self, 1)
}
#[inline(always)]
pub fn rdie(&mut self) -> RDIE_W<CRrs> {
RDIE_W::new(self, 2)
}
#[inline(always)]
pub fn eie(&mut self) -> EIE_W<CRrs> {
EIE_W::new(self, 3)
}
#[inline(always)]
pub fn dpc(&mut self) -> DPC_W<CRrs> {
DPC_W::new(self, 7)
}
#[inline(always)]
pub fn port_address(&mut self) -> PORT_ADDRESS_W<CRrs> {
PORT_ADDRESS_W::new(self, 8)
}
}
pub struct CRrs;
impl crate::RegisterSpec for CRrs {
type Ux = u32;
}
impl crate::Readable for CRrs {}
impl crate::Writable for CRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for CRrs {}