pub type R = crate::R<CRELrs>;
pub type DAY_R = crate::FieldReader;
pub type MON_R = crate::FieldReader;
pub type YEAR_R = crate::FieldReader;
pub type SUBSTEP_R = crate::FieldReader;
pub type STEP_R = crate::FieldReader;
pub type REL_R = crate::FieldReader;
impl R {
#[inline(always)]
pub fn day(&self) -> DAY_R {
DAY_R::new((self.bits & 0xff) as u8)
}
#[inline(always)]
pub fn mon(&self) -> MON_R {
MON_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[inline(always)]
pub fn year(&self) -> YEAR_R {
YEAR_R::new(((self.bits >> 16) & 0x0f) as u8)
}
#[inline(always)]
pub fn substep(&self) -> SUBSTEP_R {
SUBSTEP_R::new(((self.bits >> 20) & 0x0f) as u8)
}
#[inline(always)]
pub fn step(&self) -> STEP_R {
STEP_R::new(((self.bits >> 24) & 0x0f) as u8)
}
#[inline(always)]
pub fn rel(&self) -> REL_R {
REL_R::new(((self.bits >> 28) & 0x0f) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CREL")
.field("day", &self.day())
.field("mon", &self.mon())
.field("year", &self.year())
.field("substep", &self.substep())
.field("step", &self.step())
.field("rel", &self.rel())
.finish()
}
}
pub struct CRELrs;
impl crate::RegisterSpec for CRELrs {
type Ux = u32;
}
impl crate::Readable for CRELrs {}
impl crate::Resettable for CRELrs {
const RESET_VALUE: u32 = 0x3214_1218;
}