pub type R = crate::R<TIMEOUTRrs>;
pub type W = crate::W<TIMEOUTRrs>;
pub type TIMEOUTA_R = crate::FieldReader<u16>;
pub type TIMEOUTA_W<'a, REG> = crate::FieldWriter<'a, REG, 12, u16>;
pub type TIDLE_R = crate::BitReader;
pub type TIDLE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type TIMOUTEN_R = crate::BitReader;
pub type TIMOUTEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type TIMEOUTB_R = crate::FieldReader<u16>;
pub type TIMEOUTB_W<'a, REG> = crate::FieldWriter<'a, REG, 12, u16>;
pub type TEXTEN_R = crate::BitReader;
pub type TEXTEN_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn timeouta(&self) -> TIMEOUTA_R {
TIMEOUTA_R::new((self.bits & 0x0fff) as u16)
}
#[inline(always)]
pub fn tidle(&self) -> TIDLE_R {
TIDLE_R::new(((self.bits >> 12) & 1) != 0)
}
#[inline(always)]
pub fn timouten(&self) -> TIMOUTEN_R {
TIMOUTEN_R::new(((self.bits >> 15) & 1) != 0)
}
#[inline(always)]
pub fn timeoutb(&self) -> TIMEOUTB_R {
TIMEOUTB_R::new(((self.bits >> 16) & 0x0fff) as u16)
}
#[inline(always)]
pub fn texten(&self) -> TEXTEN_R {
TEXTEN_R::new(((self.bits >> 31) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("TIMEOUTR")
.field("timeouta", &self.timeouta())
.field("tidle", &self.tidle())
.field("timouten", &self.timouten())
.field("timeoutb", &self.timeoutb())
.field("texten", &self.texten())
.finish()
}
}
impl W {
#[inline(always)]
pub fn timeouta(&mut self) -> TIMEOUTA_W<TIMEOUTRrs> {
TIMEOUTA_W::new(self, 0)
}
#[inline(always)]
pub fn tidle(&mut self) -> TIDLE_W<TIMEOUTRrs> {
TIDLE_W::new(self, 12)
}
#[inline(always)]
pub fn timouten(&mut self) -> TIMOUTEN_W<TIMEOUTRrs> {
TIMOUTEN_W::new(self, 15)
}
#[inline(always)]
pub fn timeoutb(&mut self) -> TIMEOUTB_W<TIMEOUTRrs> {
TIMEOUTB_W::new(self, 16)
}
#[inline(always)]
pub fn texten(&mut self) -> TEXTEN_W<TIMEOUTRrs> {
TEXTEN_W::new(self, 31)
}
}
pub struct TIMEOUTRrs;
impl crate::RegisterSpec for TIMEOUTRrs {
type Ux = u32;
}
impl crate::Readable for TIMEOUTRrs {}
impl crate::Writable for TIMEOUTRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for TIMEOUTRrs {}