ra6e1/port1/
porr.rs

1#[doc = "Register `PORR` writer"]
2pub struct W(crate::W<PORR_SPEC>);
3impl core::ops::Deref for W {
4    type Target = crate::W<PORR_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<PORR_SPEC>> for W {
17    #[inline(always)]
18    fn from(writer: crate::W<PORR_SPEC>) -> Self {
19        W(writer)
20    }
21}
22#[doc = "Pmn Output Reset\n\nValue on reset: 0"]
23#[derive(Clone, Copy, Debug, PartialEq, Eq)]
24pub enum PORR00_AW {
25    #[doc = "0: No effect on output"]
26    _0 = 0,
27    #[doc = "1: Low output"]
28    _1 = 1,
29}
30impl From<PORR00_AW> for bool {
31    #[inline(always)]
32    fn from(variant: PORR00_AW) -> Self {
33        variant as u8 != 0
34    }
35}
36#[doc = "Field `PORR00` writer - Pmn Output Reset"]
37pub type PORR00_W<'a, const O: u8> = crate::BitWriter<'a, u16, PORR_SPEC, PORR00_AW, O>;
38impl<'a, const O: u8> PORR00_W<'a, O> {
39    #[doc = "No effect on output"]
40    #[inline(always)]
41    pub fn _0(self) -> &'a mut W {
42        self.variant(PORR00_AW::_0)
43    }
44    #[doc = "Low output"]
45    #[inline(always)]
46    pub fn _1(self) -> &'a mut W {
47        self.variant(PORR00_AW::_1)
48    }
49}
50#[doc = "Pmn Output Reset\n\nValue on reset: 0"]
51#[derive(Clone, Copy, Debug, PartialEq, Eq)]
52pub enum PORR01_AW {
53    #[doc = "0: No effect on output"]
54    _0 = 0,
55    #[doc = "1: Low output"]
56    _1 = 1,
57}
58impl From<PORR01_AW> for bool {
59    #[inline(always)]
60    fn from(variant: PORR01_AW) -> Self {
61        variant as u8 != 0
62    }
63}
64#[doc = "Field `PORR01` writer - Pmn Output Reset"]
65pub type PORR01_W<'a, const O: u8> = crate::BitWriter<'a, u16, PORR_SPEC, PORR01_AW, O>;
66impl<'a, const O: u8> PORR01_W<'a, O> {
67    #[doc = "No effect on output"]
68    #[inline(always)]
69    pub fn _0(self) -> &'a mut W {
70        self.variant(PORR01_AW::_0)
71    }
72    #[doc = "Low output"]
73    #[inline(always)]
74    pub fn _1(self) -> &'a mut W {
75        self.variant(PORR01_AW::_1)
76    }
77}
78#[doc = "Pmn Output Reset\n\nValue on reset: 0"]
79#[derive(Clone, Copy, Debug, PartialEq, Eq)]
80pub enum PORR02_AW {
81    #[doc = "0: No effect on output"]
82    _0 = 0,
83    #[doc = "1: Low output"]
84    _1 = 1,
85}
86impl From<PORR02_AW> for bool {
87    #[inline(always)]
88    fn from(variant: PORR02_AW) -> Self {
89        variant as u8 != 0
90    }
91}
92#[doc = "Field `PORR02` writer - Pmn Output Reset"]
93pub type PORR02_W<'a, const O: u8> = crate::BitWriter<'a, u16, PORR_SPEC, PORR02_AW, O>;
94impl<'a, const O: u8> PORR02_W<'a, O> {
95    #[doc = "No effect on output"]
96    #[inline(always)]
97    pub fn _0(self) -> &'a mut W {
98        self.variant(PORR02_AW::_0)
99    }
100    #[doc = "Low output"]
101    #[inline(always)]
102    pub fn _1(self) -> &'a mut W {
103        self.variant(PORR02_AW::_1)
104    }
105}
106#[doc = "Pmn Output Reset\n\nValue on reset: 0"]
107#[derive(Clone, Copy, Debug, PartialEq, Eq)]
108pub enum PORR03_AW {
109    #[doc = "0: No effect on output"]
110    _0 = 0,
111    #[doc = "1: Low output"]
112    _1 = 1,
113}
114impl From<PORR03_AW> for bool {
115    #[inline(always)]
116    fn from(variant: PORR03_AW) -> Self {
117        variant as u8 != 0
118    }
119}
120#[doc = "Field `PORR03` writer - Pmn Output Reset"]
121pub type PORR03_W<'a, const O: u8> = crate::BitWriter<'a, u16, PORR_SPEC, PORR03_AW, O>;
122impl<'a, const O: u8> PORR03_W<'a, O> {
123    #[doc = "No effect on output"]
124    #[inline(always)]
125    pub fn _0(self) -> &'a mut W {
126        self.variant(PORR03_AW::_0)
127    }
128    #[doc = "Low output"]
129    #[inline(always)]
130    pub fn _1(self) -> &'a mut W {
131        self.variant(PORR03_AW::_1)
132    }
133}
134#[doc = "Pmn Output Reset\n\nValue on reset: 0"]
135#[derive(Clone, Copy, Debug, PartialEq, Eq)]
136pub enum PORR04_AW {
137    #[doc = "0: No effect on output"]
138    _0 = 0,
139    #[doc = "1: Low output"]
140    _1 = 1,
141}
142impl From<PORR04_AW> for bool {
143    #[inline(always)]
144    fn from(variant: PORR04_AW) -> Self {
145        variant as u8 != 0
146    }
147}
148#[doc = "Field `PORR04` writer - Pmn Output Reset"]
149pub type PORR04_W<'a, const O: u8> = crate::BitWriter<'a, u16, PORR_SPEC, PORR04_AW, O>;
150impl<'a, const O: u8> PORR04_W<'a, O> {
151    #[doc = "No effect on output"]
152    #[inline(always)]
153    pub fn _0(self) -> &'a mut W {
154        self.variant(PORR04_AW::_0)
155    }
156    #[doc = "Low output"]
157    #[inline(always)]
158    pub fn _1(self) -> &'a mut W {
159        self.variant(PORR04_AW::_1)
160    }
161}
162#[doc = "Pmn Output Reset\n\nValue on reset: 0"]
163#[derive(Clone, Copy, Debug, PartialEq, Eq)]
164pub enum PORR05_AW {
165    #[doc = "0: No effect on output"]
166    _0 = 0,
167    #[doc = "1: Low output"]
168    _1 = 1,
169}
170impl From<PORR05_AW> for bool {
171    #[inline(always)]
172    fn from(variant: PORR05_AW) -> Self {
173        variant as u8 != 0
174    }
175}
176#[doc = "Field `PORR05` writer - Pmn Output Reset"]
177pub type PORR05_W<'a, const O: u8> = crate::BitWriter<'a, u16, PORR_SPEC, PORR05_AW, O>;
178impl<'a, const O: u8> PORR05_W<'a, O> {
179    #[doc = "No effect on output"]
180    #[inline(always)]
181    pub fn _0(self) -> &'a mut W {
182        self.variant(PORR05_AW::_0)
183    }
184    #[doc = "Low output"]
185    #[inline(always)]
186    pub fn _1(self) -> &'a mut W {
187        self.variant(PORR05_AW::_1)
188    }
189}
190#[doc = "Pmn Output Reset\n\nValue on reset: 0"]
191#[derive(Clone, Copy, Debug, PartialEq, Eq)]
192pub enum PORR06_AW {
193    #[doc = "0: No effect on output"]
194    _0 = 0,
195    #[doc = "1: Low output"]
196    _1 = 1,
197}
198impl From<PORR06_AW> for bool {
199    #[inline(always)]
200    fn from(variant: PORR06_AW) -> Self {
201        variant as u8 != 0
202    }
203}
204#[doc = "Field `PORR06` writer - Pmn Output Reset"]
205pub type PORR06_W<'a, const O: u8> = crate::BitWriter<'a, u16, PORR_SPEC, PORR06_AW, O>;
206impl<'a, const O: u8> PORR06_W<'a, O> {
207    #[doc = "No effect on output"]
208    #[inline(always)]
209    pub fn _0(self) -> &'a mut W {
210        self.variant(PORR06_AW::_0)
211    }
212    #[doc = "Low output"]
213    #[inline(always)]
214    pub fn _1(self) -> &'a mut W {
215        self.variant(PORR06_AW::_1)
216    }
217}
218#[doc = "Pmn Output Reset\n\nValue on reset: 0"]
219#[derive(Clone, Copy, Debug, PartialEq, Eq)]
220pub enum PORR07_AW {
221    #[doc = "0: No effect on output"]
222    _0 = 0,
223    #[doc = "1: Low output"]
224    _1 = 1,
225}
226impl From<PORR07_AW> for bool {
227    #[inline(always)]
228    fn from(variant: PORR07_AW) -> Self {
229        variant as u8 != 0
230    }
231}
232#[doc = "Field `PORR07` writer - Pmn Output Reset"]
233pub type PORR07_W<'a, const O: u8> = crate::BitWriter<'a, u16, PORR_SPEC, PORR07_AW, O>;
234impl<'a, const O: u8> PORR07_W<'a, O> {
235    #[doc = "No effect on output"]
236    #[inline(always)]
237    pub fn _0(self) -> &'a mut W {
238        self.variant(PORR07_AW::_0)
239    }
240    #[doc = "Low output"]
241    #[inline(always)]
242    pub fn _1(self) -> &'a mut W {
243        self.variant(PORR07_AW::_1)
244    }
245}
246#[doc = "Pmn Output Reset\n\nValue on reset: 0"]
247#[derive(Clone, Copy, Debug, PartialEq, Eq)]
248pub enum PORR08_AW {
249    #[doc = "0: No effect on output"]
250    _0 = 0,
251    #[doc = "1: Low output"]
252    _1 = 1,
253}
254impl From<PORR08_AW> for bool {
255    #[inline(always)]
256    fn from(variant: PORR08_AW) -> Self {
257        variant as u8 != 0
258    }
259}
260#[doc = "Field `PORR08` writer - Pmn Output Reset"]
261pub type PORR08_W<'a, const O: u8> = crate::BitWriter<'a, u16, PORR_SPEC, PORR08_AW, O>;
262impl<'a, const O: u8> PORR08_W<'a, O> {
263    #[doc = "No effect on output"]
264    #[inline(always)]
265    pub fn _0(self) -> &'a mut W {
266        self.variant(PORR08_AW::_0)
267    }
268    #[doc = "Low output"]
269    #[inline(always)]
270    pub fn _1(self) -> &'a mut W {
271        self.variant(PORR08_AW::_1)
272    }
273}
274#[doc = "Pmn Output Reset\n\nValue on reset: 0"]
275#[derive(Clone, Copy, Debug, PartialEq, Eq)]
276pub enum PORR09_AW {
277    #[doc = "0: No effect on output"]
278    _0 = 0,
279    #[doc = "1: Low output"]
280    _1 = 1,
281}
282impl From<PORR09_AW> for bool {
283    #[inline(always)]
284    fn from(variant: PORR09_AW) -> Self {
285        variant as u8 != 0
286    }
287}
288#[doc = "Field `PORR09` writer - Pmn Output Reset"]
289pub type PORR09_W<'a, const O: u8> = crate::BitWriter<'a, u16, PORR_SPEC, PORR09_AW, O>;
290impl<'a, const O: u8> PORR09_W<'a, O> {
291    #[doc = "No effect on output"]
292    #[inline(always)]
293    pub fn _0(self) -> &'a mut W {
294        self.variant(PORR09_AW::_0)
295    }
296    #[doc = "Low output"]
297    #[inline(always)]
298    pub fn _1(self) -> &'a mut W {
299        self.variant(PORR09_AW::_1)
300    }
301}
302#[doc = "Pmn Output Reset\n\nValue on reset: 0"]
303#[derive(Clone, Copy, Debug, PartialEq, Eq)]
304pub enum PORR10_AW {
305    #[doc = "0: No effect on output"]
306    _0 = 0,
307    #[doc = "1: Low output"]
308    _1 = 1,
309}
310impl From<PORR10_AW> for bool {
311    #[inline(always)]
312    fn from(variant: PORR10_AW) -> Self {
313        variant as u8 != 0
314    }
315}
316#[doc = "Field `PORR10` writer - Pmn Output Reset"]
317pub type PORR10_W<'a, const O: u8> = crate::BitWriter<'a, u16, PORR_SPEC, PORR10_AW, O>;
318impl<'a, const O: u8> PORR10_W<'a, O> {
319    #[doc = "No effect on output"]
320    #[inline(always)]
321    pub fn _0(self) -> &'a mut W {
322        self.variant(PORR10_AW::_0)
323    }
324    #[doc = "Low output"]
325    #[inline(always)]
326    pub fn _1(self) -> &'a mut W {
327        self.variant(PORR10_AW::_1)
328    }
329}
330#[doc = "Pmn Output Reset\n\nValue on reset: 0"]
331#[derive(Clone, Copy, Debug, PartialEq, Eq)]
332pub enum PORR11_AW {
333    #[doc = "0: No effect on output"]
334    _0 = 0,
335    #[doc = "1: Low output"]
336    _1 = 1,
337}
338impl From<PORR11_AW> for bool {
339    #[inline(always)]
340    fn from(variant: PORR11_AW) -> Self {
341        variant as u8 != 0
342    }
343}
344#[doc = "Field `PORR11` writer - Pmn Output Reset"]
345pub type PORR11_W<'a, const O: u8> = crate::BitWriter<'a, u16, PORR_SPEC, PORR11_AW, O>;
346impl<'a, const O: u8> PORR11_W<'a, O> {
347    #[doc = "No effect on output"]
348    #[inline(always)]
349    pub fn _0(self) -> &'a mut W {
350        self.variant(PORR11_AW::_0)
351    }
352    #[doc = "Low output"]
353    #[inline(always)]
354    pub fn _1(self) -> &'a mut W {
355        self.variant(PORR11_AW::_1)
356    }
357}
358#[doc = "Pmn Output Reset\n\nValue on reset: 0"]
359#[derive(Clone, Copy, Debug, PartialEq, Eq)]
360pub enum PORR12_AW {
361    #[doc = "0: No effect on output"]
362    _0 = 0,
363    #[doc = "1: Low output"]
364    _1 = 1,
365}
366impl From<PORR12_AW> for bool {
367    #[inline(always)]
368    fn from(variant: PORR12_AW) -> Self {
369        variant as u8 != 0
370    }
371}
372#[doc = "Field `PORR12` writer - Pmn Output Reset"]
373pub type PORR12_W<'a, const O: u8> = crate::BitWriter<'a, u16, PORR_SPEC, PORR12_AW, O>;
374impl<'a, const O: u8> PORR12_W<'a, O> {
375    #[doc = "No effect on output"]
376    #[inline(always)]
377    pub fn _0(self) -> &'a mut W {
378        self.variant(PORR12_AW::_0)
379    }
380    #[doc = "Low output"]
381    #[inline(always)]
382    pub fn _1(self) -> &'a mut W {
383        self.variant(PORR12_AW::_1)
384    }
385}
386#[doc = "Pmn Output Reset\n\nValue on reset: 0"]
387#[derive(Clone, Copy, Debug, PartialEq, Eq)]
388pub enum PORR13_AW {
389    #[doc = "0: No effect on output"]
390    _0 = 0,
391    #[doc = "1: Low output"]
392    _1 = 1,
393}
394impl From<PORR13_AW> for bool {
395    #[inline(always)]
396    fn from(variant: PORR13_AW) -> Self {
397        variant as u8 != 0
398    }
399}
400#[doc = "Field `PORR13` writer - Pmn Output Reset"]
401pub type PORR13_W<'a, const O: u8> = crate::BitWriter<'a, u16, PORR_SPEC, PORR13_AW, O>;
402impl<'a, const O: u8> PORR13_W<'a, O> {
403    #[doc = "No effect on output"]
404    #[inline(always)]
405    pub fn _0(self) -> &'a mut W {
406        self.variant(PORR13_AW::_0)
407    }
408    #[doc = "Low output"]
409    #[inline(always)]
410    pub fn _1(self) -> &'a mut W {
411        self.variant(PORR13_AW::_1)
412    }
413}
414#[doc = "Pmn Output Reset\n\nValue on reset: 0"]
415#[derive(Clone, Copy, Debug, PartialEq, Eq)]
416pub enum PORR14_AW {
417    #[doc = "0: No effect on output"]
418    _0 = 0,
419    #[doc = "1: Low output"]
420    _1 = 1,
421}
422impl From<PORR14_AW> for bool {
423    #[inline(always)]
424    fn from(variant: PORR14_AW) -> Self {
425        variant as u8 != 0
426    }
427}
428#[doc = "Field `PORR14` writer - Pmn Output Reset"]
429pub type PORR14_W<'a, const O: u8> = crate::BitWriter<'a, u16, PORR_SPEC, PORR14_AW, O>;
430impl<'a, const O: u8> PORR14_W<'a, O> {
431    #[doc = "No effect on output"]
432    #[inline(always)]
433    pub fn _0(self) -> &'a mut W {
434        self.variant(PORR14_AW::_0)
435    }
436    #[doc = "Low output"]
437    #[inline(always)]
438    pub fn _1(self) -> &'a mut W {
439        self.variant(PORR14_AW::_1)
440    }
441}
442#[doc = "Pmn Output Reset\n\nValue on reset: 0"]
443#[derive(Clone, Copy, Debug, PartialEq, Eq)]
444pub enum PORR15_AW {
445    #[doc = "0: No effect on output"]
446    _0 = 0,
447    #[doc = "1: Low output"]
448    _1 = 1,
449}
450impl From<PORR15_AW> for bool {
451    #[inline(always)]
452    fn from(variant: PORR15_AW) -> Self {
453        variant as u8 != 0
454    }
455}
456#[doc = "Field `PORR15` writer - Pmn Output Reset"]
457pub type PORR15_W<'a, const O: u8> = crate::BitWriter<'a, u16, PORR_SPEC, PORR15_AW, O>;
458impl<'a, const O: u8> PORR15_W<'a, O> {
459    #[doc = "No effect on output"]
460    #[inline(always)]
461    pub fn _0(self) -> &'a mut W {
462        self.variant(PORR15_AW::_0)
463    }
464    #[doc = "Low output"]
465    #[inline(always)]
466    pub fn _1(self) -> &'a mut W {
467        self.variant(PORR15_AW::_1)
468    }
469}
470impl W {
471    #[doc = "Bit 0 - Pmn Output Reset"]
472    #[inline(always)]
473    #[must_use]
474    pub fn porr00(&mut self) -> PORR00_W<0> {
475        PORR00_W::new(self)
476    }
477    #[doc = "Bit 1 - Pmn Output Reset"]
478    #[inline(always)]
479    #[must_use]
480    pub fn porr01(&mut self) -> PORR01_W<1> {
481        PORR01_W::new(self)
482    }
483    #[doc = "Bit 2 - Pmn Output Reset"]
484    #[inline(always)]
485    #[must_use]
486    pub fn porr02(&mut self) -> PORR02_W<2> {
487        PORR02_W::new(self)
488    }
489    #[doc = "Bit 3 - Pmn Output Reset"]
490    #[inline(always)]
491    #[must_use]
492    pub fn porr03(&mut self) -> PORR03_W<3> {
493        PORR03_W::new(self)
494    }
495    #[doc = "Bit 4 - Pmn Output Reset"]
496    #[inline(always)]
497    #[must_use]
498    pub fn porr04(&mut self) -> PORR04_W<4> {
499        PORR04_W::new(self)
500    }
501    #[doc = "Bit 5 - Pmn Output Reset"]
502    #[inline(always)]
503    #[must_use]
504    pub fn porr05(&mut self) -> PORR05_W<5> {
505        PORR05_W::new(self)
506    }
507    #[doc = "Bit 6 - Pmn Output Reset"]
508    #[inline(always)]
509    #[must_use]
510    pub fn porr06(&mut self) -> PORR06_W<6> {
511        PORR06_W::new(self)
512    }
513    #[doc = "Bit 7 - Pmn Output Reset"]
514    #[inline(always)]
515    #[must_use]
516    pub fn porr07(&mut self) -> PORR07_W<7> {
517        PORR07_W::new(self)
518    }
519    #[doc = "Bit 8 - Pmn Output Reset"]
520    #[inline(always)]
521    #[must_use]
522    pub fn porr08(&mut self) -> PORR08_W<8> {
523        PORR08_W::new(self)
524    }
525    #[doc = "Bit 9 - Pmn Output Reset"]
526    #[inline(always)]
527    #[must_use]
528    pub fn porr09(&mut self) -> PORR09_W<9> {
529        PORR09_W::new(self)
530    }
531    #[doc = "Bit 10 - Pmn Output Reset"]
532    #[inline(always)]
533    #[must_use]
534    pub fn porr10(&mut self) -> PORR10_W<10> {
535        PORR10_W::new(self)
536    }
537    #[doc = "Bit 11 - Pmn Output Reset"]
538    #[inline(always)]
539    #[must_use]
540    pub fn porr11(&mut self) -> PORR11_W<11> {
541        PORR11_W::new(self)
542    }
543    #[doc = "Bit 12 - Pmn Output Reset"]
544    #[inline(always)]
545    #[must_use]
546    pub fn porr12(&mut self) -> PORR12_W<12> {
547        PORR12_W::new(self)
548    }
549    #[doc = "Bit 13 - Pmn Output Reset"]
550    #[inline(always)]
551    #[must_use]
552    pub fn porr13(&mut self) -> PORR13_W<13> {
553        PORR13_W::new(self)
554    }
555    #[doc = "Bit 14 - Pmn Output Reset"]
556    #[inline(always)]
557    #[must_use]
558    pub fn porr14(&mut self) -> PORR14_W<14> {
559        PORR14_W::new(self)
560    }
561    #[doc = "Bit 15 - Pmn Output Reset"]
562    #[inline(always)]
563    #[must_use]
564    pub fn porr15(&mut self) -> PORR15_W<15> {
565        PORR15_W::new(self)
566    }
567    #[doc = "Writes raw bits to the register."]
568    #[inline(always)]
569    pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
570        self.0.bits(bits);
571        self
572    }
573}
574#[doc = "Port Control Register 3\n\nThis register you can [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [porr](index.html) module"]
575pub struct PORR_SPEC;
576impl crate::RegisterSpec for PORR_SPEC {
577    type Ux = u16;
578}
579#[doc = "`write(|w| ..)` method takes [porr::W](W) writer structure"]
580impl crate::Writable for PORR_SPEC {
581    type Writer = W;
582    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
583    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
584}
585#[doc = "`reset()` method sets PORR to value 0"]
586impl crate::Resettable for PORR_SPEC {
587    const RESET_VALUE: Self::Ux = 0;
588}