atsamd11d/eic/
wakeup.rs
1#[doc = "Register `WAKEUP` reader"]
2pub type R = crate::R<WakeupSpec>;
3#[doc = "Register `WAKEUP` writer"]
4pub type W = crate::W<WakeupSpec>;
5#[doc = "Field `WAKEUPEN0` reader - External Interrupt 0 Wake-up Enable"]
6pub type Wakeupen0R = crate::BitReader;
7#[doc = "Field `WAKEUPEN0` writer - External Interrupt 0 Wake-up Enable"]
8pub type Wakeupen0W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `WAKEUPEN1` reader - External Interrupt 1 Wake-up Enable"]
10pub type Wakeupen1R = crate::BitReader;
11#[doc = "Field `WAKEUPEN1` writer - External Interrupt 1 Wake-up Enable"]
12pub type Wakeupen1W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `WAKEUPEN2` reader - External Interrupt 2 Wake-up Enable"]
14pub type Wakeupen2R = crate::BitReader;
15#[doc = "Field `WAKEUPEN2` writer - External Interrupt 2 Wake-up Enable"]
16pub type Wakeupen2W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `WAKEUPEN3` reader - External Interrupt 3 Wake-up Enable"]
18pub type Wakeupen3R = crate::BitReader;
19#[doc = "Field `WAKEUPEN3` writer - External Interrupt 3 Wake-up Enable"]
20pub type Wakeupen3W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `WAKEUPEN4` reader - External Interrupt 4 Wake-up Enable"]
22pub type Wakeupen4R = crate::BitReader;
23#[doc = "Field `WAKEUPEN4` writer - External Interrupt 4 Wake-up Enable"]
24pub type Wakeupen4W<'a, REG> = crate::BitWriter<'a, REG>;
25#[doc = "Field `WAKEUPEN5` reader - External Interrupt 5 Wake-up Enable"]
26pub type Wakeupen5R = crate::BitReader;
27#[doc = "Field `WAKEUPEN5` writer - External Interrupt 5 Wake-up Enable"]
28pub type Wakeupen5W<'a, REG> = crate::BitWriter<'a, REG>;
29#[doc = "Field `WAKEUPEN6` reader - External Interrupt 6 Wake-up Enable"]
30pub type Wakeupen6R = crate::BitReader;
31#[doc = "Field `WAKEUPEN6` writer - External Interrupt 6 Wake-up Enable"]
32pub type Wakeupen6W<'a, REG> = crate::BitWriter<'a, REG>;
33#[doc = "Field `WAKEUPEN7` reader - External Interrupt 7 Wake-up Enable"]
34pub type Wakeupen7R = crate::BitReader;
35#[doc = "Field `WAKEUPEN7` writer - External Interrupt 7 Wake-up Enable"]
36pub type Wakeupen7W<'a, REG> = crate::BitWriter<'a, REG>;
37impl R {
38 #[doc = "Bit 0 - External Interrupt 0 Wake-up Enable"]
39 #[inline(always)]
40 pub fn wakeupen0(&self) -> Wakeupen0R {
41 Wakeupen0R::new((self.bits & 1) != 0)
42 }
43 #[doc = "Bit 1 - External Interrupt 1 Wake-up Enable"]
44 #[inline(always)]
45 pub fn wakeupen1(&self) -> Wakeupen1R {
46 Wakeupen1R::new(((self.bits >> 1) & 1) != 0)
47 }
48 #[doc = "Bit 2 - External Interrupt 2 Wake-up Enable"]
49 #[inline(always)]
50 pub fn wakeupen2(&self) -> Wakeupen2R {
51 Wakeupen2R::new(((self.bits >> 2) & 1) != 0)
52 }
53 #[doc = "Bit 3 - External Interrupt 3 Wake-up Enable"]
54 #[inline(always)]
55 pub fn wakeupen3(&self) -> Wakeupen3R {
56 Wakeupen3R::new(((self.bits >> 3) & 1) != 0)
57 }
58 #[doc = "Bit 4 - External Interrupt 4 Wake-up Enable"]
59 #[inline(always)]
60 pub fn wakeupen4(&self) -> Wakeupen4R {
61 Wakeupen4R::new(((self.bits >> 4) & 1) != 0)
62 }
63 #[doc = "Bit 5 - External Interrupt 5 Wake-up Enable"]
64 #[inline(always)]
65 pub fn wakeupen5(&self) -> Wakeupen5R {
66 Wakeupen5R::new(((self.bits >> 5) & 1) != 0)
67 }
68 #[doc = "Bit 6 - External Interrupt 6 Wake-up Enable"]
69 #[inline(always)]
70 pub fn wakeupen6(&self) -> Wakeupen6R {
71 Wakeupen6R::new(((self.bits >> 6) & 1) != 0)
72 }
73 #[doc = "Bit 7 - External Interrupt 7 Wake-up Enable"]
74 #[inline(always)]
75 pub fn wakeupen7(&self) -> Wakeupen7R {
76 Wakeupen7R::new(((self.bits >> 7) & 1) != 0)
77 }
78}
79impl W {
80 #[doc = "Bit 0 - External Interrupt 0 Wake-up Enable"]
81 #[inline(always)]
82 #[must_use]
83 pub fn wakeupen0(&mut self) -> Wakeupen0W<WakeupSpec> {
84 Wakeupen0W::new(self, 0)
85 }
86 #[doc = "Bit 1 - External Interrupt 1 Wake-up Enable"]
87 #[inline(always)]
88 #[must_use]
89 pub fn wakeupen1(&mut self) -> Wakeupen1W<WakeupSpec> {
90 Wakeupen1W::new(self, 1)
91 }
92 #[doc = "Bit 2 - External Interrupt 2 Wake-up Enable"]
93 #[inline(always)]
94 #[must_use]
95 pub fn wakeupen2(&mut self) -> Wakeupen2W<WakeupSpec> {
96 Wakeupen2W::new(self, 2)
97 }
98 #[doc = "Bit 3 - External Interrupt 3 Wake-up Enable"]
99 #[inline(always)]
100 #[must_use]
101 pub fn wakeupen3(&mut self) -> Wakeupen3W<WakeupSpec> {
102 Wakeupen3W::new(self, 3)
103 }
104 #[doc = "Bit 4 - External Interrupt 4 Wake-up Enable"]
105 #[inline(always)]
106 #[must_use]
107 pub fn wakeupen4(&mut self) -> Wakeupen4W<WakeupSpec> {
108 Wakeupen4W::new(self, 4)
109 }
110 #[doc = "Bit 5 - External Interrupt 5 Wake-up Enable"]
111 #[inline(always)]
112 #[must_use]
113 pub fn wakeupen5(&mut self) -> Wakeupen5W<WakeupSpec> {
114 Wakeupen5W::new(self, 5)
115 }
116 #[doc = "Bit 6 - External Interrupt 6 Wake-up Enable"]
117 #[inline(always)]
118 #[must_use]
119 pub fn wakeupen6(&mut self) -> Wakeupen6W<WakeupSpec> {
120 Wakeupen6W::new(self, 6)
121 }
122 #[doc = "Bit 7 - External Interrupt 7 Wake-up Enable"]
123 #[inline(always)]
124 #[must_use]
125 pub fn wakeupen7(&mut self) -> Wakeupen7W<WakeupSpec> {
126 Wakeupen7W::new(self, 7)
127 }
128}
129#[doc = "Wake-Up Enable\n\nYou can [`read`](crate::Reg::read) this register and get [`wakeup::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`wakeup::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
130pub struct WakeupSpec;
131impl crate::RegisterSpec for WakeupSpec {
132 type Ux = u32;
133}
134#[doc = "`read()` method returns [`wakeup::R`](R) reader structure"]
135impl crate::Readable for WakeupSpec {}
136#[doc = "`write(|w| ..)` method takes [`wakeup::W`](W) writer structure"]
137impl crate::Writable for WakeupSpec {
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 WAKEUP to value 0"]
143impl crate::Resettable for WakeupSpec {
144 const RESET_VALUE: u32 = 0;
145}