pub type R = crate::R<ACR2rs>;
pub type W = crate::W<ACR2rs>;
pub type FTH_R = crate::FieldReader;
pub type FTH_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
pub type FFLUSH_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type TRIS_R = crate::BitReader;
pub type TRIS_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type MUTE_R = crate::BitReader;
pub type MUTE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type MUTEVAL_R = crate::BitReader;
pub type MUTEVAL_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type MUTECNT_R = crate::FieldReader;
pub type MUTECNT_W<'a, REG> = crate::FieldWriter<'a, REG, 6>;
pub type CPL_R = crate::BitReader;
pub type CPL_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type COMP_R = crate::FieldReader;
pub type COMP_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
impl R {
#[inline(always)]
pub fn fth(&self) -> FTH_R {
FTH_R::new((self.bits & 7) as u8)
}
#[inline(always)]
pub fn tris(&self) -> TRIS_R {
TRIS_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn mute(&self) -> MUTE_R {
MUTE_R::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn muteval(&self) -> MUTEVAL_R {
MUTEVAL_R::new(((self.bits >> 6) & 1) != 0)
}
#[inline(always)]
pub fn mutecnt(&self) -> MUTECNT_R {
MUTECNT_R::new(((self.bits >> 7) & 0x3f) as u8)
}
#[inline(always)]
pub fn cpl(&self) -> CPL_R {
CPL_R::new(((self.bits >> 13) & 1) != 0)
}
#[inline(always)]
pub fn comp(&self) -> COMP_R {
COMP_R::new(((self.bits >> 14) & 3) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("ACR2")
.field("fth", &self.fth())
.field("tris", &self.tris())
.field("mute", &self.mute())
.field("muteval", &self.muteval())
.field("mutecnt", &self.mutecnt())
.field("cpl", &self.cpl())
.field("comp", &self.comp())
.finish()
}
}
impl W {
#[inline(always)]
pub fn fth(&mut self) -> FTH_W<ACR2rs> {
FTH_W::new(self, 0)
}
#[inline(always)]
pub fn fflush(&mut self) -> FFLUSH_W<ACR2rs> {
FFLUSH_W::new(self, 3)
}
#[inline(always)]
pub fn tris(&mut self) -> TRIS_W<ACR2rs> {
TRIS_W::new(self, 4)
}
#[inline(always)]
pub fn mute(&mut self) -> MUTE_W<ACR2rs> {
MUTE_W::new(self, 5)
}
#[inline(always)]
pub fn muteval(&mut self) -> MUTEVAL_W<ACR2rs> {
MUTEVAL_W::new(self, 6)
}
#[inline(always)]
pub fn mutecnt(&mut self) -> MUTECNT_W<ACR2rs> {
MUTECNT_W::new(self, 7)
}
#[inline(always)]
pub fn cpl(&mut self) -> CPL_W<ACR2rs> {
CPL_W::new(self, 13)
}
#[inline(always)]
pub fn comp(&mut self) -> COMP_W<ACR2rs> {
COMP_W::new(self, 14)
}
}
pub struct ACR2rs;
impl crate::RegisterSpec for ACR2rs {
type Ux = u32;
}
impl crate::Readable for ACR2rs {}
impl crate::Writable for ACR2rs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for ACR2rs {}