pub type R = crate::R<CRrs>;
pub type W = crate::W<CRrs>;
pub type MUXEN_R = crate::BitReader;
pub type MUXEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type MODE_R = crate::BitReader;
pub type MODE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type CSSEL_OVR_EN_R = crate::BitReader;
pub type CSSEL_OVR_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type CSSEL_OVR_O1_R = crate::BitReader;
pub type CSSEL_OVR_O1_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type CSSEL_OVR_O2_R = crate::BitReader;
pub type CSSEL_OVR_O2_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type REQ2ACK_TIME_R = crate::FieldReader;
pub type REQ2ACK_TIME_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
impl R {
#[inline(always)]
pub fn muxen(&self) -> MUXEN_R {
MUXEN_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn mode(&self) -> MODE_R {
MODE_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn cssel_ovr_en(&self) -> CSSEL_OVR_EN_R {
CSSEL_OVR_EN_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn cssel_ovr_o1(&self) -> CSSEL_OVR_O1_R {
CSSEL_OVR_O1_R::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn cssel_ovr_o2(&self) -> CSSEL_OVR_O2_R {
CSSEL_OVR_O2_R::new(((self.bits >> 6) & 1) != 0)
}
#[inline(always)]
pub fn req2ack_time(&self) -> REQ2ACK_TIME_R {
REQ2ACK_TIME_R::new(((self.bits >> 16) & 0xff) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CR")
.field("muxen", &self.muxen())
.field("mode", &self.mode())
.field("cssel_ovr_en", &self.cssel_ovr_en())
.field("cssel_ovr_o1", &self.cssel_ovr_o1())
.field("cssel_ovr_o2", &self.cssel_ovr_o2())
.field("req2ack_time", &self.req2ack_time())
.finish()
}
}
impl W {
#[inline(always)]
pub fn muxen(&mut self) -> MUXEN_W<CRrs> {
MUXEN_W::new(self, 0)
}
#[inline(always)]
pub fn mode(&mut self) -> MODE_W<CRrs> {
MODE_W::new(self, 1)
}
#[inline(always)]
pub fn cssel_ovr_en(&mut self) -> CSSEL_OVR_EN_W<CRrs> {
CSSEL_OVR_EN_W::new(self, 4)
}
#[inline(always)]
pub fn cssel_ovr_o1(&mut self) -> CSSEL_OVR_O1_W<CRrs> {
CSSEL_OVR_O1_W::new(self, 5)
}
#[inline(always)]
pub fn cssel_ovr_o2(&mut self) -> CSSEL_OVR_O2_W<CRrs> {
CSSEL_OVR_O2_W::new(self, 6)
}
#[inline(always)]
pub fn req2ack_time(&mut self) -> REQ2ACK_TIME_W<CRrs> {
REQ2ACK_TIME_W::new(self, 16)
}
}
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 {}