pub type R = crate::R<BDTAUPRrs>;
pub type W = crate::W<BDTAUPRrs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum CR {
NotUpdated = 0,
Updated = 1,
}
impl From<CR> for bool {
#[inline(always)]
fn from(variant: CR) -> Self {
variant as u8 != 0
}
}
pub type CR_R = crate::BitReader<CR>;
impl CR_R {
#[inline(always)]
pub const fn variant(&self) -> CR {
match self.bits {
false => CR::NotUpdated,
true => CR::Updated,
}
}
#[inline(always)]
pub fn is_not_updated(&self) -> bool {
*self == CR::NotUpdated
}
#[inline(always)]
pub fn is_updated(&self) -> bool {
*self == CR::Updated
}
}
pub type CR_W<'a, REG> = crate::BitWriter<'a, REG, CR>;
impl<'a, REG> CR_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn not_updated(self) -> &'a mut crate::W<REG> {
self.variant(CR::NotUpdated)
}
#[inline(always)]
pub fn updated(self) -> &'a mut crate::W<REG> {
self.variant(CR::Updated)
}
}
pub use CR_R as ICR_R;
pub use CR_R as DIER_R;
pub use CR_R as CNT_R;
pub use CR_R as PER_R;
pub use CR_R as REP_R;
pub use CR_R as CMP1_R;
pub use CR_R as CMP2_R;
pub use CR_R as CMP3_R;
pub use CR_R as CMP4_R;
pub use CR_R as DTR_R;
pub use CR_R as SET1R_R;
pub use CR_R as RST1R_R;
pub use CR_R as SET2R_R;
pub use CR_R as RST2R_R;
pub use CR_R as EEFR1_R;
pub use CR_R as EEFR2_R;
pub use CR_R as RSTR_R;
pub use CR_R as CHPR_R;
pub use CR_R as OUTR_R;
pub use CR_R as FLTR_R;
pub use CR_W as ICR_W;
pub use CR_W as DIER_W;
pub use CR_W as CNT_W;
pub use CR_W as PER_W;
pub use CR_W as REP_W;
pub use CR_W as CMP1_W;
pub use CR_W as CMP2_W;
pub use CR_W as CMP3_W;
pub use CR_W as CMP4_W;
pub use CR_W as DTR_W;
pub use CR_W as SET1R_W;
pub use CR_W as RST1R_W;
pub use CR_W as SET2R_W;
pub use CR_W as RST2R_W;
pub use CR_W as EEFR1_W;
pub use CR_W as EEFR2_W;
pub use CR_W as RSTR_W;
pub use CR_W as CHPR_W;
pub use CR_W as OUTR_W;
pub use CR_W as FLTR_W;
impl R {
#[inline(always)]
pub fn cr(&self) -> CR_R {
CR_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn icr(&self) -> ICR_R {
ICR_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn dier(&self) -> DIER_R {
DIER_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn cnt(&self) -> CNT_R {
CNT_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn per(&self) -> PER_R {
PER_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn rep(&self) -> REP_R {
REP_R::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn cmp1(&self) -> CMP1_R {
CMP1_R::new(((self.bits >> 6) & 1) != 0)
}
#[inline(always)]
pub fn cmp2(&self) -> CMP2_R {
CMP2_R::new(((self.bits >> 7) & 1) != 0)
}
#[inline(always)]
pub fn cmp3(&self) -> CMP3_R {
CMP3_R::new(((self.bits >> 8) & 1) != 0)
}
#[inline(always)]
pub fn cmp4(&self) -> CMP4_R {
CMP4_R::new(((self.bits >> 9) & 1) != 0)
}
#[inline(always)]
pub fn dtr(&self) -> DTR_R {
DTR_R::new(((self.bits >> 10) & 1) != 0)
}
#[inline(always)]
pub fn set1r(&self) -> SET1R_R {
SET1R_R::new(((self.bits >> 11) & 1) != 0)
}
#[inline(always)]
pub fn rst1r(&self) -> RST1R_R {
RST1R_R::new(((self.bits >> 12) & 1) != 0)
}
#[inline(always)]
pub fn set2r(&self) -> SET2R_R {
SET2R_R::new(((self.bits >> 13) & 1) != 0)
}
#[inline(always)]
pub fn rst2r(&self) -> RST2R_R {
RST2R_R::new(((self.bits >> 14) & 1) != 0)
}
#[inline(always)]
pub fn eefr1(&self) -> EEFR1_R {
EEFR1_R::new(((self.bits >> 15) & 1) != 0)
}
#[inline(always)]
pub fn eefr2(&self) -> EEFR2_R {
EEFR2_R::new(((self.bits >> 16) & 1) != 0)
}
#[inline(always)]
pub fn rstr(&self) -> RSTR_R {
RSTR_R::new(((self.bits >> 17) & 1) != 0)
}
#[inline(always)]
pub fn chpr(&self) -> CHPR_R {
CHPR_R::new(((self.bits >> 18) & 1) != 0)
}
#[inline(always)]
pub fn outr(&self) -> OUTR_R {
OUTR_R::new(((self.bits >> 19) & 1) != 0)
}
#[inline(always)]
pub fn fltr(&self) -> FLTR_R {
FLTR_R::new(((self.bits >> 20) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("BDTAUPR")
.field("cr", &self.cr())
.field("fltr", &self.fltr())
.field("outr", &self.outr())
.field("chpr", &self.chpr())
.field("rstr", &self.rstr())
.field("eefr2", &self.eefr2())
.field("eefr1", &self.eefr1())
.field("rst2r", &self.rst2r())
.field("set2r", &self.set2r())
.field("rst1r", &self.rst1r())
.field("set1r", &self.set1r())
.field("dtr", &self.dtr())
.field("cmp4", &self.cmp4())
.field("cmp3", &self.cmp3())
.field("cmp2", &self.cmp2())
.field("cmp1", &self.cmp1())
.field("rep", &self.rep())
.field("per", &self.per())
.field("cnt", &self.cnt())
.field("dier", &self.dier())
.field("icr", &self.icr())
.finish()
}
}
impl W {
#[inline(always)]
pub fn cr(&mut self) -> CR_W<BDTAUPRrs> {
CR_W::new(self, 0)
}
#[inline(always)]
pub fn icr(&mut self) -> ICR_W<BDTAUPRrs> {
ICR_W::new(self, 1)
}
#[inline(always)]
pub fn dier(&mut self) -> DIER_W<BDTAUPRrs> {
DIER_W::new(self, 2)
}
#[inline(always)]
pub fn cnt(&mut self) -> CNT_W<BDTAUPRrs> {
CNT_W::new(self, 3)
}
#[inline(always)]
pub fn per(&mut self) -> PER_W<BDTAUPRrs> {
PER_W::new(self, 4)
}
#[inline(always)]
pub fn rep(&mut self) -> REP_W<BDTAUPRrs> {
REP_W::new(self, 5)
}
#[inline(always)]
pub fn cmp1(&mut self) -> CMP1_W<BDTAUPRrs> {
CMP1_W::new(self, 6)
}
#[inline(always)]
pub fn cmp2(&mut self) -> CMP2_W<BDTAUPRrs> {
CMP2_W::new(self, 7)
}
#[inline(always)]
pub fn cmp3(&mut self) -> CMP3_W<BDTAUPRrs> {
CMP3_W::new(self, 8)
}
#[inline(always)]
pub fn cmp4(&mut self) -> CMP4_W<BDTAUPRrs> {
CMP4_W::new(self, 9)
}
#[inline(always)]
pub fn dtr(&mut self) -> DTR_W<BDTAUPRrs> {
DTR_W::new(self, 10)
}
#[inline(always)]
pub fn set1r(&mut self) -> SET1R_W<BDTAUPRrs> {
SET1R_W::new(self, 11)
}
#[inline(always)]
pub fn rst1r(&mut self) -> RST1R_W<BDTAUPRrs> {
RST1R_W::new(self, 12)
}
#[inline(always)]
pub fn set2r(&mut self) -> SET2R_W<BDTAUPRrs> {
SET2R_W::new(self, 13)
}
#[inline(always)]
pub fn rst2r(&mut self) -> RST2R_W<BDTAUPRrs> {
RST2R_W::new(self, 14)
}
#[inline(always)]
pub fn eefr1(&mut self) -> EEFR1_W<BDTAUPRrs> {
EEFR1_W::new(self, 15)
}
#[inline(always)]
pub fn eefr2(&mut self) -> EEFR2_W<BDTAUPRrs> {
EEFR2_W::new(self, 16)
}
#[inline(always)]
pub fn rstr(&mut self) -> RSTR_W<BDTAUPRrs> {
RSTR_W::new(self, 17)
}
#[inline(always)]
pub fn chpr(&mut self) -> CHPR_W<BDTAUPRrs> {
CHPR_W::new(self, 18)
}
#[inline(always)]
pub fn outr(&mut self) -> OUTR_W<BDTAUPRrs> {
OUTR_W::new(self, 19)
}
#[inline(always)]
pub fn fltr(&mut self) -> FLTR_W<BDTAUPRrs> {
FLTR_W::new(self, 20)
}
}
pub struct BDTAUPRrs;
impl crate::RegisterSpec for BDTAUPRrs {
type Ux = u32;
}
impl crate::Readable for BDTAUPRrs {}
impl crate::Writable for BDTAUPRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for BDTAUPRrs {}