pub type R = crate::R<_CR1rs>;
pub type W = crate::W<_CR1rs>;
pub type CEN_R = crate::BitReader;
pub type CEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type UDIS_R = crate::BitReader;
pub type UDIS_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type URS_R = crate::BitReader;
pub type URS_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type OPM_R = crate::BitReader;
pub type OPM_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type ARPE_R = crate::BitReader;
pub type ARPE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type CKD_R = crate::FieldReader;
pub type CKD_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type UIFREMAP_R = crate::BitReader;
pub type UIFREMAP_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn cen(&self) -> CEN_R {
CEN_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn udis(&self) -> UDIS_R {
UDIS_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn urs(&self) -> URS_R {
URS_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn opm(&self) -> OPM_R {
OPM_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn arpe(&self) -> ARPE_R {
ARPE_R::new(((self.bits >> 7) & 1) != 0)
}
#[inline(always)]
pub fn ckd(&self) -> CKD_R {
CKD_R::new(((self.bits >> 8) & 3) as u8)
}
#[inline(always)]
pub fn uifremap(&self) -> UIFREMAP_R {
UIFREMAP_R::new(((self.bits >> 11) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("_CR1")
.field("cen", &self.cen())
.field("udis", &self.udis())
.field("urs", &self.urs())
.field("opm", &self.opm())
.field("arpe", &self.arpe())
.field("ckd", &self.ckd())
.field("uifremap", &self.uifremap())
.finish()
}
}
impl W {
#[inline(always)]
pub fn cen(&mut self) -> CEN_W<_CR1rs> {
CEN_W::new(self, 0)
}
#[inline(always)]
pub fn udis(&mut self) -> UDIS_W<_CR1rs> {
UDIS_W::new(self, 1)
}
#[inline(always)]
pub fn urs(&mut self) -> URS_W<_CR1rs> {
URS_W::new(self, 2)
}
#[inline(always)]
pub fn opm(&mut self) -> OPM_W<_CR1rs> {
OPM_W::new(self, 3)
}
#[inline(always)]
pub fn arpe(&mut self) -> ARPE_W<_CR1rs> {
ARPE_W::new(self, 7)
}
#[inline(always)]
pub fn ckd(&mut self) -> CKD_W<_CR1rs> {
CKD_W::new(self, 8)
}
#[inline(always)]
pub fn uifremap(&mut self) -> UIFREMAP_W<_CR1rs> {
UIFREMAP_W::new(self, 11)
}
}
pub struct _CR1rs;
impl crate::RegisterSpec for _CR1rs {
type Ux = u16;
}
impl crate::Readable for _CR1rs {}
impl crate::Writable for _CR1rs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for _CR1rs {}