pub type R = crate::R<ROUTEPENrs>;
pub type W = crate::W<ROUTEPENrs>;
pub type RxpenR = crate::BitReader;
pub type RxpenW<'a, REG> = crate::BitWriter<'a, REG>;
pub type TxpenR = crate::BitReader;
pub type TxpenW<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn rxpen(&self) -> RxpenR {
RxpenR::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn txpen(&self) -> TxpenR {
TxpenR::new(((self.bits >> 1) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("ROUTEPEN")
.field("rxpen", &self.rxpen())
.field("txpen", &self.txpen())
.finish()
}
}
impl W {
#[inline(always)]
pub fn rxpen(&mut self) -> RxpenW<'_, ROUTEPENrs> {
RxpenW::new(self, 0)
}
#[inline(always)]
pub fn txpen(&mut self) -> TxpenW<'_, ROUTEPENrs> {
TxpenW::new(self, 1)
}
}
pub struct ROUTEPENrs;
impl crate::RegisterSpec for ROUTEPENrs {
type Ux = u32;
}
impl crate::Readable for ROUTEPENrs {}
impl crate::Writable for ROUTEPENrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for ROUTEPENrs {}