py32f0/py32f030/exti/
swier.rs

1///Register `SWIER` reader
2pub struct R(crate::R<SWIER_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<SWIER_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<SWIER_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<SWIER_SPEC>) -> Self {
13        R(reader)
14    }
15}
16///Register `SWIER` writer
17pub struct W(crate::W<SWIER_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<SWIER_SPEC>;
20    #[inline(always)]
21    fn deref(&self) -> &Self::Target {
22        &self.0
23    }
24}
25impl core::ops::DerefMut for W {
26    #[inline(always)]
27    fn deref_mut(&mut self) -> &mut Self::Target {
28        &mut self.0
29    }
30}
31impl From<crate::W<SWIER_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<SWIER_SPEC>) -> Self {
34        W(writer)
35    }
36}
37///Field `SWI0` reader - Rising trigger event configuration bit of Configurable Event input
38pub type SWI0_R = crate::BitReader<SWI0W_A>;
39/**Rising trigger event configuration bit of Configurable Event input
40
41Value on reset: 0*/
42#[derive(Clone, Copy, Debug, PartialEq, Eq)]
43pub enum SWI0W_A {
44    ///1: Generates an interrupt request
45    Pend = 1,
46}
47impl From<SWI0W_A> for bool {
48    #[inline(always)]
49    fn from(variant: SWI0W_A) -> Self {
50        variant as u8 != 0
51    }
52}
53impl SWI0_R {
54    ///Get enumerated values variant
55    #[inline(always)]
56    pub fn variant(&self) -> Option<SWI0W_A> {
57        match self.bits {
58            true => Some(SWI0W_A::Pend),
59            _ => None,
60        }
61    }
62    ///Checks if the value of the field is `Pend`
63    #[inline(always)]
64    pub fn is_pend(&self) -> bool {
65        *self == SWI0W_A::Pend
66    }
67}
68///Field `SWI0` writer - Rising trigger event configuration bit of Configurable Event input
69pub type SWI0_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWIER_SPEC, SWI0W_A, O>;
70impl<'a, const O: u8> SWI0_W<'a, O> {
71    ///Generates an interrupt request
72    #[inline(always)]
73    pub fn pend(self) -> &'a mut W {
74        self.variant(SWI0W_A::Pend)
75    }
76}
77///Field `SWI1` reader - Rising trigger event configuration bit of Configurable Event input
78pub use SWI0_R as SWI1_R;
79///Field `SWI2` reader - Rising trigger event configuration bit of Configurable Event input
80pub use SWI0_R as SWI2_R;
81///Field `SWI3` reader - Rising trigger event configuration bit of Configurable Event input
82pub use SWI0_R as SWI3_R;
83///Field `SWI4` reader - Rising trigger event configuration bit of Configurable Event input
84pub use SWI0_R as SWI4_R;
85///Field `SWI5` reader - Rising trigger event configuration bit of Configurable Event input
86pub use SWI0_R as SWI5_R;
87///Field `SWI6` reader - Rising trigger event configuration bit of Configurable Event input
88pub use SWI0_R as SWI6_R;
89///Field `SWI7` reader - Rising trigger event configuration bit of Configurable Event input
90pub use SWI0_R as SWI7_R;
91///Field `SWI8` reader - Rising trigger event configuration bit of Configurable Event input
92pub use SWI0_R as SWI8_R;
93///Field `SWI9` reader - Rising trigger event configuration bit of Configurable Event input
94pub use SWI0_R as SWI9_R;
95///Field `SWI10` reader - Rising trigger event configuration bit of Configurable Event input
96pub use SWI0_R as SWI10_R;
97///Field `SWI11` reader - Rising trigger event configuration bit of Configurable Event input
98pub use SWI0_R as SWI11_R;
99///Field `SWI12` reader - Rising trigger event configuration bit of Configurable Event input
100pub use SWI0_R as SWI12_R;
101///Field `SWI13` reader - Rising trigger event configuration bit of Configurable Event input
102pub use SWI0_R as SWI13_R;
103///Field `SWI14` reader - Rising trigger event configuration bit of Configurable Event input
104pub use SWI0_R as SWI14_R;
105///Field `SWI15` reader - Rising trigger event configuration bit of Configurable Event input
106pub use SWI0_R as SWI15_R;
107///Field `SWI16` reader - Rising trigger event configuration bit of Configurable Event input
108pub use SWI0_R as SWI16_R;
109///Field `SWI17` reader - Rising trigger event configuration bit of Configurable Event input
110pub use SWI0_R as SWI17_R;
111///Field `SWI18` reader - Rising trigger event configuration bit of Configurable Event input
112pub use SWI0_R as SWI18_R;
113///Field `SWI1` writer - Rising trigger event configuration bit of Configurable Event input
114pub use SWI0_W as SWI1_W;
115///Field `SWI2` writer - Rising trigger event configuration bit of Configurable Event input
116pub use SWI0_W as SWI2_W;
117///Field `SWI3` writer - Rising trigger event configuration bit of Configurable Event input
118pub use SWI0_W as SWI3_W;
119///Field `SWI4` writer - Rising trigger event configuration bit of Configurable Event input
120pub use SWI0_W as SWI4_W;
121///Field `SWI5` writer - Rising trigger event configuration bit of Configurable Event input
122pub use SWI0_W as SWI5_W;
123///Field `SWI6` writer - Rising trigger event configuration bit of Configurable Event input
124pub use SWI0_W as SWI6_W;
125///Field `SWI7` writer - Rising trigger event configuration bit of Configurable Event input
126pub use SWI0_W as SWI7_W;
127///Field `SWI8` writer - Rising trigger event configuration bit of Configurable Event input
128pub use SWI0_W as SWI8_W;
129///Field `SWI9` writer - Rising trigger event configuration bit of Configurable Event input
130pub use SWI0_W as SWI9_W;
131///Field `SWI10` writer - Rising trigger event configuration bit of Configurable Event input
132pub use SWI0_W as SWI10_W;
133///Field `SWI11` writer - Rising trigger event configuration bit of Configurable Event input
134pub use SWI0_W as SWI11_W;
135///Field `SWI12` writer - Rising trigger event configuration bit of Configurable Event input
136pub use SWI0_W as SWI12_W;
137///Field `SWI13` writer - Rising trigger event configuration bit of Configurable Event input
138pub use SWI0_W as SWI13_W;
139///Field `SWI14` writer - Rising trigger event configuration bit of Configurable Event input
140pub use SWI0_W as SWI14_W;
141///Field `SWI15` writer - Rising trigger event configuration bit of Configurable Event input
142pub use SWI0_W as SWI15_W;
143///Field `SWI16` writer - Rising trigger event configuration bit of Configurable Event input
144pub use SWI0_W as SWI16_W;
145///Field `SWI17` writer - Rising trigger event configuration bit of Configurable Event input
146pub use SWI0_W as SWI17_W;
147///Field `SWI18` writer - Rising trigger event configuration bit of Configurable Event input
148pub use SWI0_W as SWI18_W;
149impl R {
150    ///Bit 0 - Rising trigger event configuration bit of Configurable Event input
151    #[inline(always)]
152    pub fn swi0(&self) -> SWI0_R {
153        SWI0_R::new((self.bits & 1) != 0)
154    }
155    ///Bit 1 - Rising trigger event configuration bit of Configurable Event input
156    #[inline(always)]
157    pub fn swi1(&self) -> SWI1_R {
158        SWI1_R::new(((self.bits >> 1) & 1) != 0)
159    }
160    ///Bit 2 - Rising trigger event configuration bit of Configurable Event input
161    #[inline(always)]
162    pub fn swi2(&self) -> SWI2_R {
163        SWI2_R::new(((self.bits >> 2) & 1) != 0)
164    }
165    ///Bit 3 - Rising trigger event configuration bit of Configurable Event input
166    #[inline(always)]
167    pub fn swi3(&self) -> SWI3_R {
168        SWI3_R::new(((self.bits >> 3) & 1) != 0)
169    }
170    ///Bit 4 - Rising trigger event configuration bit of Configurable Event input
171    #[inline(always)]
172    pub fn swi4(&self) -> SWI4_R {
173        SWI4_R::new(((self.bits >> 4) & 1) != 0)
174    }
175    ///Bit 5 - Rising trigger event configuration bit of Configurable Event input
176    #[inline(always)]
177    pub fn swi5(&self) -> SWI5_R {
178        SWI5_R::new(((self.bits >> 5) & 1) != 0)
179    }
180    ///Bit 6 - Rising trigger event configuration bit of Configurable Event input
181    #[inline(always)]
182    pub fn swi6(&self) -> SWI6_R {
183        SWI6_R::new(((self.bits >> 6) & 1) != 0)
184    }
185    ///Bit 7 - Rising trigger event configuration bit of Configurable Event input
186    #[inline(always)]
187    pub fn swi7(&self) -> SWI7_R {
188        SWI7_R::new(((self.bits >> 7) & 1) != 0)
189    }
190    ///Bit 8 - Rising trigger event configuration bit of Configurable Event input
191    #[inline(always)]
192    pub fn swi8(&self) -> SWI8_R {
193        SWI8_R::new(((self.bits >> 8) & 1) != 0)
194    }
195    ///Bit 9 - Rising trigger event configuration bit of Configurable Event input
196    #[inline(always)]
197    pub fn swi9(&self) -> SWI9_R {
198        SWI9_R::new(((self.bits >> 9) & 1) != 0)
199    }
200    ///Bit 10 - Rising trigger event configuration bit of Configurable Event input
201    #[inline(always)]
202    pub fn swi10(&self) -> SWI10_R {
203        SWI10_R::new(((self.bits >> 10) & 1) != 0)
204    }
205    ///Bit 11 - Rising trigger event configuration bit of Configurable Event input
206    #[inline(always)]
207    pub fn swi11(&self) -> SWI11_R {
208        SWI11_R::new(((self.bits >> 11) & 1) != 0)
209    }
210    ///Bit 12 - Rising trigger event configuration bit of Configurable Event input
211    #[inline(always)]
212    pub fn swi12(&self) -> SWI12_R {
213        SWI12_R::new(((self.bits >> 12) & 1) != 0)
214    }
215    ///Bit 13 - Rising trigger event configuration bit of Configurable Event input
216    #[inline(always)]
217    pub fn swi13(&self) -> SWI13_R {
218        SWI13_R::new(((self.bits >> 13) & 1) != 0)
219    }
220    ///Bit 14 - Rising trigger event configuration bit of Configurable Event input
221    #[inline(always)]
222    pub fn swi14(&self) -> SWI14_R {
223        SWI14_R::new(((self.bits >> 14) & 1) != 0)
224    }
225    ///Bit 15 - Rising trigger event configuration bit of Configurable Event input
226    #[inline(always)]
227    pub fn swi15(&self) -> SWI15_R {
228        SWI15_R::new(((self.bits >> 15) & 1) != 0)
229    }
230    ///Bit 16 - Rising trigger event configuration bit of Configurable Event input
231    #[inline(always)]
232    pub fn swi16(&self) -> SWI16_R {
233        SWI16_R::new(((self.bits >> 16) & 1) != 0)
234    }
235    ///Bit 17 - Rising trigger event configuration bit of Configurable Event input
236    #[inline(always)]
237    pub fn swi17(&self) -> SWI17_R {
238        SWI17_R::new(((self.bits >> 17) & 1) != 0)
239    }
240    ///Bit 18 - Rising trigger event configuration bit of Configurable Event input
241    #[inline(always)]
242    pub fn swi18(&self) -> SWI18_R {
243        SWI18_R::new(((self.bits >> 18) & 1) != 0)
244    }
245}
246impl W {
247    ///Bit 0 - Rising trigger event configuration bit of Configurable Event input
248    #[inline(always)]
249    #[must_use]
250    pub fn swi0(&mut self) -> SWI0_W<0> {
251        SWI0_W::new(self)
252    }
253    ///Bit 1 - Rising trigger event configuration bit of Configurable Event input
254    #[inline(always)]
255    #[must_use]
256    pub fn swi1(&mut self) -> SWI1_W<1> {
257        SWI1_W::new(self)
258    }
259    ///Bit 2 - Rising trigger event configuration bit of Configurable Event input
260    #[inline(always)]
261    #[must_use]
262    pub fn swi2(&mut self) -> SWI2_W<2> {
263        SWI2_W::new(self)
264    }
265    ///Bit 3 - Rising trigger event configuration bit of Configurable Event input
266    #[inline(always)]
267    #[must_use]
268    pub fn swi3(&mut self) -> SWI3_W<3> {
269        SWI3_W::new(self)
270    }
271    ///Bit 4 - Rising trigger event configuration bit of Configurable Event input
272    #[inline(always)]
273    #[must_use]
274    pub fn swi4(&mut self) -> SWI4_W<4> {
275        SWI4_W::new(self)
276    }
277    ///Bit 5 - Rising trigger event configuration bit of Configurable Event input
278    #[inline(always)]
279    #[must_use]
280    pub fn swi5(&mut self) -> SWI5_W<5> {
281        SWI5_W::new(self)
282    }
283    ///Bit 6 - Rising trigger event configuration bit of Configurable Event input
284    #[inline(always)]
285    #[must_use]
286    pub fn swi6(&mut self) -> SWI6_W<6> {
287        SWI6_W::new(self)
288    }
289    ///Bit 7 - Rising trigger event configuration bit of Configurable Event input
290    #[inline(always)]
291    #[must_use]
292    pub fn swi7(&mut self) -> SWI7_W<7> {
293        SWI7_W::new(self)
294    }
295    ///Bit 8 - Rising trigger event configuration bit of Configurable Event input
296    #[inline(always)]
297    #[must_use]
298    pub fn swi8(&mut self) -> SWI8_W<8> {
299        SWI8_W::new(self)
300    }
301    ///Bit 9 - Rising trigger event configuration bit of Configurable Event input
302    #[inline(always)]
303    #[must_use]
304    pub fn swi9(&mut self) -> SWI9_W<9> {
305        SWI9_W::new(self)
306    }
307    ///Bit 10 - Rising trigger event configuration bit of Configurable Event input
308    #[inline(always)]
309    #[must_use]
310    pub fn swi10(&mut self) -> SWI10_W<10> {
311        SWI10_W::new(self)
312    }
313    ///Bit 11 - Rising trigger event configuration bit of Configurable Event input
314    #[inline(always)]
315    #[must_use]
316    pub fn swi11(&mut self) -> SWI11_W<11> {
317        SWI11_W::new(self)
318    }
319    ///Bit 12 - Rising trigger event configuration bit of Configurable Event input
320    #[inline(always)]
321    #[must_use]
322    pub fn swi12(&mut self) -> SWI12_W<12> {
323        SWI12_W::new(self)
324    }
325    ///Bit 13 - Rising trigger event configuration bit of Configurable Event input
326    #[inline(always)]
327    #[must_use]
328    pub fn swi13(&mut self) -> SWI13_W<13> {
329        SWI13_W::new(self)
330    }
331    ///Bit 14 - Rising trigger event configuration bit of Configurable Event input
332    #[inline(always)]
333    #[must_use]
334    pub fn swi14(&mut self) -> SWI14_W<14> {
335        SWI14_W::new(self)
336    }
337    ///Bit 15 - Rising trigger event configuration bit of Configurable Event input
338    #[inline(always)]
339    #[must_use]
340    pub fn swi15(&mut self) -> SWI15_W<15> {
341        SWI15_W::new(self)
342    }
343    ///Bit 16 - Rising trigger event configuration bit of Configurable Event input
344    #[inline(always)]
345    #[must_use]
346    pub fn swi16(&mut self) -> SWI16_W<16> {
347        SWI16_W::new(self)
348    }
349    ///Bit 17 - Rising trigger event configuration bit of Configurable Event input
350    #[inline(always)]
351    #[must_use]
352    pub fn swi17(&mut self) -> SWI17_W<17> {
353        SWI17_W::new(self)
354    }
355    ///Bit 18 - Rising trigger event configuration bit of Configurable Event input
356    #[inline(always)]
357    #[must_use]
358    pub fn swi18(&mut self) -> SWI18_W<18> {
359        SWI18_W::new(self)
360    }
361    ///Writes raw bits to the register.
362    #[inline(always)]
363    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
364        self.0.bits(bits);
365        self
366    }
367}
368/**EXTI software interrupt event register
369
370This register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).
371
372For information about available fields see [swier](index.html) module*/
373pub struct SWIER_SPEC;
374impl crate::RegisterSpec for SWIER_SPEC {
375    type Ux = u32;
376}
377///`read()` method returns [swier::R](R) reader structure
378impl crate::Readable for SWIER_SPEC {
379    type Reader = R;
380}
381///`write(|w| ..)` method takes [swier::W](W) writer structure
382impl crate::Writable for SWIER_SPEC {
383    type Writer = W;
384    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
385    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
386}
387///`reset()` method sets SWIER to value 0
388impl crate::Resettable for SWIER_SPEC {
389    const RESET_VALUE: Self::Ux = 0;
390}