pub type R = crate::R<PRERrs>;
pub type W = crate::W<PRERrs>;
pub type PREDIV_S_R = crate::FieldReader<u16>;
pub type PREDIV_S_W<'a, REG> = crate::FieldWriter<'a, REG, 15, u16, crate::Safe>;
pub type PREDIV_A_R = crate::FieldReader;
pub type PREDIV_A_W<'a, REG> = crate::FieldWriter<'a, REG, 7, u8, crate::Safe>;
impl R {
#[inline(always)]
pub fn prediv_s(&self) -> PREDIV_S_R {
PREDIV_S_R::new((self.bits & 0x7fff) as u16)
}
#[inline(always)]
pub fn prediv_a(&self) -> PREDIV_A_R {
PREDIV_A_R::new(((self.bits >> 16) & 0x7f) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("PRER")
.field("prediv_a", &self.prediv_a())
.field("prediv_s", &self.prediv_s())
.finish()
}
}
impl W {
#[inline(always)]
pub fn prediv_s(&mut self) -> PREDIV_S_W<PRERrs> {
PREDIV_S_W::new(self, 0)
}
#[inline(always)]
pub fn prediv_a(&mut self) -> PREDIV_A_W<PRERrs> {
PREDIV_A_W::new(self, 16)
}
}
pub struct PRERrs;
impl crate::RegisterSpec for PRERrs {
type Ux = u32;
}
impl crate::Readable for PRERrs {}
impl crate::Writable for PRERrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for PRERrs {
const RESET_VALUE: u32 = 0x007f_00ff;
}