pub type R = crate::R<I2SCFGRrs>;
pub type W = crate::W<I2SCFGRrs>;
pub type CHLEN_R = crate::BitReader;
pub type CHLEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type DATLEN_R = crate::FieldReader;
pub type DATLEN_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type CKPOL_R = crate::BitReader;
pub type CKPOL_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type I2SSTD_R = crate::FieldReader;
pub type I2SSTD_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type PCMSYNC_R = crate::BitReader;
pub type PCMSYNC_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type I2SCFG_R = crate::FieldReader;
pub type I2SCFG_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type I2SE_R = crate::BitReader;
pub type I2SE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type I2SMOD_R = crate::BitReader;
pub type I2SMOD_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn chlen(&self) -> CHLEN_R {
CHLEN_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn datlen(&self) -> DATLEN_R {
DATLEN_R::new(((self.bits >> 1) & 3) as u8)
}
#[inline(always)]
pub fn ckpol(&self) -> CKPOL_R {
CKPOL_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn i2sstd(&self) -> I2SSTD_R {
I2SSTD_R::new(((self.bits >> 4) & 3) as u8)
}
#[inline(always)]
pub fn pcmsync(&self) -> PCMSYNC_R {
PCMSYNC_R::new(((self.bits >> 7) & 1) != 0)
}
#[inline(always)]
pub fn i2scfg(&self) -> I2SCFG_R {
I2SCFG_R::new(((self.bits >> 8) & 3) as u8)
}
#[inline(always)]
pub fn i2se(&self) -> I2SE_R {
I2SE_R::new(((self.bits >> 10) & 1) != 0)
}
#[inline(always)]
pub fn i2smod(&self) -> I2SMOD_R {
I2SMOD_R::new(((self.bits >> 11) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("I2SCFGR")
.field("i2smod", &self.i2smod())
.field("i2se", &self.i2se())
.field("i2scfg", &self.i2scfg())
.field("pcmsync", &self.pcmsync())
.field("i2sstd", &self.i2sstd())
.field("ckpol", &self.ckpol())
.field("datlen", &self.datlen())
.field("chlen", &self.chlen())
.finish()
}
}
impl W {
#[inline(always)]
pub fn chlen(&mut self) -> CHLEN_W<I2SCFGRrs> {
CHLEN_W::new(self, 0)
}
#[inline(always)]
pub fn datlen(&mut self) -> DATLEN_W<I2SCFGRrs> {
DATLEN_W::new(self, 1)
}
#[inline(always)]
pub fn ckpol(&mut self) -> CKPOL_W<I2SCFGRrs> {
CKPOL_W::new(self, 3)
}
#[inline(always)]
pub fn i2sstd(&mut self) -> I2SSTD_W<I2SCFGRrs> {
I2SSTD_W::new(self, 4)
}
#[inline(always)]
pub fn pcmsync(&mut self) -> PCMSYNC_W<I2SCFGRrs> {
PCMSYNC_W::new(self, 7)
}
#[inline(always)]
pub fn i2scfg(&mut self) -> I2SCFG_W<I2SCFGRrs> {
I2SCFG_W::new(self, 8)
}
#[inline(always)]
pub fn i2se(&mut self) -> I2SE_W<I2SCFGRrs> {
I2SE_W::new(self, 10)
}
#[inline(always)]
pub fn i2smod(&mut self) -> I2SMOD_W<I2SCFGRrs> {
I2SMOD_W::new(self, 11)
}
}
pub struct I2SCFGRrs;
impl crate::RegisterSpec for I2SCFGRrs {
type Ux = u16;
}
impl crate::Readable for I2SCFGRrs {}
impl crate::Writable for I2SCFGRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for I2SCFGRrs {}