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