pub type R = crate::R<DTHRCTLrs>;
pub type W = crate::W<DTHRCTLrs>;
pub type NONISOTHREN_R = crate::BitReader;
pub type NONISOTHREN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type ISOTHREN_R = crate::BitReader;
pub type ISOTHREN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type TXTHRLEN_R = crate::FieldReader<u16>;
pub type TXTHRLEN_W<'a, REG> = crate::FieldWriter<'a, REG, 9, u16>;
pub type RXTHREN_R = crate::BitReader;
pub type RXTHREN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type RXTHRLEN_R = crate::FieldReader<u16>;
pub type RXTHRLEN_W<'a, REG> = crate::FieldWriter<'a, REG, 9, u16>;
pub type ARPEN_R = crate::BitReader;
pub type ARPEN_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn nonisothren(&self) -> NONISOTHREN_R {
NONISOTHREN_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn isothren(&self) -> ISOTHREN_R {
ISOTHREN_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn txthrlen(&self) -> TXTHRLEN_R {
TXTHRLEN_R::new(((self.bits >> 2) & 0x01ff) as u16)
}
#[inline(always)]
pub fn rxthren(&self) -> RXTHREN_R {
RXTHREN_R::new(((self.bits >> 16) & 1) != 0)
}
#[inline(always)]
pub fn rxthrlen(&self) -> RXTHRLEN_R {
RXTHRLEN_R::new(((self.bits >> 17) & 0x01ff) as u16)
}
#[inline(always)]
pub fn arpen(&self) -> ARPEN_R {
ARPEN_R::new(((self.bits >> 27) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("DTHRCTL")
.field("nonisothren", &self.nonisothren())
.field("isothren", &self.isothren())
.field("txthrlen", &self.txthrlen())
.field("rxthren", &self.rxthren())
.field("rxthrlen", &self.rxthrlen())
.field("arpen", &self.arpen())
.finish()
}
}
impl W {
#[inline(always)]
pub fn nonisothren(&mut self) -> NONISOTHREN_W<DTHRCTLrs> {
NONISOTHREN_W::new(self, 0)
}
#[inline(always)]
pub fn isothren(&mut self) -> ISOTHREN_W<DTHRCTLrs> {
ISOTHREN_W::new(self, 1)
}
#[inline(always)]
pub fn txthrlen(&mut self) -> TXTHRLEN_W<DTHRCTLrs> {
TXTHRLEN_W::new(self, 2)
}
#[inline(always)]
pub fn rxthren(&mut self) -> RXTHREN_W<DTHRCTLrs> {
RXTHREN_W::new(self, 16)
}
#[inline(always)]
pub fn rxthrlen(&mut self) -> RXTHRLEN_W<DTHRCTLrs> {
RXTHRLEN_W::new(self, 17)
}
#[inline(always)]
pub fn arpen(&mut self) -> ARPEN_W<DTHRCTLrs> {
ARPEN_W::new(self, 27)
}
}
pub struct DTHRCTLrs;
impl crate::RegisterSpec for DTHRCTLrs {
type Ux = u32;
}
impl crate::Readable for DTHRCTLrs {}
impl crate::Writable for DTHRCTLrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for DTHRCTLrs {}