pub type R = crate::R<CALSORrs>;
pub type W = crate::W<CALSORrs>;
pub type FINE_R = crate::FieldReader;
pub type FINE_W<'a, REG> = crate::FieldWriter<'a, REG, 7>;
pub type COARSE_R = crate::FieldReader;
pub type COARSE_W<'a, REG> = crate::FieldWriter<'a, REG, 5>;
impl R {
#[inline(always)]
pub fn fine(&self) -> FINE_R {
FINE_R::new((self.bits & 0x7f) as u8)
}
#[inline(always)]
pub fn coarse(&self) -> COARSE_R {
COARSE_R::new(((self.bits >> 16) & 0x1f) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CALSOR")
.field("fine", &self.fine())
.field("coarse", &self.coarse())
.finish()
}
}
impl W {
#[inline(always)]
pub fn fine(&mut self) -> FINE_W<CALSORrs> {
FINE_W::new(self, 0)
}
#[inline(always)]
pub fn coarse(&mut self) -> COARSE_W<CALSORrs> {
COARSE_W::new(self, 16)
}
}
pub struct CALSORrs;
impl crate::RegisterSpec for CALSORrs {
type Ux = u32;
}
impl crate::Readable for CALSORrs {}
impl crate::Writable for CALSORrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for CALSORrs {}