pub type R = crate::R<DRrs>;
pub type W = crate::W<DRrs>;
pub type BYTE0_R = crate::FieldReader;
pub type BYTE0_W<'a, REG> = crate::FieldWriter<'a, REG, 8, u8, crate::Safe>;
pub type BYTE1_R = crate::FieldReader;
pub type BYTE1_W<'a, REG> = crate::FieldWriter<'a, REG, 8, u8, crate::Safe>;
pub type BYTE2_R = crate::FieldReader;
pub type BYTE2_W<'a, REG> = crate::FieldWriter<'a, REG, 8, u8, crate::Safe>;
pub type BYTE3_R = crate::FieldReader;
pub type BYTE3_W<'a, REG> = crate::FieldWriter<'a, REG, 8, u8, crate::Safe>;
impl R {
#[inline(always)]
pub fn byte0(&self) -> BYTE0_R {
BYTE0_R::new((self.bits & 0xff) as u8)
}
#[inline(always)]
pub fn byte1(&self) -> BYTE1_R {
BYTE1_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[inline(always)]
pub fn byte2(&self) -> BYTE2_R {
BYTE2_R::new(((self.bits >> 16) & 0xff) as u8)
}
#[inline(always)]
pub fn byte3(&self) -> BYTE3_R {
BYTE3_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("DR")
.field("byte0", &self.byte0())
.field("byte1", &self.byte1())
.field("byte2", &self.byte2())
.field("byte3", &self.byte3())
.finish()
}
}
impl W {
#[inline(always)]
pub fn byte0(&mut self) -> BYTE0_W<DRrs> {
BYTE0_W::new(self, 0)
}
#[inline(always)]
pub fn byte1(&mut self) -> BYTE1_W<DRrs> {
BYTE1_W::new(self, 8)
}
#[inline(always)]
pub fn byte2(&mut self) -> BYTE2_W<DRrs> {
BYTE2_W::new(self, 16)
}
#[inline(always)]
pub fn byte3(&mut self) -> BYTE3_W<DRrs> {
BYTE3_W::new(self, 24)
}
}
pub struct DRrs;
impl crate::RegisterSpec for DRrs {
type Ux = u32;
}
impl crate::Readable for DRrs {}
impl crate::Writable for DRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for DRrs {}