pub type R = crate::R<FMRrs>;
pub type W = crate::W<FMRrs>;
pub type FINIT_R = crate::BitReader;
pub type FINIT_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type CAN2SB_R = crate::FieldReader;
pub type CAN2SB_W<'a, REG> = crate::FieldWriter<'a, REG, 6>;
impl R {
#[inline(always)]
pub fn finit(&self) -> FINIT_R {
FINIT_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn can2sb(&self) -> CAN2SB_R {
CAN2SB_R::new(((self.bits >> 8) & 0x3f) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("FMR")
.field("can2sb", &self.can2sb())
.field("finit", &self.finit())
.finish()
}
}
impl W {
#[inline(always)]
pub fn finit(&mut self) -> FINIT_W<FMRrs> {
FINIT_W::new(self, 0)
}
#[inline(always)]
pub fn can2sb(&mut self) -> CAN2SB_W<FMRrs> {
CAN2SB_W::new(self, 8)
}
}
pub struct FMRrs;
impl crate::RegisterSpec for FMRrs {
type Ux = u32;
}
impl crate::Readable for FMRrs {}
impl crate::Writable for FMRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for FMRrs {}