pub type R = crate::R<CLKDIVrs>;
pub type W = crate::W<CLKDIVrs>;
pub type DivR = crate::FieldReader<u32>;
pub type DivW<'a, REG> = crate::FieldWriter<'a, REG, 20, u32>;
pub type AutobaudenR = crate::BitReader;
pub type AutobaudenW<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn div(&self) -> DivR {
DivR::new((self.bits >> 3) & 0x000f_ffff)
}
#[inline(always)]
pub fn autobauden(&self) -> AutobaudenR {
AutobaudenR::new(((self.bits >> 31) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CLKDIV")
.field("div", &self.div())
.field("autobauden", &self.autobauden())
.finish()
}
}
impl W {
#[inline(always)]
pub fn div(&mut self) -> DivW<'_, CLKDIVrs> {
DivW::new(self, 3)
}
#[inline(always)]
pub fn autobauden(&mut self) -> AutobaudenW<'_, CLKDIVrs> {
AutobaudenW::new(self, 31)
}
}
pub struct CLKDIVrs;
impl crate::RegisterSpec for CLKDIVrs {
type Ux = u32;
}
impl crate::Readable for CLKDIVrs {}
impl crate::Writable for CLKDIVrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for CLKDIVrs {}