pub type R = crate::R<CALFACTrs>;
pub type W = crate::W<CALFACTrs>;
pub type CALFACT_S_R = crate::FieldReader<u16>;
pub type CALFACT_S_W<'a, REG> = crate::FieldWriter<'a, REG, 11, u16, crate::Safe>;
pub type CALFACT_D_R = crate::FieldReader<u16>;
pub type CALFACT_D_W<'a, REG> = crate::FieldWriter<'a, REG, 11, u16, crate::Safe>;
impl R {
#[inline(always)]
pub fn calfact_s(&self) -> CALFACT_S_R {
CALFACT_S_R::new((self.bits & 0x07ff) as u16)
}
#[inline(always)]
pub fn calfact_d(&self) -> CALFACT_D_R {
CALFACT_D_R::new(((self.bits >> 16) & 0x07ff) as u16)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CALFACT")
.field("calfact_d", &self.calfact_d())
.field("calfact_s", &self.calfact_s())
.finish()
}
}
impl W {
#[inline(always)]
pub fn calfact_s(&mut self) -> CALFACT_S_W<CALFACTrs> {
CALFACT_S_W::new(self, 0)
}
#[inline(always)]
pub fn calfact_d(&mut self) -> CALFACT_D_W<CALFACTrs> {
CALFACT_D_W::new(self, 16)
}
}
pub struct CALFACTrs;
impl crate::RegisterSpec for CALFACTrs {
type Ux = u32;
}
impl crate::Readable for CALFACTrs {}
impl crate::Writable for CALFACTrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for CALFACTrs {}