pub type R = crate::R<DBTPrs>;
pub type W = crate::W<DBTPrs>;
pub type DSJW_R = crate::FieldReader;
pub type DSJW_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
pub type DTSEG2_R = crate::FieldReader;
pub type DTSEG2_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
pub type DTSEG1_R = crate::FieldReader;
pub type DTSEG1_W<'a, REG> = crate::FieldWriter<'a, REG, 5>;
pub type DBRP_R = crate::FieldReader;
pub type DBRP_W<'a, REG> = crate::FieldWriter<'a, REG, 5>;
pub type TDC_R = crate::BitReader;
pub type TDC_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn dsjw(&self) -> DSJW_R {
DSJW_R::new((self.bits & 0x0f) as u8)
}
#[inline(always)]
pub fn dtseg2(&self) -> DTSEG2_R {
DTSEG2_R::new(((self.bits >> 4) & 0x0f) as u8)
}
#[inline(always)]
pub fn dtseg1(&self) -> DTSEG1_R {
DTSEG1_R::new(((self.bits >> 8) & 0x1f) as u8)
}
#[inline(always)]
pub fn dbrp(&self) -> DBRP_R {
DBRP_R::new(((self.bits >> 16) & 0x1f) as u8)
}
#[inline(always)]
pub fn tdc(&self) -> TDC_R {
TDC_R::new(((self.bits >> 23) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("DBTP")
.field("dsjw", &self.dsjw())
.field("dtseg2", &self.dtseg2())
.field("dtseg1", &self.dtseg1())
.field("dbrp", &self.dbrp())
.field("tdc", &self.tdc())
.finish()
}
}
impl W {
#[inline(always)]
pub fn dsjw(&mut self) -> DSJW_W<DBTPrs> {
DSJW_W::new(self, 0)
}
#[inline(always)]
pub fn dtseg2(&mut self) -> DTSEG2_W<DBTPrs> {
DTSEG2_W::new(self, 4)
}
#[inline(always)]
pub fn dtseg1(&mut self) -> DTSEG1_W<DBTPrs> {
DTSEG1_W::new(self, 8)
}
#[inline(always)]
pub fn dbrp(&mut self) -> DBRP_W<DBTPrs> {
DBRP_W::new(self, 16)
}
#[inline(always)]
pub fn tdc(&mut self) -> TDC_W<DBTPrs> {
TDC_W::new(self, 23)
}
}
pub struct DBTPrs;
impl crate::RegisterSpec for DBTPrs {
type Ux = u32;
}
impl crate::Readable for DBTPrs {}
impl crate::Writable for DBTPrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for DBTPrs {
const RESET_VALUE: u32 = 0x0a33;
}