1#[doc = "Register `INTENCLR` reader"]
2pub struct R(crate::R<INTENCLR_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<INTENCLR_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<INTENCLR_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<INTENCLR_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `INTENCLR` writer"]
17pub struct W(crate::W<INTENCLR_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<INTENCLR_SPEC>;
20 #[inline(always)]
21 fn deref(&self) -> &Self::Target {
22 &self.0
23 }
24}
25impl core::ops::DerefMut for W {
26 #[inline(always)]
27 fn deref_mut(&mut self) -> &mut Self::Target {
28 &mut self.0
29 }
30}
31impl From<crate::W<INTENCLR_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<INTENCLR_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `CTS` reader - Write '1' to disable interrupt for CTS event"]
38pub type CTS_R = crate::BitReader<CTS_A>;
39#[doc = "Write '1' to disable interrupt for CTS event\n\nValue on reset: 0"]
40#[derive(Clone, Copy, Debug, PartialEq)]
41pub enum CTS_A {
42 #[doc = "0: Read: Disabled"]
43 DISABLED = 0,
44 #[doc = "1: Read: Enabled"]
45 ENABLED = 1,
46}
47impl From<CTS_A> for bool {
48 #[inline(always)]
49 fn from(variant: CTS_A) -> Self {
50 variant as u8 != 0
51 }
52}
53impl CTS_R {
54 #[doc = "Get enumerated values variant"]
55 #[inline(always)]
56 pub fn variant(&self) -> CTS_A {
57 match self.bits {
58 false => CTS_A::DISABLED,
59 true => CTS_A::ENABLED,
60 }
61 }
62 #[doc = "Checks if the value of the field is `DISABLED`"]
63 #[inline(always)]
64 pub fn is_disabled(&self) -> bool {
65 *self == CTS_A::DISABLED
66 }
67 #[doc = "Checks if the value of the field is `ENABLED`"]
68 #[inline(always)]
69 pub fn is_enabled(&self) -> bool {
70 *self == CTS_A::ENABLED
71 }
72}
73#[doc = "Write '1' to disable interrupt for CTS event\n\nValue on reset: 0"]
74#[derive(Clone, Copy, Debug, PartialEq)]
75pub enum CTS_AW {
76 #[doc = "1: Disable"]
77 CLEAR = 1,
78}
79impl From<CTS_AW> for bool {
80 #[inline(always)]
81 fn from(variant: CTS_AW) -> Self {
82 variant as u8 != 0
83 }
84}
85#[doc = "Field `CTS` writer - Write '1' to disable interrupt for CTS event"]
86pub type CTS_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, CTS_AW, O>;
87impl<'a, const O: u8> CTS_W<'a, O> {
88 #[doc = "Disable"]
89 #[inline(always)]
90 pub fn clear(self) -> &'a mut W {
91 self.variant(CTS_AW::CLEAR)
92 }
93}
94#[doc = "Field `NCTS` reader - Write '1' to disable interrupt for NCTS event"]
95pub type NCTS_R = crate::BitReader<NCTS_A>;
96#[doc = "Write '1' to disable interrupt for NCTS event\n\nValue on reset: 0"]
97#[derive(Clone, Copy, Debug, PartialEq)]
98pub enum NCTS_A {
99 #[doc = "0: Read: Disabled"]
100 DISABLED = 0,
101 #[doc = "1: Read: Enabled"]
102 ENABLED = 1,
103}
104impl From<NCTS_A> for bool {
105 #[inline(always)]
106 fn from(variant: NCTS_A) -> Self {
107 variant as u8 != 0
108 }
109}
110impl NCTS_R {
111 #[doc = "Get enumerated values variant"]
112 #[inline(always)]
113 pub fn variant(&self) -> NCTS_A {
114 match self.bits {
115 false => NCTS_A::DISABLED,
116 true => NCTS_A::ENABLED,
117 }
118 }
119 #[doc = "Checks if the value of the field is `DISABLED`"]
120 #[inline(always)]
121 pub fn is_disabled(&self) -> bool {
122 *self == NCTS_A::DISABLED
123 }
124 #[doc = "Checks if the value of the field is `ENABLED`"]
125 #[inline(always)]
126 pub fn is_enabled(&self) -> bool {
127 *self == NCTS_A::ENABLED
128 }
129}
130#[doc = "Write '1' to disable interrupt for NCTS event\n\nValue on reset: 0"]
131#[derive(Clone, Copy, Debug, PartialEq)]
132pub enum NCTS_AW {
133 #[doc = "1: Disable"]
134 CLEAR = 1,
135}
136impl From<NCTS_AW> for bool {
137 #[inline(always)]
138 fn from(variant: NCTS_AW) -> Self {
139 variant as u8 != 0
140 }
141}
142#[doc = "Field `NCTS` writer - Write '1' to disable interrupt for NCTS event"]
143pub type NCTS_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, NCTS_AW, O>;
144impl<'a, const O: u8> NCTS_W<'a, O> {
145 #[doc = "Disable"]
146 #[inline(always)]
147 pub fn clear(self) -> &'a mut W {
148 self.variant(NCTS_AW::CLEAR)
149 }
150}
151#[doc = "Field `RXDRDY` reader - Write '1' to disable interrupt for RXDRDY event"]
152pub type RXDRDY_R = crate::BitReader<RXDRDY_A>;
153#[doc = "Write '1' to disable interrupt for RXDRDY event\n\nValue on reset: 0"]
154#[derive(Clone, Copy, Debug, PartialEq)]
155pub enum RXDRDY_A {
156 #[doc = "0: Read: Disabled"]
157 DISABLED = 0,
158 #[doc = "1: Read: Enabled"]
159 ENABLED = 1,
160}
161impl From<RXDRDY_A> for bool {
162 #[inline(always)]
163 fn from(variant: RXDRDY_A) -> Self {
164 variant as u8 != 0
165 }
166}
167impl RXDRDY_R {
168 #[doc = "Get enumerated values variant"]
169 #[inline(always)]
170 pub fn variant(&self) -> RXDRDY_A {
171 match self.bits {
172 false => RXDRDY_A::DISABLED,
173 true => RXDRDY_A::ENABLED,
174 }
175 }
176 #[doc = "Checks if the value of the field is `DISABLED`"]
177 #[inline(always)]
178 pub fn is_disabled(&self) -> bool {
179 *self == RXDRDY_A::DISABLED
180 }
181 #[doc = "Checks if the value of the field is `ENABLED`"]
182 #[inline(always)]
183 pub fn is_enabled(&self) -> bool {
184 *self == RXDRDY_A::ENABLED
185 }
186}
187#[doc = "Write '1' to disable interrupt for RXDRDY event\n\nValue on reset: 0"]
188#[derive(Clone, Copy, Debug, PartialEq)]
189pub enum RXDRDY_AW {
190 #[doc = "1: Disable"]
191 CLEAR = 1,
192}
193impl From<RXDRDY_AW> for bool {
194 #[inline(always)]
195 fn from(variant: RXDRDY_AW) -> Self {
196 variant as u8 != 0
197 }
198}
199#[doc = "Field `RXDRDY` writer - Write '1' to disable interrupt for RXDRDY event"]
200pub type RXDRDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, RXDRDY_AW, O>;
201impl<'a, const O: u8> RXDRDY_W<'a, O> {
202 #[doc = "Disable"]
203 #[inline(always)]
204 pub fn clear(self) -> &'a mut W {
205 self.variant(RXDRDY_AW::CLEAR)
206 }
207}
208#[doc = "Field `TXDRDY` reader - Write '1' to disable interrupt for TXDRDY event"]
209pub type TXDRDY_R = crate::BitReader<TXDRDY_A>;
210#[doc = "Write '1' to disable interrupt for TXDRDY event\n\nValue on reset: 0"]
211#[derive(Clone, Copy, Debug, PartialEq)]
212pub enum TXDRDY_A {
213 #[doc = "0: Read: Disabled"]
214 DISABLED = 0,
215 #[doc = "1: Read: Enabled"]
216 ENABLED = 1,
217}
218impl From<TXDRDY_A> for bool {
219 #[inline(always)]
220 fn from(variant: TXDRDY_A) -> Self {
221 variant as u8 != 0
222 }
223}
224impl TXDRDY_R {
225 #[doc = "Get enumerated values variant"]
226 #[inline(always)]
227 pub fn variant(&self) -> TXDRDY_A {
228 match self.bits {
229 false => TXDRDY_A::DISABLED,
230 true => TXDRDY_A::ENABLED,
231 }
232 }
233 #[doc = "Checks if the value of the field is `DISABLED`"]
234 #[inline(always)]
235 pub fn is_disabled(&self) -> bool {
236 *self == TXDRDY_A::DISABLED
237 }
238 #[doc = "Checks if the value of the field is `ENABLED`"]
239 #[inline(always)]
240 pub fn is_enabled(&self) -> bool {
241 *self == TXDRDY_A::ENABLED
242 }
243}
244#[doc = "Write '1' to disable interrupt for TXDRDY event\n\nValue on reset: 0"]
245#[derive(Clone, Copy, Debug, PartialEq)]
246pub enum TXDRDY_AW {
247 #[doc = "1: Disable"]
248 CLEAR = 1,
249}
250impl From<TXDRDY_AW> for bool {
251 #[inline(always)]
252 fn from(variant: TXDRDY_AW) -> Self {
253 variant as u8 != 0
254 }
255}
256#[doc = "Field `TXDRDY` writer - Write '1' to disable interrupt for TXDRDY event"]
257pub type TXDRDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, TXDRDY_AW, O>;
258impl<'a, const O: u8> TXDRDY_W<'a, O> {
259 #[doc = "Disable"]
260 #[inline(always)]
261 pub fn clear(self) -> &'a mut W {
262 self.variant(TXDRDY_AW::CLEAR)
263 }
264}
265#[doc = "Field `ERROR` reader - Write '1' to disable interrupt for ERROR event"]
266pub type ERROR_R = crate::BitReader<ERROR_A>;
267#[doc = "Write '1' to disable interrupt for ERROR event\n\nValue on reset: 0"]
268#[derive(Clone, Copy, Debug, PartialEq)]
269pub enum ERROR_A {
270 #[doc = "0: Read: Disabled"]
271 DISABLED = 0,
272 #[doc = "1: Read: Enabled"]
273 ENABLED = 1,
274}
275impl From<ERROR_A> for bool {
276 #[inline(always)]
277 fn from(variant: ERROR_A) -> Self {
278 variant as u8 != 0
279 }
280}
281impl ERROR_R {
282 #[doc = "Get enumerated values variant"]
283 #[inline(always)]
284 pub fn variant(&self) -> ERROR_A {
285 match self.bits {
286 false => ERROR_A::DISABLED,
287 true => ERROR_A::ENABLED,
288 }
289 }
290 #[doc = "Checks if the value of the field is `DISABLED`"]
291 #[inline(always)]
292 pub fn is_disabled(&self) -> bool {
293 *self == ERROR_A::DISABLED
294 }
295 #[doc = "Checks if the value of the field is `ENABLED`"]
296 #[inline(always)]
297 pub fn is_enabled(&self) -> bool {
298 *self == ERROR_A::ENABLED
299 }
300}
301#[doc = "Write '1' to disable interrupt for ERROR event\n\nValue on reset: 0"]
302#[derive(Clone, Copy, Debug, PartialEq)]
303pub enum ERROR_AW {
304 #[doc = "1: Disable"]
305 CLEAR = 1,
306}
307impl From<ERROR_AW> for bool {
308 #[inline(always)]
309 fn from(variant: ERROR_AW) -> Self {
310 variant as u8 != 0
311 }
312}
313#[doc = "Field `ERROR` writer - Write '1' to disable interrupt for ERROR event"]
314pub type ERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, ERROR_AW, O>;
315impl<'a, const O: u8> ERROR_W<'a, O> {
316 #[doc = "Disable"]
317 #[inline(always)]
318 pub fn clear(self) -> &'a mut W {
319 self.variant(ERROR_AW::CLEAR)
320 }
321}
322#[doc = "Field `RXTO` reader - Write '1' to disable interrupt for RXTO event"]
323pub type RXTO_R = crate::BitReader<RXTO_A>;
324#[doc = "Write '1' to disable interrupt for RXTO event\n\nValue on reset: 0"]
325#[derive(Clone, Copy, Debug, PartialEq)]
326pub enum RXTO_A {
327 #[doc = "0: Read: Disabled"]
328 DISABLED = 0,
329 #[doc = "1: Read: Enabled"]
330 ENABLED = 1,
331}
332impl From<RXTO_A> for bool {
333 #[inline(always)]
334 fn from(variant: RXTO_A) -> Self {
335 variant as u8 != 0
336 }
337}
338impl RXTO_R {
339 #[doc = "Get enumerated values variant"]
340 #[inline(always)]
341 pub fn variant(&self) -> RXTO_A {
342 match self.bits {
343 false => RXTO_A::DISABLED,
344 true => RXTO_A::ENABLED,
345 }
346 }
347 #[doc = "Checks if the value of the field is `DISABLED`"]
348 #[inline(always)]
349 pub fn is_disabled(&self) -> bool {
350 *self == RXTO_A::DISABLED
351 }
352 #[doc = "Checks if the value of the field is `ENABLED`"]
353 #[inline(always)]
354 pub fn is_enabled(&self) -> bool {
355 *self == RXTO_A::ENABLED
356 }
357}
358#[doc = "Write '1' to disable interrupt for RXTO event\n\nValue on reset: 0"]
359#[derive(Clone, Copy, Debug, PartialEq)]
360pub enum RXTO_AW {
361 #[doc = "1: Disable"]
362 CLEAR = 1,
363}
364impl From<RXTO_AW> for bool {
365 #[inline(always)]
366 fn from(variant: RXTO_AW) -> Self {
367 variant as u8 != 0
368 }
369}
370#[doc = "Field `RXTO` writer - Write '1' to disable interrupt for RXTO event"]
371pub type RXTO_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, RXTO_AW, O>;
372impl<'a, const O: u8> RXTO_W<'a, O> {
373 #[doc = "Disable"]
374 #[inline(always)]
375 pub fn clear(self) -> &'a mut W {
376 self.variant(RXTO_AW::CLEAR)
377 }
378}
379impl R {
380 #[doc = "Bit 0 - Write '1' to disable interrupt for CTS event"]
381 #[inline(always)]
382 pub fn cts(&self) -> CTS_R {
383 CTS_R::new((self.bits & 1) != 0)
384 }
385 #[doc = "Bit 1 - Write '1' to disable interrupt for NCTS event"]
386 #[inline(always)]
387 pub fn ncts(&self) -> NCTS_R {
388 NCTS_R::new(((self.bits >> 1) & 1) != 0)
389 }
390 #[doc = "Bit 2 - Write '1' to disable interrupt for RXDRDY event"]
391 #[inline(always)]
392 pub fn rxdrdy(&self) -> RXDRDY_R {
393 RXDRDY_R::new(((self.bits >> 2) & 1) != 0)
394 }
395 #[doc = "Bit 7 - Write '1' to disable interrupt for TXDRDY event"]
396 #[inline(always)]
397 pub fn txdrdy(&self) -> TXDRDY_R {
398 TXDRDY_R::new(((self.bits >> 7) & 1) != 0)
399 }
400 #[doc = "Bit 9 - Write '1' to disable interrupt for ERROR event"]
401 #[inline(always)]
402 pub fn error(&self) -> ERROR_R {
403 ERROR_R::new(((self.bits >> 9) & 1) != 0)
404 }
405 #[doc = "Bit 17 - Write '1' to disable interrupt for RXTO event"]
406 #[inline(always)]
407 pub fn rxto(&self) -> RXTO_R {
408 RXTO_R::new(((self.bits >> 17) & 1) != 0)
409 }
410}
411impl W {
412 #[doc = "Bit 0 - Write '1' to disable interrupt for CTS event"]
413 #[inline(always)]
414 pub fn cts(&mut self) -> CTS_W<0> {
415 CTS_W::new(self)
416 }
417 #[doc = "Bit 1 - Write '1' to disable interrupt for NCTS event"]
418 #[inline(always)]
419 pub fn ncts(&mut self) -> NCTS_W<1> {
420 NCTS_W::new(self)
421 }
422 #[doc = "Bit 2 - Write '1' to disable interrupt for RXDRDY event"]
423 #[inline(always)]
424 pub fn rxdrdy(&mut self) -> RXDRDY_W<2> {
425 RXDRDY_W::new(self)
426 }
427 #[doc = "Bit 7 - Write '1' to disable interrupt for TXDRDY event"]
428 #[inline(always)]
429 pub fn txdrdy(&mut self) -> TXDRDY_W<7> {
430 TXDRDY_W::new(self)
431 }
432 #[doc = "Bit 9 - Write '1' to disable interrupt for ERROR event"]
433 #[inline(always)]
434 pub fn error(&mut self) -> ERROR_W<9> {
435 ERROR_W::new(self)
436 }
437 #[doc = "Bit 17 - Write '1' to disable interrupt for RXTO event"]
438 #[inline(always)]
439 pub fn rxto(&mut self) -> RXTO_W<17> {
440 RXTO_W::new(self)
441 }
442 #[doc = "Writes raw bits to the register."]
443 #[inline(always)]
444 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
445 self.0.bits(bits);
446 self
447 }
448}
449#[doc = "Disable interrupt\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [intenclr](index.html) module"]
450pub struct INTENCLR_SPEC;
451impl crate::RegisterSpec for INTENCLR_SPEC {
452 type Ux = u32;
453}
454#[doc = "`read()` method returns [intenclr::R](R) reader structure"]
455impl crate::Readable for INTENCLR_SPEC {
456 type Reader = R;
457}
458#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"]
459impl crate::Writable for INTENCLR_SPEC {
460 type Writer = W;
461}
462#[doc = "`reset()` method sets INTENCLR to value 0"]
463impl crate::Resettable for INTENCLR_SPEC {
464 #[inline(always)]
465 fn reset_value() -> Self::Ux {
466 0
467 }
468}