1#[doc = "Register `DE` reader"]
2pub type R = crate::R<DeSpec>;
3#[doc = "Register `DE` writer"]
4pub type W = crate::W<DeSpec>;
5#[doc = "DMA/Trigger Wake-up Enable for Module 4\n\nValue on reset: 0"]
6#[cfg_attr(feature = "defmt", derive(defmt::Format))]
7#[derive(Clone, Copy, Debug, PartialEq, Eq)]
8pub enum Wude4 {
9 #[doc = "0: Disable"]
10 Disable = 0,
11 #[doc = "1: Enable"]
12 Enable = 1,
13}
14impl From<Wude4> for bool {
15 #[inline(always)]
16 fn from(variant: Wude4) -> Self {
17 variant as u8 != 0
18 }
19}
20#[doc = "Field `WUDE4` reader - DMA/Trigger Wake-up Enable for Module 4"]
21pub type Wude4R = crate::BitReader<Wude4>;
22impl Wude4R {
23 #[doc = "Get enumerated values variant"]
24 #[inline(always)]
25 pub const fn variant(&self) -> Wude4 {
26 match self.bits {
27 false => Wude4::Disable,
28 true => Wude4::Enable,
29 }
30 }
31 #[doc = "Disable"]
32 #[inline(always)]
33 pub fn is_disable(&self) -> bool {
34 *self == Wude4::Disable
35 }
36 #[doc = "Enable"]
37 #[inline(always)]
38 pub fn is_enable(&self) -> bool {
39 *self == Wude4::Enable
40 }
41}
42#[doc = "Field `WUDE4` writer - DMA/Trigger Wake-up Enable for Module 4"]
43pub type Wude4W<'a, REG> = crate::BitWriter<'a, REG, Wude4>;
44impl<'a, REG> Wude4W<'a, REG>
45where
46 REG: crate::Writable + crate::RegisterSpec,
47{
48 #[doc = "Disable"]
49 #[inline(always)]
50 pub fn disable(self) -> &'a mut crate::W<REG> {
51 self.variant(Wude4::Disable)
52 }
53 #[doc = "Enable"]
54 #[inline(always)]
55 pub fn enable(self) -> &'a mut crate::W<REG> {
56 self.variant(Wude4::Enable)
57 }
58}
59#[doc = "DMA/Trigger Wake-up Enable for Module 6\n\nValue on reset: 0"]
60#[cfg_attr(feature = "defmt", derive(defmt::Format))]
61#[derive(Clone, Copy, Debug, PartialEq, Eq)]
62pub enum Wude6 {
63 #[doc = "0: Disable"]
64 Disable = 0,
65 #[doc = "1: Enable"]
66 Enable = 1,
67}
68impl From<Wude6> for bool {
69 #[inline(always)]
70 fn from(variant: Wude6) -> Self {
71 variant as u8 != 0
72 }
73}
74#[doc = "Field `WUDE6` reader - DMA/Trigger Wake-up Enable for Module 6"]
75pub type Wude6R = crate::BitReader<Wude6>;
76impl Wude6R {
77 #[doc = "Get enumerated values variant"]
78 #[inline(always)]
79 pub const fn variant(&self) -> Wude6 {
80 match self.bits {
81 false => Wude6::Disable,
82 true => Wude6::Enable,
83 }
84 }
85 #[doc = "Disable"]
86 #[inline(always)]
87 pub fn is_disable(&self) -> bool {
88 *self == Wude6::Disable
89 }
90 #[doc = "Enable"]
91 #[inline(always)]
92 pub fn is_enable(&self) -> bool {
93 *self == Wude6::Enable
94 }
95}
96#[doc = "Field `WUDE6` writer - DMA/Trigger Wake-up Enable for Module 6"]
97pub type Wude6W<'a, REG> = crate::BitWriter<'a, REG, Wude6>;
98impl<'a, REG> Wude6W<'a, REG>
99where
100 REG: crate::Writable + crate::RegisterSpec,
101{
102 #[doc = "Disable"]
103 #[inline(always)]
104 pub fn disable(self) -> &'a mut crate::W<REG> {
105 self.variant(Wude6::Disable)
106 }
107 #[doc = "Enable"]
108 #[inline(always)]
109 pub fn enable(self) -> &'a mut crate::W<REG> {
110 self.variant(Wude6::Enable)
111 }
112}
113#[doc = "DMA/Trigger Wake-up Enable for Module 8\n\nValue on reset: 0"]
114#[cfg_attr(feature = "defmt", derive(defmt::Format))]
115#[derive(Clone, Copy, Debug, PartialEq, Eq)]
116pub enum Wude8 {
117 #[doc = "0: Disable"]
118 Disable = 0,
119 #[doc = "1: Enable"]
120 Enable = 1,
121}
122impl From<Wude8> for bool {
123 #[inline(always)]
124 fn from(variant: Wude8) -> Self {
125 variant as u8 != 0
126 }
127}
128#[doc = "Field `WUDE8` reader - DMA/Trigger Wake-up Enable for Module 8"]
129pub type Wude8R = crate::BitReader<Wude8>;
130impl Wude8R {
131 #[doc = "Get enumerated values variant"]
132 #[inline(always)]
133 pub const fn variant(&self) -> Wude8 {
134 match self.bits {
135 false => Wude8::Disable,
136 true => Wude8::Enable,
137 }
138 }
139 #[doc = "Disable"]
140 #[inline(always)]
141 pub fn is_disable(&self) -> bool {
142 *self == Wude8::Disable
143 }
144 #[doc = "Enable"]
145 #[inline(always)]
146 pub fn is_enable(&self) -> bool {
147 *self == Wude8::Enable
148 }
149}
150#[doc = "Field `WUDE8` writer - DMA/Trigger Wake-up Enable for Module 8"]
151pub type Wude8W<'a, REG> = crate::BitWriter<'a, REG, Wude8>;
152impl<'a, REG> Wude8W<'a, REG>
153where
154 REG: crate::Writable + crate::RegisterSpec,
155{
156 #[doc = "Disable"]
157 #[inline(always)]
158 pub fn disable(self) -> &'a mut crate::W<REG> {
159 self.variant(Wude8::Disable)
160 }
161 #[doc = "Enable"]
162 #[inline(always)]
163 pub fn enable(self) -> &'a mut crate::W<REG> {
164 self.variant(Wude8::Enable)
165 }
166}
167impl R {
168 #[doc = "Bit 4 - DMA/Trigger Wake-up Enable for Module 4"]
169 #[inline(always)]
170 pub fn wude4(&self) -> Wude4R {
171 Wude4R::new(((self.bits >> 4) & 1) != 0)
172 }
173 #[doc = "Bit 6 - DMA/Trigger Wake-up Enable for Module 6"]
174 #[inline(always)]
175 pub fn wude6(&self) -> Wude6R {
176 Wude6R::new(((self.bits >> 6) & 1) != 0)
177 }
178 #[doc = "Bit 8 - DMA/Trigger Wake-up Enable for Module 8"]
179 #[inline(always)]
180 pub fn wude8(&self) -> Wude8R {
181 Wude8R::new(((self.bits >> 8) & 1) != 0)
182 }
183}
184#[cfg(feature = "debug")]
185impl core::fmt::Debug for R {
186 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
187 f.debug_struct("DE")
188 .field("wude4", &self.wude4())
189 .field("wude6", &self.wude6())
190 .field("wude8", &self.wude8())
191 .finish()
192 }
193}
194impl W {
195 #[doc = "Bit 4 - DMA/Trigger Wake-up Enable for Module 4"]
196 #[inline(always)]
197 pub fn wude4(&mut self) -> Wude4W<'_, DeSpec> {
198 Wude4W::new(self, 4)
199 }
200 #[doc = "Bit 6 - DMA/Trigger Wake-up Enable for Module 6"]
201 #[inline(always)]
202 pub fn wude6(&mut self) -> Wude6W<'_, DeSpec> {
203 Wude6W::new(self, 6)
204 }
205 #[doc = "Bit 8 - DMA/Trigger Wake-up Enable for Module 8"]
206 #[inline(always)]
207 pub fn wude8(&mut self) -> Wude8W<'_, DeSpec> {
208 Wude8W::new(self, 8)
209 }
210}
211#[doc = "Module DMA/Trigger Enable\n\nYou can [`read`](crate::Reg::read) this register and get [`de::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`de::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
212pub struct DeSpec;
213impl crate::RegisterSpec for DeSpec {
214 type Ux = u32;
215}
216#[doc = "`read()` method returns [`de::R`](R) reader structure"]
217impl crate::Readable for DeSpec {}
218#[doc = "`write(|w| ..)` method takes [`de::W`](W) writer structure"]
219impl crate::Writable for DeSpec {
220 type Safety = crate::Unsafe;
221}
222#[doc = "`reset()` method sets DE to value 0"]
223impl crate::Resettable for DeSpec {}