pub type R = crate::R<PLLSAI2CFGRrs>;
pub type W = crate::W<PLLSAI2CFGRrs>;
pub type PLLSAI2M_R = crate::FieldReader;
pub type PLLSAI2M_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
pub type PLLSAI2N_R = crate::FieldReader;
pub type PLLSAI2N_W<'a, REG> = crate::FieldWriter<'a, REG, 7>;
pub type PLLSAI2PEN_R = crate::BitReader;
pub type PLLSAI2PEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type PLLSAI2P_R = crate::BitReader;
pub type PLLSAI2P_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type PLLSAI2QEN_R = crate::BitReader;
pub type PLLSAI2QEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type PLLSAI2Q_R = crate::FieldReader;
pub type PLLSAI2Q_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type PLLSAI2REN_R = crate::BitReader;
pub type PLLSAI2REN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type PLLSAI2R_R = crate::FieldReader;
pub type PLLSAI2R_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type PLLSAI2PDIV_R = crate::FieldReader;
pub type PLLSAI2PDIV_W<'a, REG> = crate::FieldWriter<'a, REG, 5>;
impl R {
#[inline(always)]
pub fn pllsai2m(&self) -> PLLSAI2M_R {
PLLSAI2M_R::new(((self.bits >> 4) & 0x0f) as u8)
}
#[inline(always)]
pub fn pllsai2n(&self) -> PLLSAI2N_R {
PLLSAI2N_R::new(((self.bits >> 8) & 0x7f) as u8)
}
#[inline(always)]
pub fn pllsai2pen(&self) -> PLLSAI2PEN_R {
PLLSAI2PEN_R::new(((self.bits >> 16) & 1) != 0)
}
#[inline(always)]
pub fn pllsai2p(&self) -> PLLSAI2P_R {
PLLSAI2P_R::new(((self.bits >> 17) & 1) != 0)
}
#[inline(always)]
pub fn pllsai2qen(&self) -> PLLSAI2QEN_R {
PLLSAI2QEN_R::new(((self.bits >> 20) & 1) != 0)
}
#[inline(always)]
pub fn pllsai2q(&self) -> PLLSAI2Q_R {
PLLSAI2Q_R::new(((self.bits >> 21) & 3) as u8)
}
#[inline(always)]
pub fn pllsai2ren(&self) -> PLLSAI2REN_R {
PLLSAI2REN_R::new(((self.bits >> 24) & 1) != 0)
}
#[inline(always)]
pub fn pllsai2r(&self) -> PLLSAI2R_R {
PLLSAI2R_R::new(((self.bits >> 25) & 3) as u8)
}
#[inline(always)]
pub fn pllsai2pdiv(&self) -> PLLSAI2PDIV_R {
PLLSAI2PDIV_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("PLLSAI2CFGR")
.field("pllsai2pdiv", &self.pllsai2pdiv())
.field("pllsai2r", &self.pllsai2r())
.field("pllsai2ren", &self.pllsai2ren())
.field("pllsai2q", &self.pllsai2q())
.field("pllsai2qen", &self.pllsai2qen())
.field("pllsai2p", &self.pllsai2p())
.field("pllsai2pen", &self.pllsai2pen())
.field("pllsai2n", &self.pllsai2n())
.field("pllsai2m", &self.pllsai2m())
.finish()
}
}
impl W {
#[inline(always)]
pub fn pllsai2m(&mut self) -> PLLSAI2M_W<PLLSAI2CFGRrs> {
PLLSAI2M_W::new(self, 4)
}
#[inline(always)]
pub fn pllsai2n(&mut self) -> PLLSAI2N_W<PLLSAI2CFGRrs> {
PLLSAI2N_W::new(self, 8)
}
#[inline(always)]
pub fn pllsai2pen(&mut self) -> PLLSAI2PEN_W<PLLSAI2CFGRrs> {
PLLSAI2PEN_W::new(self, 16)
}
#[inline(always)]
pub fn pllsai2p(&mut self) -> PLLSAI2P_W<PLLSAI2CFGRrs> {
PLLSAI2P_W::new(self, 17)
}
#[inline(always)]
pub fn pllsai2qen(&mut self) -> PLLSAI2QEN_W<PLLSAI2CFGRrs> {
PLLSAI2QEN_W::new(self, 20)
}
#[inline(always)]
pub fn pllsai2q(&mut self) -> PLLSAI2Q_W<PLLSAI2CFGRrs> {
PLLSAI2Q_W::new(self, 21)
}
#[inline(always)]
pub fn pllsai2ren(&mut self) -> PLLSAI2REN_W<PLLSAI2CFGRrs> {
PLLSAI2REN_W::new(self, 24)
}
#[inline(always)]
pub fn pllsai2r(&mut self) -> PLLSAI2R_W<PLLSAI2CFGRrs> {
PLLSAI2R_W::new(self, 25)
}
#[inline(always)]
pub fn pllsai2pdiv(&mut self) -> PLLSAI2PDIV_W<PLLSAI2CFGRrs> {
PLLSAI2PDIV_W::new(self, 27)
}
}
pub struct PLLSAI2CFGRrs;
impl crate::RegisterSpec for PLLSAI2CFGRrs {
type Ux = u32;
}
impl crate::Readable for PLLSAI2CFGRrs {}
impl crate::Writable for PLLSAI2CFGRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for PLLSAI2CFGRrs {
const RESET_VALUE: u32 = 0x1000;
}