pub type R = crate::R<DRrs>;
pub type BYTE_R = crate::FieldReader;
impl R {
#[inline(always)]
pub fn byte(&self, n: u8) -> BYTE_R {
#[allow(clippy::no_effect)]
[(); 4][n as usize];
BYTE_R::new(((self.bits >> (n * 8)) & 0xff) as u8)
}
#[inline(always)]
pub fn byte_iter(&self) -> impl Iterator<Item = BYTE_R> + '_ {
(0..4).map(move |n| BYTE_R::new(((self.bits >> (n * 8)) & 0xff) as u8))
}
#[inline(always)]
pub fn byte0(&self) -> BYTE_R {
BYTE_R::new((self.bits & 0xff) as u8)
}
#[inline(always)]
pub fn byte1(&self) -> BYTE_R {
BYTE_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[inline(always)]
pub fn byte2(&self) -> BYTE_R {
BYTE_R::new(((self.bits >> 16) & 0xff) as u8)
}
#[inline(always)]
pub fn byte3(&self) -> BYTE_R {
BYTE_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()
}
}
pub struct DRrs;
impl crate::RegisterSpec for DRrs {
type Ux = u32;
}
impl crate::Readable for DRrs {}
impl crate::Resettable for DRrs {}