pub type R = crate::R<AMTCRrs>;
pub type W = crate::W<AMTCRrs>;
pub type EN_R = crate::BitReader;
pub type EN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type DT_R = crate::FieldReader;
pub type DT_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
impl R {
#[inline(always)]
pub fn en(&self) -> EN_R {
EN_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn dt(&self) -> DT_R {
DT_R::new(((self.bits >> 8) & 0xff) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("AMTCR").field("en", &self.en()).field("dt", &self.dt()).finish()
}
}
impl W {
#[inline(always)]
pub fn en(&mut self) -> EN_W<AMTCRrs> {
EN_W::new(self, 0)
}
#[inline(always)]
pub fn dt(&mut self) -> DT_W<AMTCRrs> {
DT_W::new(self, 8)
}
}
pub struct AMTCRrs;
impl crate::RegisterSpec for AMTCRrs {
type Ux = u32;
}
impl crate::Readable for AMTCRrs {}
impl crate::Writable for AMTCRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for AMTCRrs {}