pub type R = crate::R<ROUTEPENrs>;
pub type W = crate::W<ROUTEPENrs>;
pub type SwclktckpenR = crate::BitReader;
pub type SwclktckpenW<'a, REG> = crate::BitWriter<'a, REG>;
pub type SwdiotmspenR = crate::BitReader;
pub type SwdiotmspenW<'a, REG> = crate::BitWriter<'a, REG>;
pub type TdopenR = crate::BitReader;
pub type TdopenW<'a, REG> = crate::BitWriter<'a, REG>;
pub type TdipenR = crate::BitReader;
pub type TdipenW<'a, REG> = crate::BitWriter<'a, REG>;
pub type SwvpenR = crate::BitReader;
pub type SwvpenW<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn swclktckpen(&self) -> SwclktckpenR {
SwclktckpenR::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn swdiotmspen(&self) -> SwdiotmspenR {
SwdiotmspenR::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn tdopen(&self) -> TdopenR {
TdopenR::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn tdipen(&self) -> TdipenR {
TdipenR::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn swvpen(&self) -> SwvpenR {
SwvpenR::new(((self.bits >> 4) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("ROUTEPEN")
.field("swclktckpen", &self.swclktckpen())
.field("swdiotmspen", &self.swdiotmspen())
.field("tdopen", &self.tdopen())
.field("tdipen", &self.tdipen())
.field("swvpen", &self.swvpen())
.finish()
}
}
impl W {
#[inline(always)]
pub fn swclktckpen(&mut self) -> SwclktckpenW<'_, ROUTEPENrs> {
SwclktckpenW::new(self, 0)
}
#[inline(always)]
pub fn swdiotmspen(&mut self) -> SwdiotmspenW<'_, ROUTEPENrs> {
SwdiotmspenW::new(self, 1)
}
#[inline(always)]
pub fn tdopen(&mut self) -> TdopenW<'_, ROUTEPENrs> {
TdopenW::new(self, 2)
}
#[inline(always)]
pub fn tdipen(&mut self) -> TdipenW<'_, ROUTEPENrs> {
TdipenW::new(self, 3)
}
#[inline(always)]
pub fn swvpen(&mut self) -> SwvpenW<'_, ROUTEPENrs> {
SwvpenW::new(self, 4)
}
}
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 {
const RESET_VALUE: u32 = 0x0f;
}