pub type R = crate::R<PDMDLYrs>;
pub type W = crate::W<PDMDLYrs>;
pub type DLYML_R = crate::FieldReader;
pub type DLYML_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
pub type DLYMR_R = crate::FieldReader;
pub type DLYMR_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
impl R {
#[inline(always)]
pub fn dlyml(&self, n: u8) -> DLYML_R {
#[allow(clippy::no_effect)] [(); 4][n as usize];
DLYML_R::new(((self.bits >> (n * 8)) & 7) as u8)
}
#[inline(always)]
pub fn dlyml_iter(&self) -> impl Iterator<Item = DLYML_R> + '_ {
(0..4).map(move |n| DLYML_R::new(((self.bits >> (n * 8)) & 7) as u8))
}
#[inline(always)]
pub fn dlym1l(&self) -> DLYML_R {
DLYML_R::new((self.bits & 7) as u8)
}
#[inline(always)]
pub fn dlym2l(&self) -> DLYML_R {
DLYML_R::new(((self.bits >> 8) & 7) as u8)
}
#[inline(always)]
pub fn dlym3l(&self) -> DLYML_R {
DLYML_R::new(((self.bits >> 16) & 7) as u8)
}
#[inline(always)]
pub fn dlym4l(&self) -> DLYML_R {
DLYML_R::new(((self.bits >> 24) & 7) as u8)
}
#[inline(always)]
pub fn dlymr(&self, n: u8) -> DLYMR_R {
#[allow(clippy::no_effect)] [(); 4][n as usize];
DLYMR_R::new(((self.bits >> (n * 8 + 4)) & 7) as u8)
}
#[inline(always)]
pub fn dlymr_iter(&self) -> impl Iterator<Item = DLYMR_R> + '_ {
(0..4).map(move |n| DLYMR_R::new(((self.bits >> (n * 8 + 4)) & 7) as u8))
}
#[inline(always)]
pub fn dlym1r(&self) -> DLYMR_R {
DLYMR_R::new(((self.bits >> 4) & 7) as u8)
}
#[inline(always)]
pub fn dlym2r(&self) -> DLYMR_R {
DLYMR_R::new(((self.bits >> 12) & 7) as u8)
}
#[inline(always)]
pub fn dlym3r(&self) -> DLYMR_R {
DLYMR_R::new(((self.bits >> 20) & 7) as u8)
}
#[inline(always)]
pub fn dlym4r(&self) -> DLYMR_R {
DLYMR_R::new(((self.bits >> 28) & 7) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("PDMDLY")
.field("dlym1l", &self.dlym1l())
.field("dlym2l", &self.dlym2l())
.field("dlym3l", &self.dlym3l())
.field("dlym4l", &self.dlym4l())
.field("dlym1r", &self.dlym1r())
.field("dlym2r", &self.dlym2r())
.field("dlym3r", &self.dlym3r())
.field("dlym4r", &self.dlym4r())
.finish()
}
}
impl W {
#[inline(always)]
pub fn dlyml(&mut self, n: u8) -> DLYML_W<PDMDLYrs> {
#[allow(clippy::no_effect)] [(); 4][n as usize];
DLYML_W::new(self, n * 8)
}
#[inline(always)]
pub fn dlym1l(&mut self) -> DLYML_W<PDMDLYrs> {
DLYML_W::new(self, 0)
}
#[inline(always)]
pub fn dlym2l(&mut self) -> DLYML_W<PDMDLYrs> {
DLYML_W::new(self, 8)
}
#[inline(always)]
pub fn dlym3l(&mut self) -> DLYML_W<PDMDLYrs> {
DLYML_W::new(self, 16)
}
#[inline(always)]
pub fn dlym4l(&mut self) -> DLYML_W<PDMDLYrs> {
DLYML_W::new(self, 24)
}
#[inline(always)]
pub fn dlymr(&mut self, n: u8) -> DLYMR_W<PDMDLYrs> {
#[allow(clippy::no_effect)] [(); 4][n as usize];
DLYMR_W::new(self, n * 8 + 4)
}
#[inline(always)]
pub fn dlym1r(&mut self) -> DLYMR_W<PDMDLYrs> {
DLYMR_W::new(self, 4)
}
#[inline(always)]
pub fn dlym2r(&mut self) -> DLYMR_W<PDMDLYrs> {
DLYMR_W::new(self, 12)
}
#[inline(always)]
pub fn dlym3r(&mut self) -> DLYMR_W<PDMDLYrs> {
DLYMR_W::new(self, 20)
}
#[inline(always)]
pub fn dlym4r(&mut self) -> DLYMR_W<PDMDLYrs> {
DLYMR_W::new(self, 28)
}
}
pub struct PDMDLYrs;
impl crate::RegisterSpec for PDMDLYrs {
type Ux = u32;
}
impl crate::Readable for PDMDLYrs {}
impl crate::Writable for PDMDLYrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for PDMDLYrs {}