pub type R = crate::R<CTRrs>;
pub type W = crate::W<CTRrs>;
pub type EN_R = crate::BitReader;
pub type EN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type PCACHEADDR_R = crate::FieldReader<u16>;
pub type PCACHEADDR_W<'a, REG> = crate::FieldWriter<'a, REG, 12, u16>;
impl R {
#[inline(always)]
pub fn en(&self) -> EN_R {
EN_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn pcacheaddr(&self) -> PCACHEADDR_R {
PCACHEADDR_R::new(((self.bits >> 8) & 0x0fff) as u16)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CTR")
.field("en", &self.en())
.field("pcacheaddr", &self.pcacheaddr())
.finish()
}
}
impl W {
#[inline(always)]
pub fn en(&mut self) -> EN_W<CTRrs> {
EN_W::new(self, 0)
}
#[inline(always)]
pub fn pcacheaddr(&mut self) -> PCACHEADDR_W<CTRrs> {
PCACHEADDR_W::new(self, 8)
}
}
pub struct CTRrs;
impl crate::RegisterSpec for CTRrs {
type Ux = u32;
}
impl crate::Readable for CTRrs {}
impl crate::Writable for CTRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for CTRrs {
const RESET_VALUE: u32 = 0x04;
}