pub type R = crate::R<ATCR1rs>;
pub type W = crate::W<ATCR1rs>;
pub type TAMP1AM_R = crate::BitReader;
pub type TAMP1AM_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type TAMP2AM_R = crate::BitReader;
pub type TAMP2AM_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type ATOSEL1_R = crate::FieldReader;
pub type ATOSEL1_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type ATOSEL2_R = crate::FieldReader;
pub type ATOSEL2_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type ATOSEL3_R = crate::FieldReader;
pub type ATOSEL3_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type ATCKSEL_R = crate::FieldReader;
pub type ATCKSEL_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
pub type ATPER_R = crate::FieldReader;
pub type ATPER_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
pub type ATOSHARE_R = crate::BitReader;
pub type ATOSHARE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type FLTEN_R = crate::BitReader;
pub type FLTEN_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn tamp1am(&self) -> TAMP1AM_R {
TAMP1AM_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn tamp2am(&self) -> TAMP2AM_R {
TAMP2AM_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn atosel1(&self) -> ATOSEL1_R {
ATOSEL1_R::new(((self.bits >> 8) & 3) as u8)
}
#[inline(always)]
pub fn atosel2(&self) -> ATOSEL2_R {
ATOSEL2_R::new(((self.bits >> 10) & 3) as u8)
}
#[inline(always)]
pub fn atosel3(&self) -> ATOSEL3_R {
ATOSEL3_R::new(((self.bits >> 12) & 3) as u8)
}
#[inline(always)]
pub fn atcksel(&self) -> ATCKSEL_R {
ATCKSEL_R::new(((self.bits >> 16) & 7) as u8)
}
#[inline(always)]
pub fn atper(&self) -> ATPER_R {
ATPER_R::new(((self.bits >> 24) & 7) as u8)
}
#[inline(always)]
pub fn atoshare(&self) -> ATOSHARE_R {
ATOSHARE_R::new(((self.bits >> 30) & 1) != 0)
}
#[inline(always)]
pub fn flten(&self) -> FLTEN_R {
FLTEN_R::new(((self.bits >> 31) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("ATCR1")
.field("tamp1am", &self.tamp1am())
.field("tamp2am", &self.tamp2am())
.field("atosel1", &self.atosel1())
.field("atosel2", &self.atosel2())
.field("atosel3", &self.atosel3())
.field("atcksel", &self.atcksel())
.field("atper", &self.atper())
.field("atoshare", &self.atoshare())
.field("flten", &self.flten())
.finish()
}
}
impl W {
#[inline(always)]
pub fn tamp1am(&mut self) -> TAMP1AM_W<ATCR1rs> {
TAMP1AM_W::new(self, 0)
}
#[inline(always)]
pub fn tamp2am(&mut self) -> TAMP2AM_W<ATCR1rs> {
TAMP2AM_W::new(self, 1)
}
#[inline(always)]
pub fn atosel1(&mut self) -> ATOSEL1_W<ATCR1rs> {
ATOSEL1_W::new(self, 8)
}
#[inline(always)]
pub fn atosel2(&mut self) -> ATOSEL2_W<ATCR1rs> {
ATOSEL2_W::new(self, 10)
}
#[inline(always)]
pub fn atosel3(&mut self) -> ATOSEL3_W<ATCR1rs> {
ATOSEL3_W::new(self, 12)
}
#[inline(always)]
pub fn atcksel(&mut self) -> ATCKSEL_W<ATCR1rs> {
ATCKSEL_W::new(self, 16)
}
#[inline(always)]
pub fn atper(&mut self) -> ATPER_W<ATCR1rs> {
ATPER_W::new(self, 24)
}
#[inline(always)]
pub fn atoshare(&mut self) -> ATOSHARE_W<ATCR1rs> {
ATOSHARE_W::new(self, 30)
}
#[inline(always)]
pub fn flten(&mut self) -> FLTEN_W<ATCR1rs> {
FLTEN_W::new(self, 31)
}
}
pub struct ATCR1rs;
impl crate::RegisterSpec for ATCR1rs {
type Ux = u32;
}
impl crate::Readable for ATCR1rs {}
impl crate::Writable for ATCR1rs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for ATCR1rs {
const RESET_VALUE: u32 = 0x0007_0000;
}