pub type R = crate::R<CR1rs>;
pub type W = crate::W<CR1rs>;
pub type PE_R = crate::BitReader;
pub type PE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type TXIE_R = crate::BitReader;
pub type TXIE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type RXIE_R = crate::BitReader;
pub type RXIE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type ADDRIE_R = crate::BitReader;
pub type ADDRIE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type NACKIE_R = crate::BitReader;
pub type NACKIE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type STOPIE_R = crate::BitReader;
pub type STOPIE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type TCIE_R = crate::BitReader;
pub type TCIE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type ERRIE_R = crate::BitReader;
pub type ERRIE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type DNF_R = crate::FieldReader;
pub type DNF_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
pub type ANFOFF_R = crate::BitReader;
pub type ANFOFF_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type TXDMAEN_R = crate::BitReader;
pub type TXDMAEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type RXDMAEN_R = crate::BitReader;
pub type RXDMAEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type SBC_R = crate::BitReader;
pub type SBC_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type NOSTRETCH_R = crate::BitReader;
pub type NOSTRETCH_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type WUPEN_R = crate::BitReader;
pub type WUPEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type GCEN_R = crate::BitReader;
pub type GCEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type SMBHEN_R = crate::BitReader;
pub type SMBHEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type SMBDEN_R = crate::BitReader;
pub type SMBDEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type ALERTEN_R = crate::BitReader;
pub type ALERTEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type PECEN_R = crate::BitReader;
pub type PECEN_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn pe(&self) -> PE_R {
PE_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn txie(&self) -> TXIE_R {
TXIE_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn rxie(&self) -> RXIE_R {
RXIE_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn addrie(&self) -> ADDRIE_R {
ADDRIE_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn nackie(&self) -> NACKIE_R {
NACKIE_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn stopie(&self) -> STOPIE_R {
STOPIE_R::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn tcie(&self) -> TCIE_R {
TCIE_R::new(((self.bits >> 6) & 1) != 0)
}
#[inline(always)]
pub fn errie(&self) -> ERRIE_R {
ERRIE_R::new(((self.bits >> 7) & 1) != 0)
}
#[inline(always)]
pub fn dnf(&self) -> DNF_R {
DNF_R::new(((self.bits >> 8) & 0x0f) as u8)
}
#[inline(always)]
pub fn anfoff(&self) -> ANFOFF_R {
ANFOFF_R::new(((self.bits >> 12) & 1) != 0)
}
#[inline(always)]
pub fn txdmaen(&self) -> TXDMAEN_R {
TXDMAEN_R::new(((self.bits >> 14) & 1) != 0)
}
#[inline(always)]
pub fn rxdmaen(&self) -> RXDMAEN_R {
RXDMAEN_R::new(((self.bits >> 15) & 1) != 0)
}
#[inline(always)]
pub fn sbc(&self) -> SBC_R {
SBC_R::new(((self.bits >> 16) & 1) != 0)
}
#[inline(always)]
pub fn nostretch(&self) -> NOSTRETCH_R {
NOSTRETCH_R::new(((self.bits >> 17) & 1) != 0)
}
#[inline(always)]
pub fn wupen(&self) -> WUPEN_R {
WUPEN_R::new(((self.bits >> 18) & 1) != 0)
}
#[inline(always)]
pub fn gcen(&self) -> GCEN_R {
GCEN_R::new(((self.bits >> 19) & 1) != 0)
}
#[inline(always)]
pub fn smbhen(&self) -> SMBHEN_R {
SMBHEN_R::new(((self.bits >> 20) & 1) != 0)
}
#[inline(always)]
pub fn smbden(&self) -> SMBDEN_R {
SMBDEN_R::new(((self.bits >> 21) & 1) != 0)
}
#[inline(always)]
pub fn alerten(&self) -> ALERTEN_R {
ALERTEN_R::new(((self.bits >> 22) & 1) != 0)
}
#[inline(always)]
pub fn pecen(&self) -> PECEN_R {
PECEN_R::new(((self.bits >> 23) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CR1")
.field("pe", &self.pe())
.field("txie", &self.txie())
.field("rxie", &self.rxie())
.field("addrie", &self.addrie())
.field("nackie", &self.nackie())
.field("stopie", &self.stopie())
.field("tcie", &self.tcie())
.field("errie", &self.errie())
.field("dnf", &self.dnf())
.field("anfoff", &self.anfoff())
.field("txdmaen", &self.txdmaen())
.field("rxdmaen", &self.rxdmaen())
.field("sbc", &self.sbc())
.field("nostretch", &self.nostretch())
.field("wupen", &self.wupen())
.field("gcen", &self.gcen())
.field("smbhen", &self.smbhen())
.field("smbden", &self.smbden())
.field("alerten", &self.alerten())
.field("pecen", &self.pecen())
.finish()
}
}
impl W {
#[inline(always)]
pub fn pe(&mut self) -> PE_W<CR1rs> {
PE_W::new(self, 0)
}
#[inline(always)]
pub fn txie(&mut self) -> TXIE_W<CR1rs> {
TXIE_W::new(self, 1)
}
#[inline(always)]
pub fn rxie(&mut self) -> RXIE_W<CR1rs> {
RXIE_W::new(self, 2)
}
#[inline(always)]
pub fn addrie(&mut self) -> ADDRIE_W<CR1rs> {
ADDRIE_W::new(self, 3)
}
#[inline(always)]
pub fn nackie(&mut self) -> NACKIE_W<CR1rs> {
NACKIE_W::new(self, 4)
}
#[inline(always)]
pub fn stopie(&mut self) -> STOPIE_W<CR1rs> {
STOPIE_W::new(self, 5)
}
#[inline(always)]
pub fn tcie(&mut self) -> TCIE_W<CR1rs> {
TCIE_W::new(self, 6)
}
#[inline(always)]
pub fn errie(&mut self) -> ERRIE_W<CR1rs> {
ERRIE_W::new(self, 7)
}
#[inline(always)]
pub fn dnf(&mut self) -> DNF_W<CR1rs> {
DNF_W::new(self, 8)
}
#[inline(always)]
pub fn anfoff(&mut self) -> ANFOFF_W<CR1rs> {
ANFOFF_W::new(self, 12)
}
#[inline(always)]
pub fn txdmaen(&mut self) -> TXDMAEN_W<CR1rs> {
TXDMAEN_W::new(self, 14)
}
#[inline(always)]
pub fn rxdmaen(&mut self) -> RXDMAEN_W<CR1rs> {
RXDMAEN_W::new(self, 15)
}
#[inline(always)]
pub fn sbc(&mut self) -> SBC_W<CR1rs> {
SBC_W::new(self, 16)
}
#[inline(always)]
pub fn nostretch(&mut self) -> NOSTRETCH_W<CR1rs> {
NOSTRETCH_W::new(self, 17)
}
#[inline(always)]
pub fn wupen(&mut self) -> WUPEN_W<CR1rs> {
WUPEN_W::new(self, 18)
}
#[inline(always)]
pub fn gcen(&mut self) -> GCEN_W<CR1rs> {
GCEN_W::new(self, 19)
}
#[inline(always)]
pub fn smbhen(&mut self) -> SMBHEN_W<CR1rs> {
SMBHEN_W::new(self, 20)
}
#[inline(always)]
pub fn smbden(&mut self) -> SMBDEN_W<CR1rs> {
SMBDEN_W::new(self, 21)
}
#[inline(always)]
pub fn alerten(&mut self) -> ALERTEN_W<CR1rs> {
ALERTEN_W::new(self, 22)
}
#[inline(always)]
pub fn pecen(&mut self) -> PECEN_W<CR1rs> {
PECEN_W::new(self, 23)
}
}
pub struct CR1rs;
impl crate::RegisterSpec for CR1rs {
type Ux = u32;
}
impl crate::Readable for CR1rs {}
impl crate::Writable for CR1rs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for CR1rs {}