stm32f1_staging/stm32f103/can/
fm1r.rs1pub type R = crate::R<FM1Rrs>;
3pub type W = crate::W<FM1Rrs>;
5pub type FBM_R = crate::BitReader;
7pub type FBM_W<'a, REG> = crate::BitWriter<'a, REG>;
9impl R {
10 #[inline(always)]
14 pub fn fbm(&self, n: u8) -> FBM_R {
15 #[allow(clippy::no_effect)] [(); 14][n as usize];
16 FBM_R::new(((self.bits >> n) & 1) != 0)
17 }
18 #[inline(always)]
21 pub fn fbm_iter(&self) -> impl Iterator<Item = FBM_R> + '_ {
22 (0..14).map(move |n| FBM_R::new(((self.bits >> n) & 1) != 0))
23 }
24 #[inline(always)]
26 pub fn fbm0(&self) -> FBM_R {
27 FBM_R::new((self.bits & 1) != 0)
28 }
29 #[inline(always)]
31 pub fn fbm1(&self) -> FBM_R {
32 FBM_R::new(((self.bits >> 1) & 1) != 0)
33 }
34 #[inline(always)]
36 pub fn fbm2(&self) -> FBM_R {
37 FBM_R::new(((self.bits >> 2) & 1) != 0)
38 }
39 #[inline(always)]
41 pub fn fbm3(&self) -> FBM_R {
42 FBM_R::new(((self.bits >> 3) & 1) != 0)
43 }
44 #[inline(always)]
46 pub fn fbm4(&self) -> FBM_R {
47 FBM_R::new(((self.bits >> 4) & 1) != 0)
48 }
49 #[inline(always)]
51 pub fn fbm5(&self) -> FBM_R {
52 FBM_R::new(((self.bits >> 5) & 1) != 0)
53 }
54 #[inline(always)]
56 pub fn fbm6(&self) -> FBM_R {
57 FBM_R::new(((self.bits >> 6) & 1) != 0)
58 }
59 #[inline(always)]
61 pub fn fbm7(&self) -> FBM_R {
62 FBM_R::new(((self.bits >> 7) & 1) != 0)
63 }
64 #[inline(always)]
66 pub fn fbm8(&self) -> FBM_R {
67 FBM_R::new(((self.bits >> 8) & 1) != 0)
68 }
69 #[inline(always)]
71 pub fn fbm9(&self) -> FBM_R {
72 FBM_R::new(((self.bits >> 9) & 1) != 0)
73 }
74 #[inline(always)]
76 pub fn fbm10(&self) -> FBM_R {
77 FBM_R::new(((self.bits >> 10) & 1) != 0)
78 }
79 #[inline(always)]
81 pub fn fbm11(&self) -> FBM_R {
82 FBM_R::new(((self.bits >> 11) & 1) != 0)
83 }
84 #[inline(always)]
86 pub fn fbm12(&self) -> FBM_R {
87 FBM_R::new(((self.bits >> 12) & 1) != 0)
88 }
89 #[inline(always)]
91 pub fn fbm13(&self) -> FBM_R {
92 FBM_R::new(((self.bits >> 13) & 1) != 0)
93 }
94}
95impl core::fmt::Debug for R {
96 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
97 f.debug_struct("FM1R")
98 .field("fbm0", &self.fbm0())
99 .field("fbm1", &self.fbm1())
100 .field("fbm2", &self.fbm2())
101 .field("fbm3", &self.fbm3())
102 .field("fbm4", &self.fbm4())
103 .field("fbm5", &self.fbm5())
104 .field("fbm6", &self.fbm6())
105 .field("fbm7", &self.fbm7())
106 .field("fbm8", &self.fbm8())
107 .field("fbm9", &self.fbm9())
108 .field("fbm10", &self.fbm10())
109 .field("fbm11", &self.fbm11())
110 .field("fbm12", &self.fbm12())
111 .field("fbm13", &self.fbm13())
112 .finish()
113 }
114}
115impl W {
116 #[inline(always)]
120 pub fn fbm(&mut self, n: u8) -> FBM_W<FM1Rrs> {
121 #[allow(clippy::no_effect)] [(); 14][n as usize];
122 FBM_W::new(self, n)
123 }
124 #[inline(always)]
126 pub fn fbm0(&mut self) -> FBM_W<FM1Rrs> {
127 FBM_W::new(self, 0)
128 }
129 #[inline(always)]
131 pub fn fbm1(&mut self) -> FBM_W<FM1Rrs> {
132 FBM_W::new(self, 1)
133 }
134 #[inline(always)]
136 pub fn fbm2(&mut self) -> FBM_W<FM1Rrs> {
137 FBM_W::new(self, 2)
138 }
139 #[inline(always)]
141 pub fn fbm3(&mut self) -> FBM_W<FM1Rrs> {
142 FBM_W::new(self, 3)
143 }
144 #[inline(always)]
146 pub fn fbm4(&mut self) -> FBM_W<FM1Rrs> {
147 FBM_W::new(self, 4)
148 }
149 #[inline(always)]
151 pub fn fbm5(&mut self) -> FBM_W<FM1Rrs> {
152 FBM_W::new(self, 5)
153 }
154 #[inline(always)]
156 pub fn fbm6(&mut self) -> FBM_W<FM1Rrs> {
157 FBM_W::new(self, 6)
158 }
159 #[inline(always)]
161 pub fn fbm7(&mut self) -> FBM_W<FM1Rrs> {
162 FBM_W::new(self, 7)
163 }
164 #[inline(always)]
166 pub fn fbm8(&mut self) -> FBM_W<FM1Rrs> {
167 FBM_W::new(self, 8)
168 }
169 #[inline(always)]
171 pub fn fbm9(&mut self) -> FBM_W<FM1Rrs> {
172 FBM_W::new(self, 9)
173 }
174 #[inline(always)]
176 pub fn fbm10(&mut self) -> FBM_W<FM1Rrs> {
177 FBM_W::new(self, 10)
178 }
179 #[inline(always)]
181 pub fn fbm11(&mut self) -> FBM_W<FM1Rrs> {
182 FBM_W::new(self, 11)
183 }
184 #[inline(always)]
186 pub fn fbm12(&mut self) -> FBM_W<FM1Rrs> {
187 FBM_W::new(self, 12)
188 }
189 #[inline(always)]
191 pub fn fbm13(&mut self) -> FBM_W<FM1Rrs> {
192 FBM_W::new(self, 13)
193 }
194}
195pub struct FM1Rrs;
201impl crate::RegisterSpec for FM1Rrs {
202 type Ux = u32;
203}
204impl crate::Readable for FM1Rrs {}
206impl crate::Writable for FM1Rrs {
208 type Safety = crate::Unsafe;
209}
210impl crate::Resettable for FM1Rrs {}