pub type R = crate::R<TBRrs>;
pub type W = crate::W<TBRrs>;
pub type TSEL_R = crate::FieldReader;
pub type TSEL_W<'a, REG> = crate::FieldWriter<'a, REG, 6>;
pub type SBUS_R = crate::BitReader;
pub type SBUS_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type DBUS_R = crate::BitReader;
pub type DBUS_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn tsel(&self) -> TSEL_R {
TSEL_R::new((self.bits & 0x3f) as u8)
}
#[inline(always)]
pub fn sbus(&self) -> SBUS_R {
SBUS_R::new(((self.bits >> 16) & 1) != 0)
}
#[inline(always)]
pub fn dbus(&self) -> DBUS_R {
DBUS_R::new(((self.bits >> 17) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("TBR")
.field("tsel", &self.tsel())
.field("sbus", &self.sbus())
.field("dbus", &self.dbus())
.finish()
}
}
impl W {
#[inline(always)]
pub fn tsel(&mut self) -> TSEL_W<TBRrs> {
TSEL_W::new(self, 0)
}
#[inline(always)]
pub fn sbus(&mut self) -> SBUS_W<TBRrs> {
SBUS_W::new(self, 16)
}
#[inline(always)]
pub fn dbus(&mut self) -> DBUS_W<TBRrs> {
DBUS_W::new(self, 17)
}
}
pub struct TBRrs;
impl crate::RegisterSpec for TBRrs {
type Ux = u32;
}
impl crate::Readable for TBRrs {}
impl crate::Writable for TBRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for TBRrs {}