pub type R = crate::R<DTR2rs>;
pub type W = crate::W<DTR2rs>;
pub type DTGF_R = crate::FieldReader;
pub type DTGF_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
pub type DTAE_R = crate::BitReader;
pub type DTAE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type DTPE_R = crate::BitReader;
pub type DTPE_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn dtgf(&self) -> DTGF_R {
DTGF_R::new((self.bits & 0xff) as u8)
}
#[inline(always)]
pub fn dtae(&self) -> DTAE_R {
DTAE_R::new(((self.bits >> 16) & 1) != 0)
}
#[inline(always)]
pub fn dtpe(&self) -> DTPE_R {
DTPE_R::new(((self.bits >> 17) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("DTR2")
.field("dtpe", &self.dtpe())
.field("dtae", &self.dtae())
.field("dtgf", &self.dtgf())
.finish()
}
}
impl W {
#[inline(always)]
pub fn dtgf(&mut self) -> DTGF_W<DTR2rs> {
DTGF_W::new(self, 0)
}
#[inline(always)]
pub fn dtae(&mut self) -> DTAE_W<DTR2rs> {
DTAE_W::new(self, 16)
}
#[inline(always)]
pub fn dtpe(&mut self) -> DTPE_W<DTR2rs> {
DTPE_W::new(self, 17)
}
}
pub struct DTR2rs;
impl crate::RegisterSpec for DTR2rs {
type Ux = u32;
}
impl crate::Readable for DTR2rs {}
impl crate::Writable for DTR2rs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for DTR2rs {}