1#[doc = "Register `ERFIER` reader"]
2pub type R = crate::R<ErfierSpec>;
3#[doc = "Register `ERFIER` writer"]
4pub type W = crate::W<ErfierSpec>;
5#[doc = "Enhanced RX FIFO Data Available Interrupt Enable\n\nValue on reset: 0"]
6#[cfg_attr(feature = "defmt", derive(defmt::Format))]
7#[derive(Clone, Copy, Debug, PartialEq, Eq)]
8pub enum Erfdaie {
9 #[doc = "0: Disable"]
10 Disable = 0,
11 #[doc = "1: Enable"]
12 Enable = 1,
13}
14impl From<Erfdaie> for bool {
15 #[inline(always)]
16 fn from(variant: Erfdaie) -> Self {
17 variant as u8 != 0
18 }
19}
20#[doc = "Field `ERFDAIE` reader - Enhanced RX FIFO Data Available Interrupt Enable"]
21pub type ErfdaieR = crate::BitReader<Erfdaie>;
22impl ErfdaieR {
23 #[doc = "Get enumerated values variant"]
24 #[inline(always)]
25 pub const fn variant(&self) -> Erfdaie {
26 match self.bits {
27 false => Erfdaie::Disable,
28 true => Erfdaie::Enable,
29 }
30 }
31 #[doc = "Disable"]
32 #[inline(always)]
33 pub fn is_disable(&self) -> bool {
34 *self == Erfdaie::Disable
35 }
36 #[doc = "Enable"]
37 #[inline(always)]
38 pub fn is_enable(&self) -> bool {
39 *self == Erfdaie::Enable
40 }
41}
42#[doc = "Field `ERFDAIE` writer - Enhanced RX FIFO Data Available Interrupt Enable"]
43pub type ErfdaieW<'a, REG> = crate::BitWriter<'a, REG, Erfdaie>;
44impl<'a, REG> ErfdaieW<'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(Erfdaie::Disable)
52 }
53 #[doc = "Enable"]
54 #[inline(always)]
55 pub fn enable(self) -> &'a mut crate::W<REG> {
56 self.variant(Erfdaie::Enable)
57 }
58}
59#[doc = "Enhanced RX FIFO Watermark Indication Interrupt Enable\n\nValue on reset: 0"]
60#[cfg_attr(feature = "defmt", derive(defmt::Format))]
61#[derive(Clone, Copy, Debug, PartialEq, Eq)]
62pub enum Erfwmiie {
63 #[doc = "0: Disable"]
64 Disable = 0,
65 #[doc = "1: Enable"]
66 Enable = 1,
67}
68impl From<Erfwmiie> for bool {
69 #[inline(always)]
70 fn from(variant: Erfwmiie) -> Self {
71 variant as u8 != 0
72 }
73}
74#[doc = "Field `ERFWMIIE` reader - Enhanced RX FIFO Watermark Indication Interrupt Enable"]
75pub type ErfwmiieR = crate::BitReader<Erfwmiie>;
76impl ErfwmiieR {
77 #[doc = "Get enumerated values variant"]
78 #[inline(always)]
79 pub const fn variant(&self) -> Erfwmiie {
80 match self.bits {
81 false => Erfwmiie::Disable,
82 true => Erfwmiie::Enable,
83 }
84 }
85 #[doc = "Disable"]
86 #[inline(always)]
87 pub fn is_disable(&self) -> bool {
88 *self == Erfwmiie::Disable
89 }
90 #[doc = "Enable"]
91 #[inline(always)]
92 pub fn is_enable(&self) -> bool {
93 *self == Erfwmiie::Enable
94 }
95}
96#[doc = "Field `ERFWMIIE` writer - Enhanced RX FIFO Watermark Indication Interrupt Enable"]
97pub type ErfwmiieW<'a, REG> = crate::BitWriter<'a, REG, Erfwmiie>;
98impl<'a, REG> ErfwmiieW<'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(Erfwmiie::Disable)
106 }
107 #[doc = "Enable"]
108 #[inline(always)]
109 pub fn enable(self) -> &'a mut crate::W<REG> {
110 self.variant(Erfwmiie::Enable)
111 }
112}
113#[doc = "Enhanced RX FIFO Overflow Interrupt Enable\n\nValue on reset: 0"]
114#[cfg_attr(feature = "defmt", derive(defmt::Format))]
115#[derive(Clone, Copy, Debug, PartialEq, Eq)]
116pub enum Erfovfie {
117 #[doc = "0: Disable"]
118 Disable = 0,
119 #[doc = "1: Enable"]
120 Enable = 1,
121}
122impl From<Erfovfie> for bool {
123 #[inline(always)]
124 fn from(variant: Erfovfie) -> Self {
125 variant as u8 != 0
126 }
127}
128#[doc = "Field `ERFOVFIE` reader - Enhanced RX FIFO Overflow Interrupt Enable"]
129pub type ErfovfieR = crate::BitReader<Erfovfie>;
130impl ErfovfieR {
131 #[doc = "Get enumerated values variant"]
132 #[inline(always)]
133 pub const fn variant(&self) -> Erfovfie {
134 match self.bits {
135 false => Erfovfie::Disable,
136 true => Erfovfie::Enable,
137 }
138 }
139 #[doc = "Disable"]
140 #[inline(always)]
141 pub fn is_disable(&self) -> bool {
142 *self == Erfovfie::Disable
143 }
144 #[doc = "Enable"]
145 #[inline(always)]
146 pub fn is_enable(&self) -> bool {
147 *self == Erfovfie::Enable
148 }
149}
150#[doc = "Field `ERFOVFIE` writer - Enhanced RX FIFO Overflow Interrupt Enable"]
151pub type ErfovfieW<'a, REG> = crate::BitWriter<'a, REG, Erfovfie>;
152impl<'a, REG> ErfovfieW<'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(Erfovfie::Disable)
160 }
161 #[doc = "Enable"]
162 #[inline(always)]
163 pub fn enable(self) -> &'a mut crate::W<REG> {
164 self.variant(Erfovfie::Enable)
165 }
166}
167#[doc = "Enhanced RX FIFO Underflow Interrupt Enable\n\nValue on reset: 0"]
168#[cfg_attr(feature = "defmt", derive(defmt::Format))]
169#[derive(Clone, Copy, Debug, PartialEq, Eq)]
170pub enum Erfufwie {
171 #[doc = "0: Disable"]
172 Disable = 0,
173 #[doc = "1: Enable"]
174 Enable = 1,
175}
176impl From<Erfufwie> for bool {
177 #[inline(always)]
178 fn from(variant: Erfufwie) -> Self {
179 variant as u8 != 0
180 }
181}
182#[doc = "Field `ERFUFWIE` reader - Enhanced RX FIFO Underflow Interrupt Enable"]
183pub type ErfufwieR = crate::BitReader<Erfufwie>;
184impl ErfufwieR {
185 #[doc = "Get enumerated values variant"]
186 #[inline(always)]
187 pub const fn variant(&self) -> Erfufwie {
188 match self.bits {
189 false => Erfufwie::Disable,
190 true => Erfufwie::Enable,
191 }
192 }
193 #[doc = "Disable"]
194 #[inline(always)]
195 pub fn is_disable(&self) -> bool {
196 *self == Erfufwie::Disable
197 }
198 #[doc = "Enable"]
199 #[inline(always)]
200 pub fn is_enable(&self) -> bool {
201 *self == Erfufwie::Enable
202 }
203}
204#[doc = "Field `ERFUFWIE` writer - Enhanced RX FIFO Underflow Interrupt Enable"]
205pub type ErfufwieW<'a, REG> = crate::BitWriter<'a, REG, Erfufwie>;
206impl<'a, REG> ErfufwieW<'a, REG>
207where
208 REG: crate::Writable + crate::RegisterSpec,
209{
210 #[doc = "Disable"]
211 #[inline(always)]
212 pub fn disable(self) -> &'a mut crate::W<REG> {
213 self.variant(Erfufwie::Disable)
214 }
215 #[doc = "Enable"]
216 #[inline(always)]
217 pub fn enable(self) -> &'a mut crate::W<REG> {
218 self.variant(Erfufwie::Enable)
219 }
220}
221impl R {
222 #[doc = "Bit 28 - Enhanced RX FIFO Data Available Interrupt Enable"]
223 #[inline(always)]
224 pub fn erfdaie(&self) -> ErfdaieR {
225 ErfdaieR::new(((self.bits >> 28) & 1) != 0)
226 }
227 #[doc = "Bit 29 - Enhanced RX FIFO Watermark Indication Interrupt Enable"]
228 #[inline(always)]
229 pub fn erfwmiie(&self) -> ErfwmiieR {
230 ErfwmiieR::new(((self.bits >> 29) & 1) != 0)
231 }
232 #[doc = "Bit 30 - Enhanced RX FIFO Overflow Interrupt Enable"]
233 #[inline(always)]
234 pub fn erfovfie(&self) -> ErfovfieR {
235 ErfovfieR::new(((self.bits >> 30) & 1) != 0)
236 }
237 #[doc = "Bit 31 - Enhanced RX FIFO Underflow Interrupt Enable"]
238 #[inline(always)]
239 pub fn erfufwie(&self) -> ErfufwieR {
240 ErfufwieR::new(((self.bits >> 31) & 1) != 0)
241 }
242}
243#[cfg(feature = "debug")]
244impl core::fmt::Debug for R {
245 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
246 f.debug_struct("ERFIER")
247 .field("erfdaie", &self.erfdaie())
248 .field("erfwmiie", &self.erfwmiie())
249 .field("erfovfie", &self.erfovfie())
250 .field("erfufwie", &self.erfufwie())
251 .finish()
252 }
253}
254impl W {
255 #[doc = "Bit 28 - Enhanced RX FIFO Data Available Interrupt Enable"]
256 #[inline(always)]
257 pub fn erfdaie(&mut self) -> ErfdaieW<'_, ErfierSpec> {
258 ErfdaieW::new(self, 28)
259 }
260 #[doc = "Bit 29 - Enhanced RX FIFO Watermark Indication Interrupt Enable"]
261 #[inline(always)]
262 pub fn erfwmiie(&mut self) -> ErfwmiieW<'_, ErfierSpec> {
263 ErfwmiieW::new(self, 29)
264 }
265 #[doc = "Bit 30 - Enhanced RX FIFO Overflow Interrupt Enable"]
266 #[inline(always)]
267 pub fn erfovfie(&mut self) -> ErfovfieW<'_, ErfierSpec> {
268 ErfovfieW::new(self, 30)
269 }
270 #[doc = "Bit 31 - Enhanced RX FIFO Underflow Interrupt Enable"]
271 #[inline(always)]
272 pub fn erfufwie(&mut self) -> ErfufwieW<'_, ErfierSpec> {
273 ErfufwieW::new(self, 31)
274 }
275}
276#[doc = "Enhanced RX FIFO Interrupt Enable\n\nYou can [`read`](crate::Reg::read) this register and get [`erfier::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`erfier::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
277pub struct ErfierSpec;
278impl crate::RegisterSpec for ErfierSpec {
279 type Ux = u32;
280}
281#[doc = "`read()` method returns [`erfier::R`](R) reader structure"]
282impl crate::Readable for ErfierSpec {}
283#[doc = "`write(|w| ..)` method takes [`erfier::W`](W) writer structure"]
284impl crate::Writable for ErfierSpec {
285 type Safety = crate::Unsafe;
286}
287#[doc = "`reset()` method sets ERFIER to value 0"]
288impl crate::Resettable for ErfierSpec {}