pub type R = crate::R<ISRrs>;
pub type W = crate::W<ISRrs>;
pub type TXE_R = crate::BitReader;
pub type TXE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type TXIS_R = crate::BitReader;
pub type TXIS_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type RXNE_R = crate::BitReader;
pub type ADDR_R = crate::BitReader;
pub type NACKF_R = crate::BitReader;
pub type STOPF_R = crate::BitReader;
pub type TC_R = crate::BitReader;
pub type TCR_R = crate::BitReader;
pub type BERR_R = crate::BitReader;
pub type ARLO_R = crate::BitReader;
pub type OVR_R = crate::BitReader;
pub type PECERR_R = crate::BitReader;
pub type TIMEOUT_R = crate::BitReader;
pub type ALERT_R = crate::BitReader;
pub type BUSY_R = crate::BitReader;
pub type DIR_R = crate::BitReader;
pub type ADDCODE_R = crate::FieldReader;
impl R {
#[inline(always)]
pub fn txe(&self) -> TXE_R {
TXE_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn txis(&self) -> TXIS_R {
TXIS_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn rxne(&self) -> RXNE_R {
RXNE_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn addr(&self) -> ADDR_R {
ADDR_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn nackf(&self) -> NACKF_R {
NACKF_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn stopf(&self) -> STOPF_R {
STOPF_R::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn tc(&self) -> TC_R {
TC_R::new(((self.bits >> 6) & 1) != 0)
}
#[inline(always)]
pub fn tcr(&self) -> TCR_R {
TCR_R::new(((self.bits >> 7) & 1) != 0)
}
#[inline(always)]
pub fn berr(&self) -> BERR_R {
BERR_R::new(((self.bits >> 8) & 1) != 0)
}
#[inline(always)]
pub fn arlo(&self) -> ARLO_R {
ARLO_R::new(((self.bits >> 9) & 1) != 0)
}
#[inline(always)]
pub fn ovr(&self) -> OVR_R {
OVR_R::new(((self.bits >> 10) & 1) != 0)
}
#[inline(always)]
pub fn pecerr(&self) -> PECERR_R {
PECERR_R::new(((self.bits >> 11) & 1) != 0)
}
#[inline(always)]
pub fn timeout(&self) -> TIMEOUT_R {
TIMEOUT_R::new(((self.bits >> 12) & 1) != 0)
}
#[inline(always)]
pub fn alert(&self) -> ALERT_R {
ALERT_R::new(((self.bits >> 13) & 1) != 0)
}
#[inline(always)]
pub fn busy(&self) -> BUSY_R {
BUSY_R::new(((self.bits >> 15) & 1) != 0)
}
#[inline(always)]
pub fn dir(&self) -> DIR_R {
DIR_R::new(((self.bits >> 16) & 1) != 0)
}
#[inline(always)]
pub fn addcode(&self) -> ADDCODE_R {
ADDCODE_R::new(((self.bits >> 17) & 0x7f) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("ISR")
.field("txe", &self.txe())
.field("txis", &self.txis())
.field("rxne", &self.rxne())
.field("addr", &self.addr())
.field("nackf", &self.nackf())
.field("stopf", &self.stopf())
.field("tc", &self.tc())
.field("tcr", &self.tcr())
.field("berr", &self.berr())
.field("arlo", &self.arlo())
.field("ovr", &self.ovr())
.field("pecerr", &self.pecerr())
.field("timeout", &self.timeout())
.field("alert", &self.alert())
.field("busy", &self.busy())
.field("dir", &self.dir())
.field("addcode", &self.addcode())
.finish()
}
}
impl W {
#[inline(always)]
pub fn txe(&mut self) -> TXE_W<ISRrs> {
TXE_W::new(self, 0)
}
#[inline(always)]
pub fn txis(&mut self) -> TXIS_W<ISRrs> {
TXIS_W::new(self, 1)
}
}
pub struct ISRrs;
impl crate::RegisterSpec for ISRrs {
type Ux = u32;
}
impl crate::Readable for ISRrs {}
impl crate::Writable for ISRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for ISRrs {
const RESET_VALUE: u32 = 0x01;
}