pub type R = crate::R<WRPCRrs>;
pub type W = crate::W<WRPCRrs>;
pub type PLLEN_R = crate::BitReader;
pub type PLLEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type NDIV_R = crate::FieldReader;
pub type NDIV_W<'a, REG> = crate::FieldWriter<'a, REG, 7>;
pub type IDF_R = crate::FieldReader;
pub type IDF_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
pub type ODF_R = crate::FieldReader;
pub type ODF_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type REGEN_R = crate::BitReader;
pub type REGEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type BGREN_R = crate::BitReader;
pub type BGREN_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn pllen(&self) -> PLLEN_R {
PLLEN_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn ndiv(&self) -> NDIV_R {
NDIV_R::new(((self.bits >> 2) & 0x7f) as u8)
}
#[inline(always)]
pub fn idf(&self) -> IDF_R {
IDF_R::new(((self.bits >> 11) & 0x0f) as u8)
}
#[inline(always)]
pub fn odf(&self) -> ODF_R {
ODF_R::new(((self.bits >> 16) & 3) as u8)
}
#[inline(always)]
pub fn regen(&self) -> REGEN_R {
REGEN_R::new(((self.bits >> 24) & 1) != 0)
}
#[inline(always)]
pub fn bgren(&self) -> BGREN_R {
BGREN_R::new(((self.bits >> 28) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("WRPCR")
.field("pllen", &self.pllen())
.field("ndiv", &self.ndiv())
.field("idf", &self.idf())
.field("odf", &self.odf())
.field("regen", &self.regen())
.field("bgren", &self.bgren())
.finish()
}
}
impl W {
#[inline(always)]
pub fn pllen(&mut self) -> PLLEN_W<WRPCRrs> {
PLLEN_W::new(self, 0)
}
#[inline(always)]
pub fn ndiv(&mut self) -> NDIV_W<WRPCRrs> {
NDIV_W::new(self, 2)
}
#[inline(always)]
pub fn idf(&mut self) -> IDF_W<WRPCRrs> {
IDF_W::new(self, 11)
}
#[inline(always)]
pub fn odf(&mut self) -> ODF_W<WRPCRrs> {
ODF_W::new(self, 16)
}
#[inline(always)]
pub fn regen(&mut self) -> REGEN_W<WRPCRrs> {
REGEN_W::new(self, 24)
}
#[inline(always)]
pub fn bgren(&mut self) -> BGREN_W<WRPCRrs> {
BGREN_W::new(self, 28)
}
}
pub struct WRPCRrs;
impl crate::RegisterSpec for WRPCRrs {
type Ux = u32;
}
impl crate::Readable for WRPCRrs {}
impl crate::Writable for WRPCRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for WRPCRrs {}