pub type R = crate::R<AF1rs>;
pub type W = crate::W<AF1rs>;
pub type BKINE_R = crate::BitReader;
pub type BKINE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type BKCMP1E_R = crate::BitReader;
pub type BKCMP1E_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type BKCMP2E_R = crate::BitReader;
pub type BKCMP2E_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type BKINP_R = crate::BitReader;
pub type BKINP_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type BKCMP1P_R = crate::BitReader;
pub type BKCMP1P_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type BKCMP2P_R = crate::BitReader;
pub type BKCMP2P_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type ETRSEL_R = crate::FieldReader;
pub type ETRSEL_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
impl R {
#[inline(always)]
pub fn bkine(&self) -> BKINE_R {
BKINE_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn bkcmp1e(&self) -> BKCMP1E_R {
BKCMP1E_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn bkcmp2e(&self) -> BKCMP2E_R {
BKCMP2E_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn bkinp(&self) -> BKINP_R {
BKINP_R::new(((self.bits >> 9) & 1) != 0)
}
#[inline(always)]
pub fn bkcmp1p(&self) -> BKCMP1P_R {
BKCMP1P_R::new(((self.bits >> 10) & 1) != 0)
}
#[inline(always)]
pub fn bkcmp2p(&self) -> BKCMP2P_R {
BKCMP2P_R::new(((self.bits >> 11) & 1) != 0)
}
#[inline(always)]
pub fn etrsel(&self) -> ETRSEL_R {
ETRSEL_R::new(((self.bits >> 14) & 7) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("AF1")
.field("bkine", &self.bkine())
.field("bkcmp1e", &self.bkcmp1e())
.field("bkcmp2e", &self.bkcmp2e())
.field("bkinp", &self.bkinp())
.field("bkcmp1p", &self.bkcmp1p())
.field("bkcmp2p", &self.bkcmp2p())
.field("etrsel", &self.etrsel())
.finish()
}
}
impl W {
#[inline(always)]
pub fn bkine(&mut self) -> BKINE_W<AF1rs> {
BKINE_W::new(self, 0)
}
#[inline(always)]
pub fn bkcmp1e(&mut self) -> BKCMP1E_W<AF1rs> {
BKCMP1E_W::new(self, 1)
}
#[inline(always)]
pub fn bkcmp2e(&mut self) -> BKCMP2E_W<AF1rs> {
BKCMP2E_W::new(self, 2)
}
#[inline(always)]
pub fn bkinp(&mut self) -> BKINP_W<AF1rs> {
BKINP_W::new(self, 9)
}
#[inline(always)]
pub fn bkcmp1p(&mut self) -> BKCMP1P_W<AF1rs> {
BKCMP1P_W::new(self, 10)
}
#[inline(always)]
pub fn bkcmp2p(&mut self) -> BKCMP2P_W<AF1rs> {
BKCMP2P_W::new(self, 11)
}
#[inline(always)]
pub fn etrsel(&mut self) -> ETRSEL_W<AF1rs> {
ETRSEL_W::new(self, 14)
}
}
pub struct AF1rs;
impl crate::RegisterSpec for AF1rs {
type Ux = u32;
}
impl crate::Readable for AF1rs {}
impl crate::Writable for AF1rs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for AF1rs {
const RESET_VALUE: u32 = 0x01;
}