pub type R = crate::R<CCIPR2rs>;
pub type W = crate::W<CCIPR2rs>;
pub type I2C4SEL_R = crate::FieldReader;
pub type I2C4SEL_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type DFSDMSEL_R = crate::BitReader;
pub type DFSDMSEL_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type ADFSDMSEL_R = crate::FieldReader;
pub type ADFSDMSEL_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type SAI1SEL_R = crate::FieldReader;
pub type SAI1SEL_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
pub type SAI2SEL_R = crate::FieldReader;
pub type SAI2SEL_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
pub type DSISEL_R = crate::BitReader;
pub type DSISEL_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type SDMMCSEL_R = crate::BitReader;
pub type SDMMCSEL_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type PLLSAI2DIVR_R = crate::FieldReader;
pub type PLLSAI2DIVR_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type OSPISEL_R = crate::FieldReader;
pub type OSPISEL_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
impl R {
#[inline(always)]
pub fn i2c4sel(&self) -> I2C4SEL_R {
I2C4SEL_R::new((self.bits & 3) as u8)
}
#[inline(always)]
pub fn dfsdmsel(&self) -> DFSDMSEL_R {
DFSDMSEL_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn adfsdmsel(&self) -> ADFSDMSEL_R {
ADFSDMSEL_R::new(((self.bits >> 3) & 3) as u8)
}
#[inline(always)]
pub fn sai1sel(&self) -> SAI1SEL_R {
SAI1SEL_R::new(((self.bits >> 5) & 7) as u8)
}
#[inline(always)]
pub fn sai2sel(&self) -> SAI2SEL_R {
SAI2SEL_R::new(((self.bits >> 8) & 7) as u8)
}
#[inline(always)]
pub fn dsisel(&self) -> DSISEL_R {
DSISEL_R::new(((self.bits >> 12) & 1) != 0)
}
#[inline(always)]
pub fn sdmmcsel(&self) -> SDMMCSEL_R {
SDMMCSEL_R::new(((self.bits >> 14) & 1) != 0)
}
#[inline(always)]
pub fn pllsai2divr(&self) -> PLLSAI2DIVR_R {
PLLSAI2DIVR_R::new(((self.bits >> 16) & 3) as u8)
}
#[inline(always)]
pub fn ospisel(&self) -> OSPISEL_R {
OSPISEL_R::new(((self.bits >> 20) & 3) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CCIPR2")
.field("i2c4sel", &self.i2c4sel())
.field("dfsdmsel", &self.dfsdmsel())
.field("adfsdmsel", &self.adfsdmsel())
.field("sai1sel", &self.sai1sel())
.field("sai2sel", &self.sai2sel())
.field("dsisel", &self.dsisel())
.field("sdmmcsel", &self.sdmmcsel())
.field("pllsai2divr", &self.pllsai2divr())
.field("ospisel", &self.ospisel())
.finish()
}
}
impl W {
#[inline(always)]
pub fn i2c4sel(&mut self) -> I2C4SEL_W<CCIPR2rs> {
I2C4SEL_W::new(self, 0)
}
#[inline(always)]
pub fn dfsdmsel(&mut self) -> DFSDMSEL_W<CCIPR2rs> {
DFSDMSEL_W::new(self, 2)
}
#[inline(always)]
pub fn adfsdmsel(&mut self) -> ADFSDMSEL_W<CCIPR2rs> {
ADFSDMSEL_W::new(self, 3)
}
#[inline(always)]
pub fn sai1sel(&mut self) -> SAI1SEL_W<CCIPR2rs> {
SAI1SEL_W::new(self, 5)
}
#[inline(always)]
pub fn sai2sel(&mut self) -> SAI2SEL_W<CCIPR2rs> {
SAI2SEL_W::new(self, 8)
}
#[inline(always)]
pub fn dsisel(&mut self) -> DSISEL_W<CCIPR2rs> {
DSISEL_W::new(self, 12)
}
#[inline(always)]
pub fn sdmmcsel(&mut self) -> SDMMCSEL_W<CCIPR2rs> {
SDMMCSEL_W::new(self, 14)
}
#[inline(always)]
pub fn pllsai2divr(&mut self) -> PLLSAI2DIVR_W<CCIPR2rs> {
PLLSAI2DIVR_W::new(self, 16)
}
#[inline(always)]
pub fn ospisel(&mut self) -> OSPISEL_W<CCIPR2rs> {
OSPISEL_W::new(self, 20)
}
}
pub struct CCIPR2rs;
impl crate::RegisterSpec for CCIPR2rs {
type Ux = u32;
}
impl crate::Readable for CCIPR2rs {}
impl crate::Writable for CCIPR2rs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for CCIPR2rs {}