pub type R = crate::R<D3PMR3rs>;
pub type W = crate::W<D3PMR3rs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum INTERRUPT_MASK {
Masked = 0,
Unmasked = 1,
}
impl From<INTERRUPT_MASK> for bool {
#[inline(always)]
fn from(variant: INTERRUPT_MASK) -> Self {
variant as u8 != 0
}
}
pub type MR88_R = crate::BitReader<INTERRUPT_MASK>;
impl MR88_R {
#[inline(always)]
pub const fn variant(&self) -> INTERRUPT_MASK {
match self.bits {
false => INTERRUPT_MASK::Masked,
true => INTERRUPT_MASK::Unmasked,
}
}
#[inline(always)]
pub fn is_masked(&self) -> bool {
*self == INTERRUPT_MASK::Masked
}
#[inline(always)]
pub fn is_unmasked(&self) -> bool {
*self == INTERRUPT_MASK::Unmasked
}
}
pub type MR88_W<'a, REG> = crate::BitWriter<'a, REG, INTERRUPT_MASK>;
impl<'a, REG> MR88_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn masked(self) -> &'a mut crate::W<REG> {
self.variant(INTERRUPT_MASK::Masked)
}
#[inline(always)]
pub fn unmasked(self) -> &'a mut crate::W<REG> {
self.variant(INTERRUPT_MASK::Unmasked)
}
}
impl R {
#[inline(always)]
pub fn mr88(&self) -> MR88_R {
MR88_R::new(((self.bits >> 24) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("D3PMR3").field("mr88", &self.mr88()).finish()
}
}
impl W {
#[inline(always)]
pub fn mr88(&mut self) -> MR88_W<D3PMR3rs> {
MR88_W::new(self, 24)
}
}
pub struct D3PMR3rs;
impl crate::RegisterSpec for D3PMR3rs {
type Ux = u32;
}
impl crate::Readable for D3PMR3rs {}
impl crate::Writable for D3PMR3rs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for D3PMR3rs {}