py32f0/py32f030/exti/
rtsr.rs

1///Register `RTSR` reader
2pub struct R(crate::R<RTSR_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<RTSR_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<RTSR_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<RTSR_SPEC>) -> Self {
13        R(reader)
14    }
15}
16///Register `RTSR` writer
17pub struct W(crate::W<RTSR_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<RTSR_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<RTSR_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<RTSR_SPEC>) -> Self {
34        W(writer)
35    }
36}
37///Field `RT0` reader - Rising trigger event configuration bit of Configurable Event input
38pub type RT0_R = crate::BitReader<RT0_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 RT0_A {
44    ///0: Rising edge trigger is disabled
45    Disabled = 0,
46    ///1: Rising edge trigger is enabled
47    Enabled = 1,
48}
49impl From<RT0_A> for bool {
50    #[inline(always)]
51    fn from(variant: RT0_A) -> Self {
52        variant as u8 != 0
53    }
54}
55impl RT0_R {
56    ///Get enumerated values variant
57    #[inline(always)]
58    pub fn variant(&self) -> RT0_A {
59        match self.bits {
60            false => RT0_A::Disabled,
61            true => RT0_A::Enabled,
62        }
63    }
64    ///Checks if the value of the field is `Disabled`
65    #[inline(always)]
66    pub fn is_disabled(&self) -> bool {
67        *self == RT0_A::Disabled
68    }
69    ///Checks if the value of the field is `Enabled`
70    #[inline(always)]
71    pub fn is_enabled(&self) -> bool {
72        *self == RT0_A::Enabled
73    }
74}
75///Field `RT0` writer - Rising trigger event configuration bit of Configurable Event input
76pub type RT0_W<'a, const O: u8> = crate::BitWriter<'a, u32, RTSR_SPEC, RT0_A, O>;
77impl<'a, const O: u8> RT0_W<'a, O> {
78    ///Rising edge trigger is disabled
79    #[inline(always)]
80    pub fn disabled(self) -> &'a mut W {
81        self.variant(RT0_A::Disabled)
82    }
83    ///Rising edge trigger is enabled
84    #[inline(always)]
85    pub fn enabled(self) -> &'a mut W {
86        self.variant(RT0_A::Enabled)
87    }
88}
89///Field `RT1` reader - Rising trigger event configuration bit of Configurable Event input
90pub use RT0_R as RT1_R;
91///Field `RT2` reader - Rising trigger event configuration bit of Configurable Event input
92pub use RT0_R as RT2_R;
93///Field `RT3` reader - Rising trigger event configuration bit of Configurable Event input
94pub use RT0_R as RT3_R;
95///Field `RT4` reader - Rising trigger event configuration bit of Configurable Event input
96pub use RT0_R as RT4_R;
97///Field `RT5` reader - Rising trigger event configuration bit of Configurable Event input
98pub use RT0_R as RT5_R;
99///Field `RT6` reader - Rising trigger event configuration bit of Configurable Event input
100pub use RT0_R as RT6_R;
101///Field `RT7` reader - Rising trigger event configuration bit of Configurable Event input
102pub use RT0_R as RT7_R;
103///Field `RT8` reader - Rising trigger event configuration bit of Configurable Event input
104pub use RT0_R as RT8_R;
105///Field `RT9` reader - Rising trigger event configuration bit of Configurable Event input
106pub use RT0_R as RT9_R;
107///Field `RT10` reader - Rising trigger event configuration bit of Configurable Event input
108pub use RT0_R as RT10_R;
109///Field `RT11` reader - Rising trigger event configuration bit of Configurable Event input
110pub use RT0_R as RT11_R;
111///Field `RT12` reader - Rising trigger event configuration bit of Configurable Event input
112pub use RT0_R as RT12_R;
113///Field `RT13` reader - Rising trigger event configuration bit of Configurable Event input
114pub use RT0_R as RT13_R;
115///Field `RT14` reader - Rising trigger event configuration bit of Configurable Event input
116pub use RT0_R as RT14_R;
117///Field `RT15` reader - Rising trigger event configuration bit of Configurable Event input
118pub use RT0_R as RT15_R;
119///Field `RT16` reader - Rising trigger event configuration bit of Configurable Event input
120pub use RT0_R as RT16_R;
121///Field `RT17` reader - Rising trigger event configuration bit of Configurable Event input
122pub use RT0_R as RT17_R;
123///Field `RT18` reader - Rising trigger event configuration bit of Configurable Event input
124pub use RT0_R as RT18_R;
125///Field `RT1` writer - Rising trigger event configuration bit of Configurable Event input
126pub use RT0_W as RT1_W;
127///Field `RT2` writer - Rising trigger event configuration bit of Configurable Event input
128pub use RT0_W as RT2_W;
129///Field `RT3` writer - Rising trigger event configuration bit of Configurable Event input
130pub use RT0_W as RT3_W;
131///Field `RT4` writer - Rising trigger event configuration bit of Configurable Event input
132pub use RT0_W as RT4_W;
133///Field `RT5` writer - Rising trigger event configuration bit of Configurable Event input
134pub use RT0_W as RT5_W;
135///Field `RT6` writer - Rising trigger event configuration bit of Configurable Event input
136pub use RT0_W as RT6_W;
137///Field `RT7` writer - Rising trigger event configuration bit of Configurable Event input
138pub use RT0_W as RT7_W;
139///Field `RT8` writer - Rising trigger event configuration bit of Configurable Event input
140pub use RT0_W as RT8_W;
141///Field `RT9` writer - Rising trigger event configuration bit of Configurable Event input
142pub use RT0_W as RT9_W;
143///Field `RT10` writer - Rising trigger event configuration bit of Configurable Event input
144pub use RT0_W as RT10_W;
145///Field `RT11` writer - Rising trigger event configuration bit of Configurable Event input
146pub use RT0_W as RT11_W;
147///Field `RT12` writer - Rising trigger event configuration bit of Configurable Event input
148pub use RT0_W as RT12_W;
149///Field `RT13` writer - Rising trigger event configuration bit of Configurable Event input
150pub use RT0_W as RT13_W;
151///Field `RT14` writer - Rising trigger event configuration bit of Configurable Event input
152pub use RT0_W as RT14_W;
153///Field `RT15` writer - Rising trigger event configuration bit of Configurable Event input
154pub use RT0_W as RT15_W;
155///Field `RT16` writer - Rising trigger event configuration bit of Configurable Event input
156pub use RT0_W as RT16_W;
157///Field `RT17` writer - Rising trigger event configuration bit of Configurable Event input
158pub use RT0_W as RT17_W;
159///Field `RT18` writer - Rising trigger event configuration bit of Configurable Event input
160pub use RT0_W as RT18_W;
161impl R {
162    ///Bit 0 - Rising trigger event configuration bit of Configurable Event input
163    #[inline(always)]
164    pub fn rt0(&self) -> RT0_R {
165        RT0_R::new((self.bits & 1) != 0)
166    }
167    ///Bit 1 - Rising trigger event configuration bit of Configurable Event input
168    #[inline(always)]
169    pub fn rt1(&self) -> RT1_R {
170        RT1_R::new(((self.bits >> 1) & 1) != 0)
171    }
172    ///Bit 2 - Rising trigger event configuration bit of Configurable Event input
173    #[inline(always)]
174    pub fn rt2(&self) -> RT2_R {
175        RT2_R::new(((self.bits >> 2) & 1) != 0)
176    }
177    ///Bit 3 - Rising trigger event configuration bit of Configurable Event input
178    #[inline(always)]
179    pub fn rt3(&self) -> RT3_R {
180        RT3_R::new(((self.bits >> 3) & 1) != 0)
181    }
182    ///Bit 4 - Rising trigger event configuration bit of Configurable Event input
183    #[inline(always)]
184    pub fn rt4(&self) -> RT4_R {
185        RT4_R::new(((self.bits >> 4) & 1) != 0)
186    }
187    ///Bit 5 - Rising trigger event configuration bit of Configurable Event input
188    #[inline(always)]
189    pub fn rt5(&self) -> RT5_R {
190        RT5_R::new(((self.bits >> 5) & 1) != 0)
191    }
192    ///Bit 6 - Rising trigger event configuration bit of Configurable Event input
193    #[inline(always)]
194    pub fn rt6(&self) -> RT6_R {
195        RT6_R::new(((self.bits >> 6) & 1) != 0)
196    }
197    ///Bit 7 - Rising trigger event configuration bit of Configurable Event input
198    #[inline(always)]
199    pub fn rt7(&self) -> RT7_R {
200        RT7_R::new(((self.bits >> 7) & 1) != 0)
201    }
202    ///Bit 8 - Rising trigger event configuration bit of Configurable Event input
203    #[inline(always)]
204    pub fn rt8(&self) -> RT8_R {
205        RT8_R::new(((self.bits >> 8) & 1) != 0)
206    }
207    ///Bit 9 - Rising trigger event configuration bit of Configurable Event input
208    #[inline(always)]
209    pub fn rt9(&self) -> RT9_R {
210        RT9_R::new(((self.bits >> 9) & 1) != 0)
211    }
212    ///Bit 10 - Rising trigger event configuration bit of Configurable Event input
213    #[inline(always)]
214    pub fn rt10(&self) -> RT10_R {
215        RT10_R::new(((self.bits >> 10) & 1) != 0)
216    }
217    ///Bit 11 - Rising trigger event configuration bit of Configurable Event input
218    #[inline(always)]
219    pub fn rt11(&self) -> RT11_R {
220        RT11_R::new(((self.bits >> 11) & 1) != 0)
221    }
222    ///Bit 12 - Rising trigger event configuration bit of Configurable Event input
223    #[inline(always)]
224    pub fn rt12(&self) -> RT12_R {
225        RT12_R::new(((self.bits >> 12) & 1) != 0)
226    }
227    ///Bit 13 - Rising trigger event configuration bit of Configurable Event input
228    #[inline(always)]
229    pub fn rt13(&self) -> RT13_R {
230        RT13_R::new(((self.bits >> 13) & 1) != 0)
231    }
232    ///Bit 14 - Rising trigger event configuration bit of Configurable Event input
233    #[inline(always)]
234    pub fn rt14(&self) -> RT14_R {
235        RT14_R::new(((self.bits >> 14) & 1) != 0)
236    }
237    ///Bit 15 - Rising trigger event configuration bit of Configurable Event input
238    #[inline(always)]
239    pub fn rt15(&self) -> RT15_R {
240        RT15_R::new(((self.bits >> 15) & 1) != 0)
241    }
242    ///Bit 16 - Rising trigger event configuration bit of Configurable Event input
243    #[inline(always)]
244    pub fn rt16(&self) -> RT16_R {
245        RT16_R::new(((self.bits >> 16) & 1) != 0)
246    }
247    ///Bit 17 - Rising trigger event configuration bit of Configurable Event input
248    #[inline(always)]
249    pub fn rt17(&self) -> RT17_R {
250        RT17_R::new(((self.bits >> 17) & 1) != 0)
251    }
252    ///Bit 18 - Rising trigger event configuration bit of Configurable Event input
253    #[inline(always)]
254    pub fn rt18(&self) -> RT18_R {
255        RT18_R::new(((self.bits >> 18) & 1) != 0)
256    }
257}
258impl W {
259    ///Bit 0 - Rising trigger event configuration bit of Configurable Event input
260    #[inline(always)]
261    #[must_use]
262    pub fn rt0(&mut self) -> RT0_W<0> {
263        RT0_W::new(self)
264    }
265    ///Bit 1 - Rising trigger event configuration bit of Configurable Event input
266    #[inline(always)]
267    #[must_use]
268    pub fn rt1(&mut self) -> RT1_W<1> {
269        RT1_W::new(self)
270    }
271    ///Bit 2 - Rising trigger event configuration bit of Configurable Event input
272    #[inline(always)]
273    #[must_use]
274    pub fn rt2(&mut self) -> RT2_W<2> {
275        RT2_W::new(self)
276    }
277    ///Bit 3 - Rising trigger event configuration bit of Configurable Event input
278    #[inline(always)]
279    #[must_use]
280    pub fn rt3(&mut self) -> RT3_W<3> {
281        RT3_W::new(self)
282    }
283    ///Bit 4 - Rising trigger event configuration bit of Configurable Event input
284    #[inline(always)]
285    #[must_use]
286    pub fn rt4(&mut self) -> RT4_W<4> {
287        RT4_W::new(self)
288    }
289    ///Bit 5 - Rising trigger event configuration bit of Configurable Event input
290    #[inline(always)]
291    #[must_use]
292    pub fn rt5(&mut self) -> RT5_W<5> {
293        RT5_W::new(self)
294    }
295    ///Bit 6 - Rising trigger event configuration bit of Configurable Event input
296    #[inline(always)]
297    #[must_use]
298    pub fn rt6(&mut self) -> RT6_W<6> {
299        RT6_W::new(self)
300    }
301    ///Bit 7 - Rising trigger event configuration bit of Configurable Event input
302    #[inline(always)]
303    #[must_use]
304    pub fn rt7(&mut self) -> RT7_W<7> {
305        RT7_W::new(self)
306    }
307    ///Bit 8 - Rising trigger event configuration bit of Configurable Event input
308    #[inline(always)]
309    #[must_use]
310    pub fn rt8(&mut self) -> RT8_W<8> {
311        RT8_W::new(self)
312    }
313    ///Bit 9 - Rising trigger event configuration bit of Configurable Event input
314    #[inline(always)]
315    #[must_use]
316    pub fn rt9(&mut self) -> RT9_W<9> {
317        RT9_W::new(self)
318    }
319    ///Bit 10 - Rising trigger event configuration bit of Configurable Event input
320    #[inline(always)]
321    #[must_use]
322    pub fn rt10(&mut self) -> RT10_W<10> {
323        RT10_W::new(self)
324    }
325    ///Bit 11 - Rising trigger event configuration bit of Configurable Event input
326    #[inline(always)]
327    #[must_use]
328    pub fn rt11(&mut self) -> RT11_W<11> {
329        RT11_W::new(self)
330    }
331    ///Bit 12 - Rising trigger event configuration bit of Configurable Event input
332    #[inline(always)]
333    #[must_use]
334    pub fn rt12(&mut self) -> RT12_W<12> {
335        RT12_W::new(self)
336    }
337    ///Bit 13 - Rising trigger event configuration bit of Configurable Event input
338    #[inline(always)]
339    #[must_use]
340    pub fn rt13(&mut self) -> RT13_W<13> {
341        RT13_W::new(self)
342    }
343    ///Bit 14 - Rising trigger event configuration bit of Configurable Event input
344    #[inline(always)]
345    #[must_use]
346    pub fn rt14(&mut self) -> RT14_W<14> {
347        RT14_W::new(self)
348    }
349    ///Bit 15 - Rising trigger event configuration bit of Configurable Event input
350    #[inline(always)]
351    #[must_use]
352    pub fn rt15(&mut self) -> RT15_W<15> {
353        RT15_W::new(self)
354    }
355    ///Bit 16 - Rising trigger event configuration bit of Configurable Event input
356    #[inline(always)]
357    #[must_use]
358    pub fn rt16(&mut self) -> RT16_W<16> {
359        RT16_W::new(self)
360    }
361    ///Bit 17 - Rising trigger event configuration bit of Configurable Event input
362    #[inline(always)]
363    #[must_use]
364    pub fn rt17(&mut self) -> RT17_W<17> {
365        RT17_W::new(self)
366    }
367    ///Bit 18 - Rising trigger event configuration bit of Configurable Event input
368    #[inline(always)]
369    #[must_use]
370    pub fn rt18(&mut self) -> RT18_W<18> {
371        RT18_W::new(self)
372    }
373    ///Writes raw bits to the register.
374    #[inline(always)]
375    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
376        self.0.bits(bits);
377        self
378    }
379}
380/**EXTI rising trigger selection register
381
382This 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).
383
384For information about available fields see [rtsr](index.html) module*/
385pub struct RTSR_SPEC;
386impl crate::RegisterSpec for RTSR_SPEC {
387    type Ux = u32;
388}
389///`read()` method returns [rtsr::R](R) reader structure
390impl crate::Readable for RTSR_SPEC {
391    type Reader = R;
392}
393///`write(|w| ..)` method takes [rtsr::W](W) writer structure
394impl crate::Writable for RTSR_SPEC {
395    type Writer = W;
396    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
397    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
398}
399///`reset()` method sets RTSR to value 0
400impl crate::Resettable for RTSR_SPEC {
401    const RESET_VALUE: Self::Ux = 0;
402}