py32f0/py32f030/gpiob/
bsrr.rs1pub struct W(crate::W<BSRR_SPEC>);
3impl core::ops::Deref for W {
4 type Target = crate::W<BSRR_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl core::ops::DerefMut for W {
11 #[inline(always)]
12 fn deref_mut(&mut self) -> &mut Self::Target {
13 &mut self.0
14 }
15}
16impl From<crate::W<BSRR_SPEC>> for W {
17 #[inline(always)]
18 fn from(writer: crate::W<BSRR_SPEC>) -> Self {
19 W(writer)
20 }
21}
22#[derive(Clone, Copy, Debug, PartialEq, Eq)]
26pub enum BS0W_AW {
27 Set = 1,
29}
30impl From<BS0W_AW> for bool {
31 #[inline(always)]
32 fn from(variant: BS0W_AW) -> Self {
33 variant as u8 != 0
34 }
35}
36pub type BS0_W<'a, const O: u8> = crate::BitWriter<'a, u32, BSRR_SPEC, BS0W_AW, O>;
38impl<'a, const O: u8> BS0_W<'a, O> {
39 #[inline(always)]
41 pub fn set(self) -> &'a mut W {
42 self.variant(BS0W_AW::Set)
43 }
44}
45pub use BS0_W as BS1_W;
47pub use BS0_W as BS2_W;
49pub use BS0_W as BS3_W;
51pub use BS0_W as BS4_W;
53pub use BS0_W as BS5_W;
55pub use BS0_W as BS6_W;
57pub use BS0_W as BS7_W;
59pub use BS0_W as BS8_W;
61#[derive(Clone, Copy, Debug, PartialEq, Eq)]
65pub enum BR0W_AW {
66 Reset = 1,
68}
69impl From<BR0W_AW> for bool {
70 #[inline(always)]
71 fn from(variant: BR0W_AW) -> Self {
72 variant as u8 != 0
73 }
74}
75pub type BR0_W<'a, const O: u8> = crate::BitWriter<'a, u32, BSRR_SPEC, BR0W_AW, O>;
77impl<'a, const O: u8> BR0_W<'a, O> {
78 #[inline(always)]
80 pub fn reset(self) -> &'a mut W {
81 self.variant(BR0W_AW::Reset)
82 }
83}
84pub use BR0_W as BR1_W;
86pub use BR0_W as BR2_W;
88pub use BR0_W as BR3_W;
90pub use BR0_W as BR4_W;
92pub use BR0_W as BR5_W;
94pub use BR0_W as BR6_W;
96pub use BR0_W as BR7_W;
98pub use BR0_W as BR8_W;
100impl W {
101 #[inline(always)]
103 #[must_use]
104 pub fn bs0(&mut self) -> BS0_W<0> {
105 BS0_W::new(self)
106 }
107 #[inline(always)]
109 #[must_use]
110 pub fn bs1(&mut self) -> BS1_W<1> {
111 BS1_W::new(self)
112 }
113 #[inline(always)]
115 #[must_use]
116 pub fn bs2(&mut self) -> BS2_W<2> {
117 BS2_W::new(self)
118 }
119 #[inline(always)]
121 #[must_use]
122 pub fn bs3(&mut self) -> BS3_W<3> {
123 BS3_W::new(self)
124 }
125 #[inline(always)]
127 #[must_use]
128 pub fn bs4(&mut self) -> BS4_W<4> {
129 BS4_W::new(self)
130 }
131 #[inline(always)]
133 #[must_use]
134 pub fn bs5(&mut self) -> BS5_W<5> {
135 BS5_W::new(self)
136 }
137 #[inline(always)]
139 #[must_use]
140 pub fn bs6(&mut self) -> BS6_W<6> {
141 BS6_W::new(self)
142 }
143 #[inline(always)]
145 #[must_use]
146 pub fn bs7(&mut self) -> BS7_W<7> {
147 BS7_W::new(self)
148 }
149 #[inline(always)]
151 #[must_use]
152 pub fn bs8(&mut self) -> BS8_W<8> {
153 BS8_W::new(self)
154 }
155 #[inline(always)]
157 #[must_use]
158 pub fn br0(&mut self) -> BR0_W<16> {
159 BR0_W::new(self)
160 }
161 #[inline(always)]
163 #[must_use]
164 pub fn br1(&mut self) -> BR1_W<17> {
165 BR1_W::new(self)
166 }
167 #[inline(always)]
169 #[must_use]
170 pub fn br2(&mut self) -> BR2_W<18> {
171 BR2_W::new(self)
172 }
173 #[inline(always)]
175 #[must_use]
176 pub fn br3(&mut self) -> BR3_W<19> {
177 BR3_W::new(self)
178 }
179 #[inline(always)]
181 #[must_use]
182 pub fn br4(&mut self) -> BR4_W<20> {
183 BR4_W::new(self)
184 }
185 #[inline(always)]
187 #[must_use]
188 pub fn br5(&mut self) -> BR5_W<21> {
189 BR5_W::new(self)
190 }
191 #[inline(always)]
193 #[must_use]
194 pub fn br6(&mut self) -> BR6_W<22> {
195 BR6_W::new(self)
196 }
197 #[inline(always)]
199 #[must_use]
200 pub fn br7(&mut self) -> BR7_W<23> {
201 BR7_W::new(self)
202 }
203 #[inline(always)]
205 #[must_use]
206 pub fn br8(&mut self) -> BR8_W<24> {
207 BR8_W::new(self)
208 }
209 #[inline(always)]
211 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
212 self.0.bits(bits);
213 self
214 }
215}
216pub struct BSRR_SPEC;
222impl crate::RegisterSpec for BSRR_SPEC {
223 type Ux = u32;
224}
225impl crate::Writable for BSRR_SPEC {
227 type Writer = W;
228 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
229 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
230}
231impl crate::Resettable for BSRR_SPEC {
233 const RESET_VALUE: Self::Ux = 0;
234}