stm32f1_staging/stm32f103/can/
mcr.rs1pub type R = crate::R<MCRrs>;
3pub type W = crate::W<MCRrs>;
5pub type INRQ_R = crate::BitReader;
7pub type INRQ_W<'a, REG> = crate::BitWriter<'a, REG>;
9pub type SLEEP_R = crate::BitReader;
11pub type SLEEP_W<'a, REG> = crate::BitWriter<'a, REG>;
13pub type TXFP_R = crate::BitReader;
15pub type TXFP_W<'a, REG> = crate::BitWriter<'a, REG>;
17pub type RFLM_R = crate::BitReader;
19pub type RFLM_W<'a, REG> = crate::BitWriter<'a, REG>;
21pub type NART_R = crate::BitReader;
23pub type NART_W<'a, REG> = crate::BitWriter<'a, REG>;
25pub type AWUM_R = crate::BitReader;
27pub type AWUM_W<'a, REG> = crate::BitWriter<'a, REG>;
29pub type ABOM_R = crate::BitReader;
31pub type ABOM_W<'a, REG> = crate::BitWriter<'a, REG>;
33pub type TTCM_R = crate::BitReader;
35pub type TTCM_W<'a, REG> = crate::BitWriter<'a, REG>;
37pub type RESET_R = crate::BitReader;
39pub type RESET_W<'a, REG> = crate::BitWriter<'a, REG>;
41pub type DBF_R = crate::BitReader;
43pub type DBF_W<'a, REG> = crate::BitWriter<'a, REG>;
45impl R {
46 #[inline(always)]
48 pub fn inrq(&self) -> INRQ_R {
49 INRQ_R::new((self.bits & 1) != 0)
50 }
51 #[inline(always)]
53 pub fn sleep(&self) -> SLEEP_R {
54 SLEEP_R::new(((self.bits >> 1) & 1) != 0)
55 }
56 #[inline(always)]
58 pub fn txfp(&self) -> TXFP_R {
59 TXFP_R::new(((self.bits >> 2) & 1) != 0)
60 }
61 #[inline(always)]
63 pub fn rflm(&self) -> RFLM_R {
64 RFLM_R::new(((self.bits >> 3) & 1) != 0)
65 }
66 #[inline(always)]
68 pub fn nart(&self) -> NART_R {
69 NART_R::new(((self.bits >> 4) & 1) != 0)
70 }
71 #[inline(always)]
73 pub fn awum(&self) -> AWUM_R {
74 AWUM_R::new(((self.bits >> 5) & 1) != 0)
75 }
76 #[inline(always)]
78 pub fn abom(&self) -> ABOM_R {
79 ABOM_R::new(((self.bits >> 6) & 1) != 0)
80 }
81 #[inline(always)]
83 pub fn ttcm(&self) -> TTCM_R {
84 TTCM_R::new(((self.bits >> 7) & 1) != 0)
85 }
86 #[inline(always)]
88 pub fn reset(&self) -> RESET_R {
89 RESET_R::new(((self.bits >> 15) & 1) != 0)
90 }
91 #[inline(always)]
93 pub fn dbf(&self) -> DBF_R {
94 DBF_R::new(((self.bits >> 16) & 1) != 0)
95 }
96}
97impl core::fmt::Debug for R {
98 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
99 f.debug_struct("MCR")
100 .field("dbf", &self.dbf())
101 .field("reset", &self.reset())
102 .field("ttcm", &self.ttcm())
103 .field("abom", &self.abom())
104 .field("awum", &self.awum())
105 .field("nart", &self.nart())
106 .field("rflm", &self.rflm())
107 .field("txfp", &self.txfp())
108 .field("sleep", &self.sleep())
109 .field("inrq", &self.inrq())
110 .finish()
111 }
112}
113impl W {
114 #[inline(always)]
116 pub fn inrq(&mut self) -> INRQ_W<MCRrs> {
117 INRQ_W::new(self, 0)
118 }
119 #[inline(always)]
121 pub fn sleep(&mut self) -> SLEEP_W<MCRrs> {
122 SLEEP_W::new(self, 1)
123 }
124 #[inline(always)]
126 pub fn txfp(&mut self) -> TXFP_W<MCRrs> {
127 TXFP_W::new(self, 2)
128 }
129 #[inline(always)]
131 pub fn rflm(&mut self) -> RFLM_W<MCRrs> {
132 RFLM_W::new(self, 3)
133 }
134 #[inline(always)]
136 pub fn nart(&mut self) -> NART_W<MCRrs> {
137 NART_W::new(self, 4)
138 }
139 #[inline(always)]
141 pub fn awum(&mut self) -> AWUM_W<MCRrs> {
142 AWUM_W::new(self, 5)
143 }
144 #[inline(always)]
146 pub fn abom(&mut self) -> ABOM_W<MCRrs> {
147 ABOM_W::new(self, 6)
148 }
149 #[inline(always)]
151 pub fn ttcm(&mut self) -> TTCM_W<MCRrs> {
152 TTCM_W::new(self, 7)
153 }
154 #[inline(always)]
156 pub fn reset(&mut self) -> RESET_W<MCRrs> {
157 RESET_W::new(self, 15)
158 }
159 #[inline(always)]
161 pub fn dbf(&mut self) -> DBF_W<MCRrs> {
162 DBF_W::new(self, 16)
163 }
164}
165pub struct MCRrs;
171impl crate::RegisterSpec for MCRrs {
172 type Ux = u32;
173}
174impl crate::Readable for MCRrs {}
176impl crate::Writable for MCRrs {
178 type Safety = crate::Unsafe;
179}
180impl crate::Resettable for MCRrs {}