pub type R = crate::R<AF2rs>;
pub type W = crate::W<AF2rs>;
pub type BK2INE_R = crate::BitReader;
pub type BK2INE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type BK2CMP1E_R = crate::BitReader;
pub type BK2CMP1E_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type BK2CMP2E_R = crate::BitReader;
pub type BK2CMP2E_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type BK2DFBK0E_R = crate::BitReader;
pub type BK2DFBK0E_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type BK2INP_R = crate::BitReader;
pub type BK2INP_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type BK2CMP1P_R = crate::BitReader;
pub type BK2CMP1P_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type BK2CMP2P_R = crate::BitReader;
pub type BK2CMP2P_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn bk2ine(&self) -> BK2INE_R {
BK2INE_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn bk2cmp1e(&self) -> BK2CMP1E_R {
BK2CMP1E_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn bk2cmp2e(&self) -> BK2CMP2E_R {
BK2CMP2E_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn bk2dfbk0e(&self) -> BK2DFBK0E_R {
BK2DFBK0E_R::new(((self.bits >> 8) & 1) != 0)
}
#[inline(always)]
pub fn bk2inp(&self) -> BK2INP_R {
BK2INP_R::new(((self.bits >> 9) & 1) != 0)
}
#[inline(always)]
pub fn bk2cmp1p(&self) -> BK2CMP1P_R {
BK2CMP1P_R::new(((self.bits >> 10) & 1) != 0)
}
#[inline(always)]
pub fn bk2cmp2p(&self) -> BK2CMP2P_R {
BK2CMP2P_R::new(((self.bits >> 11) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("AF2")
.field("bk2ine", &self.bk2ine())
.field("bk2cmp1e", &self.bk2cmp1e())
.field("bk2cmp2e", &self.bk2cmp2e())
.field("bk2dfbk0e", &self.bk2dfbk0e())
.field("bk2inp", &self.bk2inp())
.field("bk2cmp1p", &self.bk2cmp1p())
.field("bk2cmp2p", &self.bk2cmp2p())
.finish()
}
}
impl W {
#[inline(always)]
pub fn bk2ine(&mut self) -> BK2INE_W<AF2rs> {
BK2INE_W::new(self, 0)
}
#[inline(always)]
pub fn bk2cmp1e(&mut self) -> BK2CMP1E_W<AF2rs> {
BK2CMP1E_W::new(self, 1)
}
#[inline(always)]
pub fn bk2cmp2e(&mut self) -> BK2CMP2E_W<AF2rs> {
BK2CMP2E_W::new(self, 2)
}
#[inline(always)]
pub fn bk2dfbk0e(&mut self) -> BK2DFBK0E_W<AF2rs> {
BK2DFBK0E_W::new(self, 8)
}
#[inline(always)]
pub fn bk2inp(&mut self) -> BK2INP_W<AF2rs> {
BK2INP_W::new(self, 9)
}
#[inline(always)]
pub fn bk2cmp1p(&mut self) -> BK2CMP1P_W<AF2rs> {
BK2CMP1P_W::new(self, 10)
}
#[inline(always)]
pub fn bk2cmp2p(&mut self) -> BK2CMP2P_W<AF2rs> {
BK2CMP2P_W::new(self, 11)
}
}
pub struct AF2rs;
impl crate::RegisterSpec for AF2rs {
type Ux = u32;
}
impl crate::Readable for AF2rs {}
impl crate::Writable for AF2rs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for AF2rs {
const RESET_VALUE: u32 = 0x01;
}