pub type R = crate::R<CRRCRrs>;
pub type W = crate::W<CRRCRrs>;
pub type HSI48ON_R = crate::BitReader;
pub type HSI48ON_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type HSI48RDY_R = crate::BitReader;
pub type HSI48DIV6EN_R = crate::BitReader;
pub type HSI48DIV6EN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type HSI48CAL_R = crate::FieldReader;
impl R {
#[inline(always)]
pub fn hsi48on(&self) -> HSI48ON_R {
HSI48ON_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn hsi48rdy(&self) -> HSI48RDY_R {
HSI48RDY_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn hsi48div6en(&self) -> HSI48DIV6EN_R {
HSI48DIV6EN_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn hsi48cal(&self) -> HSI48CAL_R {
HSI48CAL_R::new(((self.bits >> 8) & 0xff) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CRRCR")
.field("hsi48cal", &self.hsi48cal())
.field("hsi48rdy", &self.hsi48rdy())
.field("hsi48on", &self.hsi48on())
.field("hsi48div6en", &self.hsi48div6en())
.finish()
}
}
impl W {
#[inline(always)]
pub fn hsi48on(&mut self) -> HSI48ON_W<CRRCRrs> {
HSI48ON_W::new(self, 0)
}
#[inline(always)]
pub fn hsi48div6en(&mut self) -> HSI48DIV6EN_W<CRRCRrs> {
HSI48DIV6EN_W::new(self, 2)
}
}
pub struct CRRCRrs;
impl crate::RegisterSpec for CRRCRrs {
type Ux = u32;
}
impl crate::Readable for CRRCRrs {}
impl crate::Writable for CRRCRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for CRRCRrs {}