pub type R = crate::R<CRrs>;
pub type W = crate::W<CRrs>;
pub type RXDMA_R = crate::BitReader;
pub type RXDMA_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type TXDMA_R = crate::BitReader;
pub type TXDMA_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type RXMODE_R = crate::BitReader;
pub type RXMODE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type TXMODE_R = crate::BitReader;
pub type TXMODE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type LPBK_R = crate::BitReader;
pub type LPBK_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type SWPACT_R = crate::BitReader;
pub type SWPACT_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type DEACT_R = crate::BitReader;
pub type DEACT_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type SWPTEN_R = crate::BitReader;
pub type SWPTEN_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn rxdma(&self) -> RXDMA_R {
RXDMA_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn txdma(&self) -> TXDMA_R {
TXDMA_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn rxmode(&self) -> RXMODE_R {
RXMODE_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn txmode(&self) -> TXMODE_R {
TXMODE_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn lpbk(&self) -> LPBK_R {
LPBK_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn swpact(&self) -> SWPACT_R {
SWPACT_R::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn deact(&self) -> DEACT_R {
DEACT_R::new(((self.bits >> 10) & 1) != 0)
}
#[inline(always)]
pub fn swpten(&self) -> SWPTEN_R {
SWPTEN_R::new(((self.bits >> 11) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CR")
.field("rxdma", &self.rxdma())
.field("txdma", &self.txdma())
.field("rxmode", &self.rxmode())
.field("txmode", &self.txmode())
.field("lpbk", &self.lpbk())
.field("swpact", &self.swpact())
.field("deact", &self.deact())
.field("swpten", &self.swpten())
.finish()
}
}
impl W {
#[inline(always)]
pub fn rxdma(&mut self) -> RXDMA_W<CRrs> {
RXDMA_W::new(self, 0)
}
#[inline(always)]
pub fn txdma(&mut self) -> TXDMA_W<CRrs> {
TXDMA_W::new(self, 1)
}
#[inline(always)]
pub fn rxmode(&mut self) -> RXMODE_W<CRrs> {
RXMODE_W::new(self, 2)
}
#[inline(always)]
pub fn txmode(&mut self) -> TXMODE_W<CRrs> {
TXMODE_W::new(self, 3)
}
#[inline(always)]
pub fn lpbk(&mut self) -> LPBK_W<CRrs> {
LPBK_W::new(self, 4)
}
#[inline(always)]
pub fn swpact(&mut self) -> SWPACT_W<CRrs> {
SWPACT_W::new(self, 5)
}
#[inline(always)]
pub fn deact(&mut self) -> DEACT_W<CRrs> {
DEACT_W::new(self, 10)
}
#[inline(always)]
pub fn swpten(&mut self) -> SWPTEN_W<CRrs> {
SWPTEN_W::new(self, 11)
}
}
pub struct CRrs;
impl crate::RegisterSpec for CRrs {
type Ux = u32;
}
impl crate::Readable for CRrs {}
impl crate::Writable for CRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for CRrs {}