pub type R = crate::R<DHTMEMrs>;
pub type W = crate::W<DHTMEMrs>;
pub type DATA0_R = crate::FieldReader;
pub type DATA0_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
pub type DATA1_R = crate::FieldReader;
pub type DATA1_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
pub type DATA2_R = crate::FieldReader;
pub type DATA2_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
pub type DATA3_R = crate::FieldReader;
pub type DATA3_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
impl R {
#[inline(always)]
pub fn data0(&self) -> DATA0_R {
DATA0_R::new((self.bits & 0xff) as u8)
}
#[inline(always)]
pub fn data1(&self) -> DATA1_R {
DATA1_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[inline(always)]
pub fn data2(&self) -> DATA2_R {
DATA2_R::new(((self.bits >> 16) & 0xff) as u8)
}
#[inline(always)]
pub fn data3(&self) -> DATA3_R {
DATA3_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("DHTMEM")
.field("data0", &self.data0())
.field("data1", &self.data1())
.field("data2", &self.data2())
.field("data3", &self.data3())
.finish()
}
}
impl W {
#[inline(always)]
pub fn data0(&mut self) -> DATA0_W<DHTMEMrs> {
DATA0_W::new(self, 0)
}
#[inline(always)]
pub fn data1(&mut self) -> DATA1_W<DHTMEMrs> {
DATA1_W::new(self, 8)
}
#[inline(always)]
pub fn data2(&mut self) -> DATA2_W<DHTMEMrs> {
DATA2_W::new(self, 16)
}
#[inline(always)]
pub fn data3(&mut self) -> DATA3_W<DHTMEMrs> {
DATA3_W::new(self, 24)
}
}
pub struct DHTMEMrs;
impl crate::RegisterSpec for DHTMEMrs {
type Ux = u32;
}
impl crate::Readable for DHTMEMrs {}
impl crate::Writable for DHTMEMrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for DHTMEMrs {}