pub type R = crate::R<C2PR2rs>;
pub type W = crate::W<C2PR2rs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum PR49R {
NotPending = 0,
Pending = 1,
}
impl From<PR49R> for bool {
#[inline(always)]
fn from(variant: PR49R) -> Self {
variant as u8 != 0
}
}
pub type PR49_R = crate::BitReader<PR49R>;
impl PR49_R {
#[inline(always)]
pub const fn variant(&self) -> PR49R {
match self.bits {
false => PR49R::NotPending,
true => PR49R::Pending,
}
}
#[inline(always)]
pub fn is_not_pending(&self) -> bool {
*self == PR49R::NotPending
}
#[inline(always)]
pub fn is_pending(&self) -> bool {
*self == PR49R::Pending
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum PR49W {
Clear = 1,
}
impl From<PR49W> for bool {
#[inline(always)]
fn from(variant: PR49W) -> Self {
variant as u8 != 0
}
}
pub type PR49_W<'a, REG> = crate::BitWriter1C<'a, REG, PR49W>;
impl<'a, REG> PR49_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn clear(self) -> &'a mut crate::W<REG> {
self.variant(PR49W::Clear)
}
}
pub use PR49_R as PR51_R;
pub use PR49_W as PR51_W;
impl R {
#[inline(always)]
pub fn pr49(&self) -> PR49_R {
PR49_R::new(((self.bits >> 17) & 1) != 0)
}
#[inline(always)]
pub fn pr51(&self) -> PR51_R {
PR51_R::new(((self.bits >> 19) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("C2PR2")
.field("pr49", &self.pr49())
.field("pr51", &self.pr51())
.finish()
}
}
impl W {
#[inline(always)]
pub fn pr49(&mut self) -> PR49_W<C2PR2rs> {
PR49_W::new(self, 17)
}
#[inline(always)]
pub fn pr51(&mut self) -> PR51_W<C2PR2rs> {
PR51_W::new(self, 19)
}
}
pub struct C2PR2rs;
impl crate::RegisterSpec for C2PR2rs {
type Ux = u32;
}
impl crate::Readable for C2PR2rs {}
impl crate::Writable for C2PR2rs {
type Safety = crate::Unsafe;
const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0x000a_0000;
}
impl crate::Resettable for C2PR2rs {}