pub type R = crate::R<ICRrs>;
pub type W = crate::W<ICRrs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum TXMSGDISCCFW {
Clear = 1,
}
impl From<TXMSGDISCCFW> for bool {
#[inline(always)]
fn from(variant: TXMSGDISCCFW) -> Self {
variant as u8 != 0
}
}
pub type TXMSGDISCCF_R = crate::BitReader<TXMSGDISCCFW>;
impl TXMSGDISCCF_R {
#[inline(always)]
pub const fn variant(&self) -> Option<TXMSGDISCCFW> {
match self.bits {
true => Some(TXMSGDISCCFW::Clear),
_ => None,
}
}
#[inline(always)]
pub fn is_clear(&self) -> bool {
*self == TXMSGDISCCFW::Clear
}
}
pub type TXMSGDISCCF_W<'a, REG> = crate::BitWriter<'a, REG, TXMSGDISCCFW>;
impl<'a, REG> TXMSGDISCCF_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn clear(self) -> &'a mut crate::W<REG> {
self.variant(TXMSGDISCCFW::Clear)
}
}
pub use TXMSGDISCCF_R as TXMSGSENTCF_R;
pub use TXMSGDISCCF_R as TXMSGABTCF_R;
pub use TXMSGDISCCF_R as HRSTDISCCF_R;
pub use TXMSGDISCCF_R as HRSTSENTCF_R;
pub use TXMSGDISCCF_R as TXUNDCF_R;
pub use TXMSGDISCCF_R as RXORDDETCF_R;
pub use TXMSGDISCCF_R as RXHRSTDETCF_R;
pub use TXMSGDISCCF_R as RXOVRCF_R;
pub use TXMSGDISCCF_R as RXMSGENDCF_R;
pub use TXMSGDISCCF_R as TYPECEVT1CF_R;
pub use TXMSGDISCCF_R as TYPECEVT2CF_R;
pub use TXMSGDISCCF_R as FRSEVTCF_R;
pub use TXMSGDISCCF_W as TXMSGSENTCF_W;
pub use TXMSGDISCCF_W as TXMSGABTCF_W;
pub use TXMSGDISCCF_W as HRSTDISCCF_W;
pub use TXMSGDISCCF_W as HRSTSENTCF_W;
pub use TXMSGDISCCF_W as TXUNDCF_W;
pub use TXMSGDISCCF_W as RXORDDETCF_W;
pub use TXMSGDISCCF_W as RXHRSTDETCF_W;
pub use TXMSGDISCCF_W as RXOVRCF_W;
pub use TXMSGDISCCF_W as RXMSGENDCF_W;
pub use TXMSGDISCCF_W as TYPECEVT1CF_W;
pub use TXMSGDISCCF_W as TYPECEVT2CF_W;
pub use TXMSGDISCCF_W as FRSEVTCF_W;
impl R {
#[inline(always)]
pub fn txmsgdisccf(&self) -> TXMSGDISCCF_R {
TXMSGDISCCF_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn txmsgsentcf(&self) -> TXMSGSENTCF_R {
TXMSGSENTCF_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn txmsgabtcf(&self) -> TXMSGABTCF_R {
TXMSGABTCF_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn hrstdisccf(&self) -> HRSTDISCCF_R {
HRSTDISCCF_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn hrstsentcf(&self) -> HRSTSENTCF_R {
HRSTSENTCF_R::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn txundcf(&self) -> TXUNDCF_R {
TXUNDCF_R::new(((self.bits >> 6) & 1) != 0)
}
#[inline(always)]
pub fn rxorddetcf(&self) -> RXORDDETCF_R {
RXORDDETCF_R::new(((self.bits >> 9) & 1) != 0)
}
#[inline(always)]
pub fn rxhrstdetcf(&self) -> RXHRSTDETCF_R {
RXHRSTDETCF_R::new(((self.bits >> 10) & 1) != 0)
}
#[inline(always)]
pub fn rxovrcf(&self) -> RXOVRCF_R {
RXOVRCF_R::new(((self.bits >> 11) & 1) != 0)
}
#[inline(always)]
pub fn rxmsgendcf(&self) -> RXMSGENDCF_R {
RXMSGENDCF_R::new(((self.bits >> 12) & 1) != 0)
}
#[inline(always)]
pub fn typecevt1cf(&self) -> TYPECEVT1CF_R {
TYPECEVT1CF_R::new(((self.bits >> 14) & 1) != 0)
}
#[inline(always)]
pub fn typecevt2cf(&self) -> TYPECEVT2CF_R {
TYPECEVT2CF_R::new(((self.bits >> 15) & 1) != 0)
}
#[inline(always)]
pub fn frsevtcf(&self) -> FRSEVTCF_R {
FRSEVTCF_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("ICR")
.field("txmsgdisccf", &self.txmsgdisccf())
.field("txmsgsentcf", &self.txmsgsentcf())
.field("txmsgabtcf", &self.txmsgabtcf())
.field("hrstdisccf", &self.hrstdisccf())
.field("hrstsentcf", &self.hrstsentcf())
.field("txundcf", &self.txundcf())
.field("rxorddetcf", &self.rxorddetcf())
.field("rxhrstdetcf", &self.rxhrstdetcf())
.field("rxovrcf", &self.rxovrcf())
.field("rxmsgendcf", &self.rxmsgendcf())
.field("typecevt1cf", &self.typecevt1cf())
.field("typecevt2cf", &self.typecevt2cf())
.field("frsevtcf", &self.frsevtcf())
.finish()
}
}
impl W {
#[inline(always)]
pub fn txmsgdisccf(&mut self) -> TXMSGDISCCF_W<ICRrs> {
TXMSGDISCCF_W::new(self, 1)
}
#[inline(always)]
pub fn txmsgsentcf(&mut self) -> TXMSGSENTCF_W<ICRrs> {
TXMSGSENTCF_W::new(self, 2)
}
#[inline(always)]
pub fn txmsgabtcf(&mut self) -> TXMSGABTCF_W<ICRrs> {
TXMSGABTCF_W::new(self, 3)
}
#[inline(always)]
pub fn hrstdisccf(&mut self) -> HRSTDISCCF_W<ICRrs> {
HRSTDISCCF_W::new(self, 4)
}
#[inline(always)]
pub fn hrstsentcf(&mut self) -> HRSTSENTCF_W<ICRrs> {
HRSTSENTCF_W::new(self, 5)
}
#[inline(always)]
pub fn txundcf(&mut self) -> TXUNDCF_W<ICRrs> {
TXUNDCF_W::new(self, 6)
}
#[inline(always)]
pub fn rxorddetcf(&mut self) -> RXORDDETCF_W<ICRrs> {
RXORDDETCF_W::new(self, 9)
}
#[inline(always)]
pub fn rxhrstdetcf(&mut self) -> RXHRSTDETCF_W<ICRrs> {
RXHRSTDETCF_W::new(self, 10)
}
#[inline(always)]
pub fn rxovrcf(&mut self) -> RXOVRCF_W<ICRrs> {
RXOVRCF_W::new(self, 11)
}
#[inline(always)]
pub fn rxmsgendcf(&mut self) -> RXMSGENDCF_W<ICRrs> {
RXMSGENDCF_W::new(self, 12)
}
#[inline(always)]
pub fn typecevt1cf(&mut self) -> TYPECEVT1CF_W<ICRrs> {
TYPECEVT1CF_W::new(self, 14)
}
#[inline(always)]
pub fn typecevt2cf(&mut self) -> TYPECEVT2CF_W<ICRrs> {
TYPECEVT2CF_W::new(self, 15)
}
#[inline(always)]
pub fn frsevtcf(&mut self) -> FRSEVTCF_W<ICRrs> {
FRSEVTCF_W::new(self, 20)
}
}
pub struct ICRrs;
impl crate::RegisterSpec for ICRrs {
type Ux = u32;
}
impl crate::Readable for ICRrs {}
impl crate::Writable for ICRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for ICRrs {}