stm32f1_staging/stm32f107/can1/
fmr.rs1pub type R = crate::R<FMRrs>;
3pub type W = crate::W<FMRrs>;
5pub type FINIT_R = crate::BitReader;
7pub type FINIT_W<'a, REG> = crate::BitWriter<'a, REG>;
9pub type CAN2SB_R = crate::FieldReader;
11pub type CAN2SB_W<'a, REG> = crate::FieldWriter<'a, REG, 6>;
13impl R {
14 #[inline(always)]
16 pub fn finit(&self) -> FINIT_R {
17 FINIT_R::new((self.bits & 1) != 0)
18 }
19 #[inline(always)]
21 pub fn can2sb(&self) -> CAN2SB_R {
22 CAN2SB_R::new(((self.bits >> 8) & 0x3f) as u8)
23 }
24}
25impl core::fmt::Debug for R {
26 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
27 f.debug_struct("FMR")
28 .field("can2sb", &self.can2sb())
29 .field("finit", &self.finit())
30 .finish()
31 }
32}
33impl W {
34 #[inline(always)]
36 pub fn finit(&mut self) -> FINIT_W<FMRrs> {
37 FINIT_W::new(self, 0)
38 }
39 #[inline(always)]
41 pub fn can2sb(&mut self) -> CAN2SB_W<FMRrs> {
42 CAN2SB_W::new(self, 8)
43 }
44}
45pub struct FMRrs;
51impl crate::RegisterSpec for FMRrs {
52 type Ux = u32;
53}
54impl crate::Readable for FMRrs {}
56impl crate::Writable for FMRrs {
58 type Safety = crate::Unsafe;
59}
60impl crate::Resettable for FMRrs {}