pub type R = crate::R<TDLRrs>;
pub type W = crate::W<TDLRrs>;
pub type DATA_R = crate::FieldReader;
pub type DATA_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
impl R {
#[inline(always)]
pub fn data(&self, n: u8) -> DATA_R {
#[allow(clippy::no_effect)]
[(); 4][n as usize];
DATA_R::new(((self.bits >> (n * 8)) & 0xff) as u8)
}
#[inline(always)]
pub fn data_iter(&self) -> impl Iterator<Item = DATA_R> + '_ {
(0..4).map(move |n| DATA_R::new(((self.bits >> (n * 8)) & 0xff) as u8))
}
#[inline(always)]
pub fn data0(&self) -> DATA_R {
DATA_R::new((self.bits & 0xff) as u8)
}
#[inline(always)]
pub fn data1(&self) -> DATA_R {
DATA_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[inline(always)]
pub fn data2(&self) -> DATA_R {
DATA_R::new(((self.bits >> 16) & 0xff) as u8)
}
#[inline(always)]
pub fn data3(&self) -> DATA_R {
DATA_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("TDLR")
.field("data0", &self.data0())
.field("data1", &self.data1())
.field("data2", &self.data2())
.field("data3", &self.data3())
.finish()
}
}
impl W {
#[inline(always)]
pub fn data(&mut self, n: u8) -> DATA_W<TDLRrs> {
#[allow(clippy::no_effect)]
[(); 4][n as usize];
DATA_W::new(self, n * 8)
}
#[inline(always)]
pub fn data0(&mut self) -> DATA_W<TDLRrs> {
DATA_W::new(self, 0)
}
#[inline(always)]
pub fn data1(&mut self) -> DATA_W<TDLRrs> {
DATA_W::new(self, 8)
}
#[inline(always)]
pub fn data2(&mut self) -> DATA_W<TDLRrs> {
DATA_W::new(self, 16)
}
#[inline(always)]
pub fn data3(&mut self) -> DATA_W<TDLRrs> {
DATA_W::new(self, 24)
}
}
pub struct TDLRrs;
impl crate::RegisterSpec for TDLRrs {
type Ux = u32;
}
impl crate::Readable for TDLRrs {}
impl crate::Writable for TDLRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for TDLRrs {}