pub type R = crate::R<DRrs>;
pub type W = crate::W<DRrs>;
pub type DU_R = crate::FieldReader;
pub type DU_W<'a, REG> = crate::FieldWriter<'a, REG, 4, u8, crate::Safe>;
pub type DT_R = crate::FieldReader;
pub type DT_W<'a, REG> = crate::FieldWriter<'a, REG, 2, u8, crate::Safe>;
pub type MU_R = crate::FieldReader;
pub type MU_W<'a, REG> = crate::FieldWriter<'a, REG, 4, u8, crate::Safe>;
pub type MT_R = crate::BitReader;
pub type MT_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type WDU_R = crate::FieldReader;
pub type WDU_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
pub type YU_R = crate::FieldReader;
pub type YU_W<'a, REG> = crate::FieldWriter<'a, REG, 4, u8, crate::Safe>;
pub type YT_R = crate::FieldReader;
pub type YT_W<'a, REG> = crate::FieldWriter<'a, REG, 4, u8, crate::Safe>;
impl R {
#[inline(always)]
pub fn du(&self) -> DU_R {
DU_R::new((self.bits & 0x0f) as u8)
}
#[inline(always)]
pub fn dt(&self) -> DT_R {
DT_R::new(((self.bits >> 4) & 3) as u8)
}
#[inline(always)]
pub fn mu(&self) -> MU_R {
MU_R::new(((self.bits >> 8) & 0x0f) as u8)
}
#[inline(always)]
pub fn mt(&self) -> MT_R {
MT_R::new(((self.bits >> 12) & 1) != 0)
}
#[inline(always)]
pub fn wdu(&self) -> WDU_R {
WDU_R::new(((self.bits >> 13) & 7) as u8)
}
#[inline(always)]
pub fn yu(&self) -> YU_R {
YU_R::new(((self.bits >> 16) & 0x0f) as u8)
}
#[inline(always)]
pub fn yt(&self) -> YT_R {
YT_R::new(((self.bits >> 20) & 0x0f) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("DR")
.field("yt", &self.yt())
.field("yu", &self.yu())
.field("wdu", &self.wdu())
.field("mt", &self.mt())
.field("mu", &self.mu())
.field("dt", &self.dt())
.field("du", &self.du())
.finish()
}
}
impl W {
#[inline(always)]
pub fn du(&mut self) -> DU_W<DRrs> {
DU_W::new(self, 0)
}
#[inline(always)]
pub fn dt(&mut self) -> DT_W<DRrs> {
DT_W::new(self, 4)
}
#[inline(always)]
pub fn mu(&mut self) -> MU_W<DRrs> {
MU_W::new(self, 8)
}
#[inline(always)]
pub fn mt(&mut self) -> MT_W<DRrs> {
MT_W::new(self, 12)
}
#[inline(always)]
pub fn wdu(&mut self) -> WDU_W<DRrs> {
WDU_W::new(self, 13)
}
#[inline(always)]
pub fn yu(&mut self) -> YU_W<DRrs> {
YU_W::new(self, 16)
}
#[inline(always)]
pub fn yt(&mut self) -> YT_W<DRrs> {
YT_W::new(self, 20)
}
}
pub struct DRrs;
impl crate::RegisterSpec for DRrs {
type Ux = u32;
}
impl crate::Readable for DRrs {}
impl crate::Writable for DRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for DRrs {
const RESET_VALUE: u32 = 0x2101;
}