pub type R = crate::R<QMEM2rs>;
pub type W = crate::W<QMEM2rs>;
pub type QCOEF0_R = crate::FieldReader;
pub type QCOEF0_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
pub type QCOEF1_R = crate::FieldReader;
pub type QCOEF1_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
pub type QCOEF2_R = crate::FieldReader;
pub type QCOEF2_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
pub type QCOEF3_R = crate::FieldReader;
pub type QCOEF3_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
impl R {
#[inline(always)]
pub fn qcoef0(&self) -> QCOEF0_R {
QCOEF0_R::new((self.bits & 0xff) as u8)
}
#[inline(always)]
pub fn qcoef1(&self) -> QCOEF1_R {
QCOEF1_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[inline(always)]
pub fn qcoef2(&self) -> QCOEF2_R {
QCOEF2_R::new(((self.bits >> 16) & 0xff) as u8)
}
#[inline(always)]
pub fn qcoef3(&self) -> QCOEF3_R {
QCOEF3_R::new(((self.bits >> 24) & 0xff) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("QMEM2")
.field("qcoef0", &self.qcoef0())
.field("qcoef1", &self.qcoef1())
.field("qcoef2", &self.qcoef2())
.field("qcoef3", &self.qcoef3())
.finish()
}
}
impl W {
#[inline(always)]
pub fn qcoef0(&mut self) -> QCOEF0_W<QMEM2rs> {
QCOEF0_W::new(self, 0)
}
#[inline(always)]
pub fn qcoef1(&mut self) -> QCOEF1_W<QMEM2rs> {
QCOEF1_W::new(self, 8)
}
#[inline(always)]
pub fn qcoef2(&mut self) -> QCOEF2_W<QMEM2rs> {
QCOEF2_W::new(self, 16)
}
#[inline(always)]
pub fn qcoef3(&mut self) -> QCOEF3_W<QMEM2rs> {
QCOEF3_W::new(self, 24)
}
}
pub struct QMEM2rs;
impl crate::RegisterSpec for QMEM2rs {
type Ux = u32;
}
impl crate::Readable for QMEM2rs {}
impl crate::Writable for QMEM2rs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for QMEM2rs {}