pub type R = crate::R<IERrs>;
pub type W = crate::W<IERrs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum RXPIE {
Disabled = 0,
Enabled = 1,
}
impl From<RXPIE> for bool {
#[inline(always)]
fn from(variant: RXPIE) -> Self {
variant as u8 != 0
}
}
pub type RXPIE_R = crate::BitReader<RXPIE>;
impl RXPIE_R {
#[inline(always)]
pub const fn variant(&self) -> RXPIE {
match self.bits {
false => RXPIE::Disabled,
true => RXPIE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == RXPIE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == RXPIE::Enabled
}
}
pub type RXPIE_W<'a, REG> = crate::BitWriter<'a, REG, RXPIE>;
impl<'a, REG> RXPIE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(RXPIE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(RXPIE::Enabled)
}
}
pub use RXPIE_R as TXPIE_R;
pub use RXPIE_R as DXPIE_R;
pub use RXPIE_R as EOTIE_R;
pub use RXPIE_R as TXTFIE_R;
pub use RXPIE_R as UDRIE_R;
pub use RXPIE_R as OVRIE_R;
pub use RXPIE_R as CRCEIE_R;
pub use RXPIE_R as TIFREIE_R;
pub use RXPIE_R as MODFIE_R;
pub use RXPIE_R as TSERFIE_R;
pub use RXPIE_W as TXPIE_W;
pub use RXPIE_W as DXPIE_W;
pub use RXPIE_W as EOTIE_W;
pub use RXPIE_W as TXTFIE_W;
pub use RXPIE_W as UDRIE_W;
pub use RXPIE_W as OVRIE_W;
pub use RXPIE_W as CRCEIE_W;
pub use RXPIE_W as TIFREIE_W;
pub use RXPIE_W as MODFIE_W;
pub use RXPIE_W as TSERFIE_W;
impl R {
#[inline(always)]
pub fn rxpie(&self) -> RXPIE_R {
RXPIE_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn txpie(&self) -> TXPIE_R {
TXPIE_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn dxpie(&self) -> DXPIE_R {
DXPIE_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn eotie(&self) -> EOTIE_R {
EOTIE_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn txtfie(&self) -> TXTFIE_R {
TXTFIE_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn udrie(&self) -> UDRIE_R {
UDRIE_R::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn ovrie(&self) -> OVRIE_R {
OVRIE_R::new(((self.bits >> 6) & 1) != 0)
}
#[inline(always)]
pub fn crceie(&self) -> CRCEIE_R {
CRCEIE_R::new(((self.bits >> 7) & 1) != 0)
}
#[inline(always)]
pub fn tifreie(&self) -> TIFREIE_R {
TIFREIE_R::new(((self.bits >> 8) & 1) != 0)
}
#[inline(always)]
pub fn modfie(&self) -> MODFIE_R {
MODFIE_R::new(((self.bits >> 9) & 1) != 0)
}
#[inline(always)]
pub fn tserfie(&self) -> TSERFIE_R {
TSERFIE_R::new(((self.bits >> 10) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("IER")
.field("rxpie", &self.rxpie())
.field("tserfie", &self.tserfie())
.field("modfie", &self.modfie())
.field("tifreie", &self.tifreie())
.field("crceie", &self.crceie())
.field("ovrie", &self.ovrie())
.field("udrie", &self.udrie())
.field("txtfie", &self.txtfie())
.field("eotie", &self.eotie())
.field("dxpie", &self.dxpie())
.field("txpie", &self.txpie())
.finish()
}
}
impl W {
#[inline(always)]
pub fn rxpie(&mut self) -> RXPIE_W<IERrs> {
RXPIE_W::new(self, 0)
}
#[inline(always)]
pub fn txpie(&mut self) -> TXPIE_W<IERrs> {
TXPIE_W::new(self, 1)
}
#[inline(always)]
pub fn dxpie(&mut self) -> DXPIE_W<IERrs> {
DXPIE_W::new(self, 2)
}
#[inline(always)]
pub fn eotie(&mut self) -> EOTIE_W<IERrs> {
EOTIE_W::new(self, 3)
}
#[inline(always)]
pub fn txtfie(&mut self) -> TXTFIE_W<IERrs> {
TXTFIE_W::new(self, 4)
}
#[inline(always)]
pub fn udrie(&mut self) -> UDRIE_W<IERrs> {
UDRIE_W::new(self, 5)
}
#[inline(always)]
pub fn ovrie(&mut self) -> OVRIE_W<IERrs> {
OVRIE_W::new(self, 6)
}
#[inline(always)]
pub fn crceie(&mut self) -> CRCEIE_W<IERrs> {
CRCEIE_W::new(self, 7)
}
#[inline(always)]
pub fn tifreie(&mut self) -> TIFREIE_W<IERrs> {
TIFREIE_W::new(self, 8)
}
#[inline(always)]
pub fn modfie(&mut self) -> MODFIE_W<IERrs> {
MODFIE_W::new(self, 9)
}
#[inline(always)]
pub fn tserfie(&mut self) -> TSERFIE_W<IERrs> {
TSERFIE_W::new(self, 10)
}
}
pub struct IERrs;
impl crate::RegisterSpec for IERrs {
type Ux = u32;
}
impl crate::Readable for IERrs {}
impl crate::Writable for IERrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for IERrs {}