pub type R = crate::R<IMRrs>;
pub type W = crate::W<IMRrs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum TXISIE {
Disabled = 0,
Enabled = 1,
}
impl From<TXISIE> for bool {
#[inline(always)]
fn from(variant: TXISIE) -> Self {
variant as u8 != 0
}
}
pub type TXISIE_R = crate::BitReader<TXISIE>;
impl TXISIE_R {
#[inline(always)]
pub const fn variant(&self) -> TXISIE {
match self.bits {
false => TXISIE::Disabled,
true => TXISIE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == TXISIE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == TXISIE::Enabled
}
}
pub type TXISIE_W<'a, REG> = crate::BitWriter<'a, REG, TXISIE>;
impl<'a, REG> TXISIE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(TXISIE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(TXISIE::Enabled)
}
}
pub use TXISIE_R as TXMSGDISCIE_R;
pub use TXISIE_R as TXMSGSENTIE_R;
pub use TXISIE_R as TXMSGABTIE_R;
pub use TXISIE_R as HRSTDISCIE_R;
pub use TXISIE_R as HRSTSENTIE_R;
pub use TXISIE_R as TXUNDIE_R;
pub use TXISIE_R as RXNEIE_R;
pub use TXISIE_R as RXORDDETIE_R;
pub use TXISIE_R as RXHRSTDETIE_R;
pub use TXISIE_R as RXOVRIE_R;
pub use TXISIE_R as RXMSGENDIE_R;
pub use TXISIE_R as TYPECEVT1IE_R;
pub use TXISIE_R as TYPECEVT2IE_R;
pub use TXISIE_R as FRSEVTIE_R;
pub use TXISIE_W as TXMSGDISCIE_W;
pub use TXISIE_W as TXMSGSENTIE_W;
pub use TXISIE_W as TXMSGABTIE_W;
pub use TXISIE_W as HRSTDISCIE_W;
pub use TXISIE_W as HRSTSENTIE_W;
pub use TXISIE_W as TXUNDIE_W;
pub use TXISIE_W as RXNEIE_W;
pub use TXISIE_W as RXORDDETIE_W;
pub use TXISIE_W as RXHRSTDETIE_W;
pub use TXISIE_W as RXOVRIE_W;
pub use TXISIE_W as RXMSGENDIE_W;
pub use TXISIE_W as TYPECEVT1IE_W;
pub use TXISIE_W as TYPECEVT2IE_W;
pub use TXISIE_W as FRSEVTIE_W;
impl R {
#[inline(always)]
pub fn txisie(&self) -> TXISIE_R {
TXISIE_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn txmsgdiscie(&self) -> TXMSGDISCIE_R {
TXMSGDISCIE_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn txmsgsentie(&self) -> TXMSGSENTIE_R {
TXMSGSENTIE_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn txmsgabtie(&self) -> TXMSGABTIE_R {
TXMSGABTIE_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn hrstdiscie(&self) -> HRSTDISCIE_R {
HRSTDISCIE_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn hrstsentie(&self) -> HRSTSENTIE_R {
HRSTSENTIE_R::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn txundie(&self) -> TXUNDIE_R {
TXUNDIE_R::new(((self.bits >> 6) & 1) != 0)
}
#[inline(always)]
pub fn rxneie(&self) -> RXNEIE_R {
RXNEIE_R::new(((self.bits >> 8) & 1) != 0)
}
#[inline(always)]
pub fn rxorddetie(&self) -> RXORDDETIE_R {
RXORDDETIE_R::new(((self.bits >> 9) & 1) != 0)
}
#[inline(always)]
pub fn rxhrstdetie(&self) -> RXHRSTDETIE_R {
RXHRSTDETIE_R::new(((self.bits >> 10) & 1) != 0)
}
#[inline(always)]
pub fn rxovrie(&self) -> RXOVRIE_R {
RXOVRIE_R::new(((self.bits >> 11) & 1) != 0)
}
#[inline(always)]
pub fn rxmsgendie(&self) -> RXMSGENDIE_R {
RXMSGENDIE_R::new(((self.bits >> 12) & 1) != 0)
}
#[inline(always)]
pub fn typecevt1ie(&self) -> TYPECEVT1IE_R {
TYPECEVT1IE_R::new(((self.bits >> 14) & 1) != 0)
}
#[inline(always)]
pub fn typecevt2ie(&self) -> TYPECEVT2IE_R {
TYPECEVT2IE_R::new(((self.bits >> 15) & 1) != 0)
}
#[inline(always)]
pub fn frsevtie(&self) -> FRSEVTIE_R {
FRSEVTIE_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("IMR")
.field("txisie", &self.txisie())
.field("txmsgdiscie", &self.txmsgdiscie())
.field("txmsgsentie", &self.txmsgsentie())
.field("txmsgabtie", &self.txmsgabtie())
.field("hrstdiscie", &self.hrstdiscie())
.field("hrstsentie", &self.hrstsentie())
.field("txundie", &self.txundie())
.field("rxneie", &self.rxneie())
.field("rxorddetie", &self.rxorddetie())
.field("rxhrstdetie", &self.rxhrstdetie())
.field("rxovrie", &self.rxovrie())
.field("rxmsgendie", &self.rxmsgendie())
.field("typecevt1ie", &self.typecevt1ie())
.field("typecevt2ie", &self.typecevt2ie())
.field("frsevtie", &self.frsevtie())
.finish()
}
}
impl W {
#[inline(always)]
pub fn txisie(&mut self) -> TXISIE_W<IMRrs> {
TXISIE_W::new(self, 0)
}
#[inline(always)]
pub fn txmsgdiscie(&mut self) -> TXMSGDISCIE_W<IMRrs> {
TXMSGDISCIE_W::new(self, 1)
}
#[inline(always)]
pub fn txmsgsentie(&mut self) -> TXMSGSENTIE_W<IMRrs> {
TXMSGSENTIE_W::new(self, 2)
}
#[inline(always)]
pub fn txmsgabtie(&mut self) -> TXMSGABTIE_W<IMRrs> {
TXMSGABTIE_W::new(self, 3)
}
#[inline(always)]
pub fn hrstdiscie(&mut self) -> HRSTDISCIE_W<IMRrs> {
HRSTDISCIE_W::new(self, 4)
}
#[inline(always)]
pub fn hrstsentie(&mut self) -> HRSTSENTIE_W<IMRrs> {
HRSTSENTIE_W::new(self, 5)
}
#[inline(always)]
pub fn txundie(&mut self) -> TXUNDIE_W<IMRrs> {
TXUNDIE_W::new(self, 6)
}
#[inline(always)]
pub fn rxneie(&mut self) -> RXNEIE_W<IMRrs> {
RXNEIE_W::new(self, 8)
}
#[inline(always)]
pub fn rxorddetie(&mut self) -> RXORDDETIE_W<IMRrs> {
RXORDDETIE_W::new(self, 9)
}
#[inline(always)]
pub fn rxhrstdetie(&mut self) -> RXHRSTDETIE_W<IMRrs> {
RXHRSTDETIE_W::new(self, 10)
}
#[inline(always)]
pub fn rxovrie(&mut self) -> RXOVRIE_W<IMRrs> {
RXOVRIE_W::new(self, 11)
}
#[inline(always)]
pub fn rxmsgendie(&mut self) -> RXMSGENDIE_W<IMRrs> {
RXMSGENDIE_W::new(self, 12)
}
#[inline(always)]
pub fn typecevt1ie(&mut self) -> TYPECEVT1IE_W<IMRrs> {
TYPECEVT1IE_W::new(self, 14)
}
#[inline(always)]
pub fn typecevt2ie(&mut self) -> TYPECEVT2IE_W<IMRrs> {
TYPECEVT2IE_W::new(self, 15)
}
#[inline(always)]
pub fn frsevtie(&mut self) -> FRSEVTIE_W<IMRrs> {
FRSEVTIE_W::new(self, 20)
}
}
pub struct IMRrs;
impl crate::RegisterSpec for IMRrs {
type Ux = u32;
}
impl crate::Readable for IMRrs {}
impl crate::Writable for IMRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for IMRrs {}