stm32f7_staging/stm32f779/gpioa/
bsrr.rs1pub type W = crate::W<BSRRrs>;
3#[cfg_attr(feature = "defmt", derive(defmt::Format))]
7#[derive(Clone, Copy, Debug, PartialEq, Eq)]
8pub enum BIT_SET {
9 Set = 1,
11}
12impl From<BIT_SET> for bool {
13 #[inline(always)]
14 fn from(variant: BIT_SET) -> Self {
15 variant as u8 != 0
16 }
17}
18pub type BS_W<'a, REG> = crate::BitWriter<'a, REG, BIT_SET>;
20impl<'a, REG> BS_W<'a, REG>
21where
22 REG: crate::Writable + crate::RegisterSpec,
23{
24 #[inline(always)]
26 pub fn set_(self) -> &'a mut crate::W<REG> {
27 self.variant(BIT_SET::Set)
28 }
29}
30#[cfg_attr(feature = "defmt", derive(defmt::Format))]
34#[derive(Clone, Copy, Debug, PartialEq, Eq)]
35pub enum BIT_RESET {
36 Reset = 1,
38}
39impl From<BIT_RESET> for bool {
40 #[inline(always)]
41 fn from(variant: BIT_RESET) -> Self {
42 variant as u8 != 0
43 }
44}
45pub type BR_W<'a, REG> = crate::BitWriter<'a, REG, BIT_RESET>;
47impl<'a, REG> BR_W<'a, REG>
48where
49 REG: crate::Writable + crate::RegisterSpec,
50{
51 #[inline(always)]
53 pub fn reset(self) -> &'a mut crate::W<REG> {
54 self.variant(BIT_RESET::Reset)
55 }
56}
57impl core::fmt::Debug for crate::generic::Reg<BSRRrs> {
58 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
59 write!(f, "(not readable)")
60 }
61}
62impl W {
63 #[inline(always)]
67 pub fn bs(&mut self, n: u8) -> BS_W<BSRRrs> {
68 #[allow(clippy::no_effect)]
69 [(); 16][n as usize];
70 BS_W::new(self, n)
71 }
72 #[inline(always)]
74 pub fn bs0(&mut self) -> BS_W<BSRRrs> {
75 BS_W::new(self, 0)
76 }
77 #[inline(always)]
79 pub fn bs1(&mut self) -> BS_W<BSRRrs> {
80 BS_W::new(self, 1)
81 }
82 #[inline(always)]
84 pub fn bs2(&mut self) -> BS_W<BSRRrs> {
85 BS_W::new(self, 2)
86 }
87 #[inline(always)]
89 pub fn bs3(&mut self) -> BS_W<BSRRrs> {
90 BS_W::new(self, 3)
91 }
92 #[inline(always)]
94 pub fn bs4(&mut self) -> BS_W<BSRRrs> {
95 BS_W::new(self, 4)
96 }
97 #[inline(always)]
99 pub fn bs5(&mut self) -> BS_W<BSRRrs> {
100 BS_W::new(self, 5)
101 }
102 #[inline(always)]
104 pub fn bs6(&mut self) -> BS_W<BSRRrs> {
105 BS_W::new(self, 6)
106 }
107 #[inline(always)]
109 pub fn bs7(&mut self) -> BS_W<BSRRrs> {
110 BS_W::new(self, 7)
111 }
112 #[inline(always)]
114 pub fn bs8(&mut self) -> BS_W<BSRRrs> {
115 BS_W::new(self, 8)
116 }
117 #[inline(always)]
119 pub fn bs9(&mut self) -> BS_W<BSRRrs> {
120 BS_W::new(self, 9)
121 }
122 #[inline(always)]
124 pub fn bs10(&mut self) -> BS_W<BSRRrs> {
125 BS_W::new(self, 10)
126 }
127 #[inline(always)]
129 pub fn bs11(&mut self) -> BS_W<BSRRrs> {
130 BS_W::new(self, 11)
131 }
132 #[inline(always)]
134 pub fn bs12(&mut self) -> BS_W<BSRRrs> {
135 BS_W::new(self, 12)
136 }
137 #[inline(always)]
139 pub fn bs13(&mut self) -> BS_W<BSRRrs> {
140 BS_W::new(self, 13)
141 }
142 #[inline(always)]
144 pub fn bs14(&mut self) -> BS_W<BSRRrs> {
145 BS_W::new(self, 14)
146 }
147 #[inline(always)]
149 pub fn bs15(&mut self) -> BS_W<BSRRrs> {
150 BS_W::new(self, 15)
151 }
152 #[inline(always)]
156 pub fn br(&mut self, n: u8) -> BR_W<BSRRrs> {
157 #[allow(clippy::no_effect)]
158 [(); 16][n as usize];
159 BR_W::new(self, n + 16)
160 }
161 #[inline(always)]
163 pub fn br0(&mut self) -> BR_W<BSRRrs> {
164 BR_W::new(self, 16)
165 }
166 #[inline(always)]
168 pub fn br1(&mut self) -> BR_W<BSRRrs> {
169 BR_W::new(self, 17)
170 }
171 #[inline(always)]
173 pub fn br2(&mut self) -> BR_W<BSRRrs> {
174 BR_W::new(self, 18)
175 }
176 #[inline(always)]
178 pub fn br3(&mut self) -> BR_W<BSRRrs> {
179 BR_W::new(self, 19)
180 }
181 #[inline(always)]
183 pub fn br4(&mut self) -> BR_W<BSRRrs> {
184 BR_W::new(self, 20)
185 }
186 #[inline(always)]
188 pub fn br5(&mut self) -> BR_W<BSRRrs> {
189 BR_W::new(self, 21)
190 }
191 #[inline(always)]
193 pub fn br6(&mut self) -> BR_W<BSRRrs> {
194 BR_W::new(self, 22)
195 }
196 #[inline(always)]
198 pub fn br7(&mut self) -> BR_W<BSRRrs> {
199 BR_W::new(self, 23)
200 }
201 #[inline(always)]
203 pub fn br8(&mut self) -> BR_W<BSRRrs> {
204 BR_W::new(self, 24)
205 }
206 #[inline(always)]
208 pub fn br9(&mut self) -> BR_W<BSRRrs> {
209 BR_W::new(self, 25)
210 }
211 #[inline(always)]
213 pub fn br10(&mut self) -> BR_W<BSRRrs> {
214 BR_W::new(self, 26)
215 }
216 #[inline(always)]
218 pub fn br11(&mut self) -> BR_W<BSRRrs> {
219 BR_W::new(self, 27)
220 }
221 #[inline(always)]
223 pub fn br12(&mut self) -> BR_W<BSRRrs> {
224 BR_W::new(self, 28)
225 }
226 #[inline(always)]
228 pub fn br13(&mut self) -> BR_W<BSRRrs> {
229 BR_W::new(self, 29)
230 }
231 #[inline(always)]
233 pub fn br14(&mut self) -> BR_W<BSRRrs> {
234 BR_W::new(self, 30)
235 }
236 #[inline(always)]
238 pub fn br15(&mut self) -> BR_W<BSRRrs> {
239 BR_W::new(self, 31)
240 }
241}
242pub struct BSRRrs;
248impl crate::RegisterSpec for BSRRrs {
249 type Ux = u32;
250}
251impl crate::Writable for BSRRrs {
253 type Safety = crate::Unsafe;
254}
255impl crate::Resettable for BSRRrs {}