atsamd11d/eic/
evctrl.rs
1#[doc = "Register `EVCTRL` reader"]
2pub type R = crate::R<EvctrlSpec>;
3#[doc = "Register `EVCTRL` writer"]
4pub type W = crate::W<EvctrlSpec>;
5#[doc = "Field `EXTINTEO0` reader - External Interrupt 0 Event Output Enable"]
6pub type Extinteo0R = crate::BitReader;
7#[doc = "Field `EXTINTEO0` writer - External Interrupt 0 Event Output Enable"]
8pub type Extinteo0W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `EXTINTEO1` reader - External Interrupt 1 Event Output Enable"]
10pub type Extinteo1R = crate::BitReader;
11#[doc = "Field `EXTINTEO1` writer - External Interrupt 1 Event Output Enable"]
12pub type Extinteo1W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `EXTINTEO2` reader - External Interrupt 2 Event Output Enable"]
14pub type Extinteo2R = crate::BitReader;
15#[doc = "Field `EXTINTEO2` writer - External Interrupt 2 Event Output Enable"]
16pub type Extinteo2W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `EXTINTEO3` reader - External Interrupt 3 Event Output Enable"]
18pub type Extinteo3R = crate::BitReader;
19#[doc = "Field `EXTINTEO3` writer - External Interrupt 3 Event Output Enable"]
20pub type Extinteo3W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `EXTINTEO4` reader - External Interrupt 4 Event Output Enable"]
22pub type Extinteo4R = crate::BitReader;
23#[doc = "Field `EXTINTEO4` writer - External Interrupt 4 Event Output Enable"]
24pub type Extinteo4W<'a, REG> = crate::BitWriter<'a, REG>;
25#[doc = "Field `EXTINTEO5` reader - External Interrupt 5 Event Output Enable"]
26pub type Extinteo5R = crate::BitReader;
27#[doc = "Field `EXTINTEO5` writer - External Interrupt 5 Event Output Enable"]
28pub type Extinteo5W<'a, REG> = crate::BitWriter<'a, REG>;
29#[doc = "Field `EXTINTEO6` reader - External Interrupt 6 Event Output Enable"]
30pub type Extinteo6R = crate::BitReader;
31#[doc = "Field `EXTINTEO6` writer - External Interrupt 6 Event Output Enable"]
32pub type Extinteo6W<'a, REG> = crate::BitWriter<'a, REG>;
33#[doc = "Field `EXTINTEO7` reader - External Interrupt 7 Event Output Enable"]
34pub type Extinteo7R = crate::BitReader;
35#[doc = "Field `EXTINTEO7` writer - External Interrupt 7 Event Output Enable"]
36pub type Extinteo7W<'a, REG> = crate::BitWriter<'a, REG>;
37impl R {
38 #[doc = "Bit 0 - External Interrupt 0 Event Output Enable"]
39 #[inline(always)]
40 pub fn extinteo0(&self) -> Extinteo0R {
41 Extinteo0R::new((self.bits & 1) != 0)
42 }
43 #[doc = "Bit 1 - External Interrupt 1 Event Output Enable"]
44 #[inline(always)]
45 pub fn extinteo1(&self) -> Extinteo1R {
46 Extinteo1R::new(((self.bits >> 1) & 1) != 0)
47 }
48 #[doc = "Bit 2 - External Interrupt 2 Event Output Enable"]
49 #[inline(always)]
50 pub fn extinteo2(&self) -> Extinteo2R {
51 Extinteo2R::new(((self.bits >> 2) & 1) != 0)
52 }
53 #[doc = "Bit 3 - External Interrupt 3 Event Output Enable"]
54 #[inline(always)]
55 pub fn extinteo3(&self) -> Extinteo3R {
56 Extinteo3R::new(((self.bits >> 3) & 1) != 0)
57 }
58 #[doc = "Bit 4 - External Interrupt 4 Event Output Enable"]
59 #[inline(always)]
60 pub fn extinteo4(&self) -> Extinteo4R {
61 Extinteo4R::new(((self.bits >> 4) & 1) != 0)
62 }
63 #[doc = "Bit 5 - External Interrupt 5 Event Output Enable"]
64 #[inline(always)]
65 pub fn extinteo5(&self) -> Extinteo5R {
66 Extinteo5R::new(((self.bits >> 5) & 1) != 0)
67 }
68 #[doc = "Bit 6 - External Interrupt 6 Event Output Enable"]
69 #[inline(always)]
70 pub fn extinteo6(&self) -> Extinteo6R {
71 Extinteo6R::new(((self.bits >> 6) & 1) != 0)
72 }
73 #[doc = "Bit 7 - External Interrupt 7 Event Output Enable"]
74 #[inline(always)]
75 pub fn extinteo7(&self) -> Extinteo7R {
76 Extinteo7R::new(((self.bits >> 7) & 1) != 0)
77 }
78}
79impl W {
80 #[doc = "Bit 0 - External Interrupt 0 Event Output Enable"]
81 #[inline(always)]
82 #[must_use]
83 pub fn extinteo0(&mut self) -> Extinteo0W<EvctrlSpec> {
84 Extinteo0W::new(self, 0)
85 }
86 #[doc = "Bit 1 - External Interrupt 1 Event Output Enable"]
87 #[inline(always)]
88 #[must_use]
89 pub fn extinteo1(&mut self) -> Extinteo1W<EvctrlSpec> {
90 Extinteo1W::new(self, 1)
91 }
92 #[doc = "Bit 2 - External Interrupt 2 Event Output Enable"]
93 #[inline(always)]
94 #[must_use]
95 pub fn extinteo2(&mut self) -> Extinteo2W<EvctrlSpec> {
96 Extinteo2W::new(self, 2)
97 }
98 #[doc = "Bit 3 - External Interrupt 3 Event Output Enable"]
99 #[inline(always)]
100 #[must_use]
101 pub fn extinteo3(&mut self) -> Extinteo3W<EvctrlSpec> {
102 Extinteo3W::new(self, 3)
103 }
104 #[doc = "Bit 4 - External Interrupt 4 Event Output Enable"]
105 #[inline(always)]
106 #[must_use]
107 pub fn extinteo4(&mut self) -> Extinteo4W<EvctrlSpec> {
108 Extinteo4W::new(self, 4)
109 }
110 #[doc = "Bit 5 - External Interrupt 5 Event Output Enable"]
111 #[inline(always)]
112 #[must_use]
113 pub fn extinteo5(&mut self) -> Extinteo5W<EvctrlSpec> {
114 Extinteo5W::new(self, 5)
115 }
116 #[doc = "Bit 6 - External Interrupt 6 Event Output Enable"]
117 #[inline(always)]
118 #[must_use]
119 pub fn extinteo6(&mut self) -> Extinteo6W<EvctrlSpec> {
120 Extinteo6W::new(self, 6)
121 }
122 #[doc = "Bit 7 - External Interrupt 7 Event Output Enable"]
123 #[inline(always)]
124 #[must_use]
125 pub fn extinteo7(&mut self) -> Extinteo7W<EvctrlSpec> {
126 Extinteo7W::new(self, 7)
127 }
128}
129#[doc = "Event Control\n\nYou can [`read`](crate::Reg::read) this register and get [`evctrl::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`evctrl::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
130pub struct EvctrlSpec;
131impl crate::RegisterSpec for EvctrlSpec {
132 type Ux = u32;
133}
134#[doc = "`read()` method returns [`evctrl::R`](R) reader structure"]
135impl crate::Readable for EvctrlSpec {}
136#[doc = "`write(|w| ..)` method takes [`evctrl::W`](W) writer structure"]
137impl crate::Writable for EvctrlSpec {
138 type Safety = crate::Unsafe;
139 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
140 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
141}
142#[doc = "`reset()` method sets EVCTRL to value 0"]
143impl crate::Resettable for EvctrlSpec {
144 const RESET_VALUE: u32 = 0;
145}