pub type R = crate::R<PLLSAI1CFGRrs>;
pub type W = crate::W<PLLSAI1CFGRrs>;
pub type PLLSAI1N_R = crate::FieldReader;
pub type PLLSAI1N_W<'a, REG> = crate::FieldWriter<'a, REG, 7>;
pub type PLLSAI1PEN_R = crate::BitReader;
pub type PLLSAI1PEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type PLLSAI1P_R = crate::BitReader;
pub type PLLSAI1P_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type PLLSAI1QEN_R = crate::BitReader;
pub type PLLSAI1QEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type PLLSAI1Q_R = crate::FieldReader;
pub type PLLSAI1Q_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type PLLSAI1REN_R = crate::BitReader;
pub type PLLSAI1REN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type PLLSAI1R_R = crate::FieldReader;
pub type PLLSAI1R_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type PLLSAI1PDIV_R = crate::FieldReader;
pub type PLLSAI1PDIV_W<'a, REG> = crate::FieldWriter<'a, REG, 5>;
impl R {
#[inline(always)]
pub fn pllsai1n(&self) -> PLLSAI1N_R {
PLLSAI1N_R::new(((self.bits >> 8) & 0x7f) as u8)
}
#[inline(always)]
pub fn pllsai1pen(&self) -> PLLSAI1PEN_R {
PLLSAI1PEN_R::new(((self.bits >> 16) & 1) != 0)
}
#[inline(always)]
pub fn pllsai1p(&self) -> PLLSAI1P_R {
PLLSAI1P_R::new(((self.bits >> 17) & 1) != 0)
}
#[inline(always)]
pub fn pllsai1qen(&self) -> PLLSAI1QEN_R {
PLLSAI1QEN_R::new(((self.bits >> 20) & 1) != 0)
}
#[inline(always)]
pub fn pllsai1q(&self) -> PLLSAI1Q_R {
PLLSAI1Q_R::new(((self.bits >> 21) & 3) as u8)
}
#[inline(always)]
pub fn pllsai1ren(&self) -> PLLSAI1REN_R {
PLLSAI1REN_R::new(((self.bits >> 24) & 1) != 0)
}
#[inline(always)]
pub fn pllsai1r(&self) -> PLLSAI1R_R {
PLLSAI1R_R::new(((self.bits >> 25) & 3) as u8)
}
#[inline(always)]
pub fn pllsai1pdiv(&self) -> PLLSAI1PDIV_R {
PLLSAI1PDIV_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("PLLSAI1CFGR")
.field("pllsai1r", &self.pllsai1r())
.field("pllsai1ren", &self.pllsai1ren())
.field("pllsai1q", &self.pllsai1q())
.field("pllsai1qen", &self.pllsai1qen())
.field("pllsai1p", &self.pllsai1p())
.field("pllsai1pen", &self.pllsai1pen())
.field("pllsai1n", &self.pllsai1n())
.field("pllsai1pdiv", &self.pllsai1pdiv())
.finish()
}
}
impl W {
#[inline(always)]
pub fn pllsai1n(&mut self) -> PLLSAI1N_W<PLLSAI1CFGRrs> {
PLLSAI1N_W::new(self, 8)
}
#[inline(always)]
pub fn pllsai1pen(&mut self) -> PLLSAI1PEN_W<PLLSAI1CFGRrs> {
PLLSAI1PEN_W::new(self, 16)
}
#[inline(always)]
pub fn pllsai1p(&mut self) -> PLLSAI1P_W<PLLSAI1CFGRrs> {
PLLSAI1P_W::new(self, 17)
}
#[inline(always)]
pub fn pllsai1qen(&mut self) -> PLLSAI1QEN_W<PLLSAI1CFGRrs> {
PLLSAI1QEN_W::new(self, 20)
}
#[inline(always)]
pub fn pllsai1q(&mut self) -> PLLSAI1Q_W<PLLSAI1CFGRrs> {
PLLSAI1Q_W::new(self, 21)
}
#[inline(always)]
pub fn pllsai1ren(&mut self) -> PLLSAI1REN_W<PLLSAI1CFGRrs> {
PLLSAI1REN_W::new(self, 24)
}
#[inline(always)]
pub fn pllsai1r(&mut self) -> PLLSAI1R_W<PLLSAI1CFGRrs> {
PLLSAI1R_W::new(self, 25)
}
#[inline(always)]
pub fn pllsai1pdiv(&mut self) -> PLLSAI1PDIV_W<PLLSAI1CFGRrs> {
PLLSAI1PDIV_W::new(self, 27)
}
}
pub struct PLLSAI1CFGRrs;
impl crate::RegisterSpec for PLLSAI1CFGRrs {
type Ux = u32;
}
impl crate::Readable for PLLSAI1CFGRrs {}
impl crate::Writable for PLLSAI1CFGRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for PLLSAI1CFGRrs {
const RESET_VALUE: u32 = 0x1000;
}