pub type R = crate::R<PLLCFGRrs>;
pub type W = crate::W<PLLCFGRrs>;
pub type PLLSRC_R = crate::FieldReader;
pub type PLLSRC_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type PLLM_R = crate::FieldReader;
pub type PLLM_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
pub type PLLN_R = crate::FieldReader;
pub type PLLN_W<'a, REG> = crate::FieldWriter<'a, REG, 7>;
pub type PLLPEN_R = crate::BitReader;
pub type PLLPEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type PLLP_R = crate::BitReader;
pub type PLLP_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type PLLQEN_R = crate::BitReader;
pub type PLLQEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type PLLQ_R = crate::FieldReader;
pub type PLLQ_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type PLLREN_R = crate::BitReader;
pub type PLLREN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type PLLR_R = crate::FieldReader;
pub type PLLR_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type PLLPDIV_R = crate::FieldReader;
pub type PLLPDIV_W<'a, REG> = crate::FieldWriter<'a, REG, 5>;
impl R {
#[inline(always)]
pub fn pllsrc(&self) -> PLLSRC_R {
PLLSRC_R::new((self.bits & 3) as u8)
}
#[inline(always)]
pub fn pllm(&self) -> PLLM_R {
PLLM_R::new(((self.bits >> 4) & 7) as u8)
}
#[inline(always)]
pub fn plln(&self) -> PLLN_R {
PLLN_R::new(((self.bits >> 8) & 0x7f) as u8)
}
#[inline(always)]
pub fn pllpen(&self) -> PLLPEN_R {
PLLPEN_R::new(((self.bits >> 16) & 1) != 0)
}
#[inline(always)]
pub fn pllp(&self) -> PLLP_R {
PLLP_R::new(((self.bits >> 17) & 1) != 0)
}
#[inline(always)]
pub fn pllqen(&self) -> PLLQEN_R {
PLLQEN_R::new(((self.bits >> 20) & 1) != 0)
}
#[inline(always)]
pub fn pllq(&self) -> PLLQ_R {
PLLQ_R::new(((self.bits >> 21) & 3) as u8)
}
#[inline(always)]
pub fn pllren(&self) -> PLLREN_R {
PLLREN_R::new(((self.bits >> 24) & 1) != 0)
}
#[inline(always)]
pub fn pllr(&self) -> PLLR_R {
PLLR_R::new(((self.bits >> 25) & 3) as u8)
}
#[inline(always)]
pub fn pllpdiv(&self) -> PLLPDIV_R {
PLLPDIV_R::new(((self.bits >> 27) & 0x1f) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("PLLCFGR")
.field("pllr", &self.pllr())
.field("pllren", &self.pllren())
.field("pllq", &self.pllq())
.field("pllqen", &self.pllqen())
.field("pllp", &self.pllp())
.field("pllpen", &self.pllpen())
.field("plln", &self.plln())
.field("pllm", &self.pllm())
.field("pllsrc", &self.pllsrc())
.field("pllpdiv", &self.pllpdiv())
.finish()
}
}
impl W {
#[inline(always)]
pub fn pllsrc(&mut self) -> PLLSRC_W<PLLCFGRrs> {
PLLSRC_W::new(self, 0)
}
#[inline(always)]
pub fn pllm(&mut self) -> PLLM_W<PLLCFGRrs> {
PLLM_W::new(self, 4)
}
#[inline(always)]
pub fn plln(&mut self) -> PLLN_W<PLLCFGRrs> {
PLLN_W::new(self, 8)
}
#[inline(always)]
pub fn pllpen(&mut self) -> PLLPEN_W<PLLCFGRrs> {
PLLPEN_W::new(self, 16)
}
#[inline(always)]
pub fn pllp(&mut self) -> PLLP_W<PLLCFGRrs> {
PLLP_W::new(self, 17)
}
#[inline(always)]
pub fn pllqen(&mut self) -> PLLQEN_W<PLLCFGRrs> {
PLLQEN_W::new(self, 20)
}
#[inline(always)]
pub fn pllq(&mut self) -> PLLQ_W<PLLCFGRrs> {
PLLQ_W::new(self, 21)
}
#[inline(always)]
pub fn pllren(&mut self) -> PLLREN_W<PLLCFGRrs> {
PLLREN_W::new(self, 24)
}
#[inline(always)]
pub fn pllr(&mut self) -> PLLR_W<PLLCFGRrs> {
PLLR_W::new(self, 25)
}
#[inline(always)]
pub fn pllpdiv(&mut self) -> PLLPDIV_W<PLLCFGRrs> {
PLLPDIV_W::new(self, 27)
}
}
pub struct PLLCFGRrs;
impl crate::RegisterSpec for PLLCFGRrs {
type Ux = u32;
}
impl crate::Readable for PLLCFGRrs {}
impl crate::Writable for PLLCFGRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for PLLCFGRrs {
const RESET_VALUE: u32 = 0x1000;
}