1#[doc = "Register `spi_ier` reader"]
2pub type R = crate::R<SPI_IER_SPEC>;
3#[doc = "Register `spi_ier` writer"]
4pub type W = crate::W<SPI_IER_SPEC>;
5#[doc = "Field `rf_rdy_int_en` reader - RXFIFO Ready Request Interrupt Enable"]
6pub type RF_RDY_INT_EN_R = crate::BitReader<RF_RDY_INT_EN_A>;
7#[doc = "RXFIFO Ready Request Interrupt Enable\n\nValue on reset: 0"]
8#[derive(Clone, Copy, Debug, PartialEq, Eq)]
9pub enum RF_RDY_INT_EN_A {
10 #[doc = "0: `0`"]
11 DISABLE = 0,
12 #[doc = "1: `1`"]
13 ENABLE = 1,
14}
15impl From<RF_RDY_INT_EN_A> for bool {
16 #[inline(always)]
17 fn from(variant: RF_RDY_INT_EN_A) -> Self {
18 variant as u8 != 0
19 }
20}
21impl RF_RDY_INT_EN_R {
22 #[doc = "Get enumerated values variant"]
23 #[inline(always)]
24 pub const fn variant(&self) -> RF_RDY_INT_EN_A {
25 match self.bits {
26 false => RF_RDY_INT_EN_A::DISABLE,
27 true => RF_RDY_INT_EN_A::ENABLE,
28 }
29 }
30 #[doc = "`0`"]
31 #[inline(always)]
32 pub fn is_disable(&self) -> bool {
33 *self == RF_RDY_INT_EN_A::DISABLE
34 }
35 #[doc = "`1`"]
36 #[inline(always)]
37 pub fn is_enable(&self) -> bool {
38 *self == RF_RDY_INT_EN_A::ENABLE
39 }
40}
41#[doc = "Field `rf_rdy_int_en` writer - RXFIFO Ready Request Interrupt Enable"]
42pub type RF_RDY_INT_EN_W<'a, REG> = crate::BitWriter<'a, REG, RF_RDY_INT_EN_A>;
43impl<'a, REG> RF_RDY_INT_EN_W<'a, REG>
44where
45 REG: crate::Writable + crate::RegisterSpec,
46{
47 #[doc = "`0`"]
48 #[inline(always)]
49 pub fn disable(self) -> &'a mut crate::W<REG> {
50 self.variant(RF_RDY_INT_EN_A::DISABLE)
51 }
52 #[doc = "`1`"]
53 #[inline(always)]
54 pub fn enable(self) -> &'a mut crate::W<REG> {
55 self.variant(RF_RDY_INT_EN_A::ENABLE)
56 }
57}
58#[doc = "Field `rf_emp_int_en` reader - RXFIFO Empty Interrupt Enable"]
59pub type RF_EMP_INT_EN_R = crate::BitReader<RF_EMP_INT_EN_A>;
60#[doc = "RXFIFO Empty Interrupt Enable\n\nValue on reset: 0"]
61#[derive(Clone, Copy, Debug, PartialEq, Eq)]
62pub enum RF_EMP_INT_EN_A {
63 #[doc = "0: `0`"]
64 DISABLE = 0,
65 #[doc = "1: `1`"]
66 ENABLE = 1,
67}
68impl From<RF_EMP_INT_EN_A> for bool {
69 #[inline(always)]
70 fn from(variant: RF_EMP_INT_EN_A) -> Self {
71 variant as u8 != 0
72 }
73}
74impl RF_EMP_INT_EN_R {
75 #[doc = "Get enumerated values variant"]
76 #[inline(always)]
77 pub const fn variant(&self) -> RF_EMP_INT_EN_A {
78 match self.bits {
79 false => RF_EMP_INT_EN_A::DISABLE,
80 true => RF_EMP_INT_EN_A::ENABLE,
81 }
82 }
83 #[doc = "`0`"]
84 #[inline(always)]
85 pub fn is_disable(&self) -> bool {
86 *self == RF_EMP_INT_EN_A::DISABLE
87 }
88 #[doc = "`1`"]
89 #[inline(always)]
90 pub fn is_enable(&self) -> bool {
91 *self == RF_EMP_INT_EN_A::ENABLE
92 }
93}
94#[doc = "Field `rf_emp_int_en` writer - RXFIFO Empty Interrupt Enable"]
95pub type RF_EMP_INT_EN_W<'a, REG> = crate::BitWriter<'a, REG, RF_EMP_INT_EN_A>;
96impl<'a, REG> RF_EMP_INT_EN_W<'a, REG>
97where
98 REG: crate::Writable + crate::RegisterSpec,
99{
100 #[doc = "`0`"]
101 #[inline(always)]
102 pub fn disable(self) -> &'a mut crate::W<REG> {
103 self.variant(RF_EMP_INT_EN_A::DISABLE)
104 }
105 #[doc = "`1`"]
106 #[inline(always)]
107 pub fn enable(self) -> &'a mut crate::W<REG> {
108 self.variant(RF_EMP_INT_EN_A::ENABLE)
109 }
110}
111#[doc = "Field `rf_full_int_en` reader - RXFIFO Full Interrupt Enable"]
112pub type RF_FULL_INT_EN_R = crate::BitReader<RF_FULL_INT_EN_A>;
113#[doc = "RXFIFO Full Interrupt Enable\n\nValue on reset: 0"]
114#[derive(Clone, Copy, Debug, PartialEq, Eq)]
115pub enum RF_FULL_INT_EN_A {
116 #[doc = "0: `0`"]
117 DISABLE = 0,
118 #[doc = "1: `1`"]
119 ENABLE = 1,
120}
121impl From<RF_FULL_INT_EN_A> for bool {
122 #[inline(always)]
123 fn from(variant: RF_FULL_INT_EN_A) -> Self {
124 variant as u8 != 0
125 }
126}
127impl RF_FULL_INT_EN_R {
128 #[doc = "Get enumerated values variant"]
129 #[inline(always)]
130 pub const fn variant(&self) -> RF_FULL_INT_EN_A {
131 match self.bits {
132 false => RF_FULL_INT_EN_A::DISABLE,
133 true => RF_FULL_INT_EN_A::ENABLE,
134 }
135 }
136 #[doc = "`0`"]
137 #[inline(always)]
138 pub fn is_disable(&self) -> bool {
139 *self == RF_FULL_INT_EN_A::DISABLE
140 }
141 #[doc = "`1`"]
142 #[inline(always)]
143 pub fn is_enable(&self) -> bool {
144 *self == RF_FULL_INT_EN_A::ENABLE
145 }
146}
147#[doc = "Field `rf_full_int_en` writer - RXFIFO Full Interrupt Enable"]
148pub type RF_FULL_INT_EN_W<'a, REG> = crate::BitWriter<'a, REG, RF_FULL_INT_EN_A>;
149impl<'a, REG> RF_FULL_INT_EN_W<'a, REG>
150where
151 REG: crate::Writable + crate::RegisterSpec,
152{
153 #[doc = "`0`"]
154 #[inline(always)]
155 pub fn disable(self) -> &'a mut crate::W<REG> {
156 self.variant(RF_FULL_INT_EN_A::DISABLE)
157 }
158 #[doc = "`1`"]
159 #[inline(always)]
160 pub fn enable(self) -> &'a mut crate::W<REG> {
161 self.variant(RF_FULL_INT_EN_A::ENABLE)
162 }
163}
164#[doc = "Field `tf_erq_int_en` reader - TXFIFO Empty Request Interrupt Enable"]
165pub type TF_ERQ_INT_EN_R = crate::BitReader<TF_ERQ_INT_EN_A>;
166#[doc = "TXFIFO Empty Request Interrupt Enable\n\nValue on reset: 0"]
167#[derive(Clone, Copy, Debug, PartialEq, Eq)]
168pub enum TF_ERQ_INT_EN_A {
169 #[doc = "0: `0`"]
170 DISABLE = 0,
171 #[doc = "1: `1`"]
172 ENABLE = 1,
173}
174impl From<TF_ERQ_INT_EN_A> for bool {
175 #[inline(always)]
176 fn from(variant: TF_ERQ_INT_EN_A) -> Self {
177 variant as u8 != 0
178 }
179}
180impl TF_ERQ_INT_EN_R {
181 #[doc = "Get enumerated values variant"]
182 #[inline(always)]
183 pub const fn variant(&self) -> TF_ERQ_INT_EN_A {
184 match self.bits {
185 false => TF_ERQ_INT_EN_A::DISABLE,
186 true => TF_ERQ_INT_EN_A::ENABLE,
187 }
188 }
189 #[doc = "`0`"]
190 #[inline(always)]
191 pub fn is_disable(&self) -> bool {
192 *self == TF_ERQ_INT_EN_A::DISABLE
193 }
194 #[doc = "`1`"]
195 #[inline(always)]
196 pub fn is_enable(&self) -> bool {
197 *self == TF_ERQ_INT_EN_A::ENABLE
198 }
199}
200#[doc = "Field `tf_erq_int_en` writer - TXFIFO Empty Request Interrupt Enable"]
201pub type TF_ERQ_INT_EN_W<'a, REG> = crate::BitWriter<'a, REG, TF_ERQ_INT_EN_A>;
202impl<'a, REG> TF_ERQ_INT_EN_W<'a, REG>
203where
204 REG: crate::Writable + crate::RegisterSpec,
205{
206 #[doc = "`0`"]
207 #[inline(always)]
208 pub fn disable(self) -> &'a mut crate::W<REG> {
209 self.variant(TF_ERQ_INT_EN_A::DISABLE)
210 }
211 #[doc = "`1`"]
212 #[inline(always)]
213 pub fn enable(self) -> &'a mut crate::W<REG> {
214 self.variant(TF_ERQ_INT_EN_A::ENABLE)
215 }
216}
217#[doc = "Field `tf_emp_int_en` reader - TXFIFO Empty Interrupt Enable"]
218pub type TF_EMP_INT_EN_R = crate::BitReader<TF_EMP_INT_EN_A>;
219#[doc = "TXFIFO Empty Interrupt Enable\n\nValue on reset: 0"]
220#[derive(Clone, Copy, Debug, PartialEq, Eq)]
221pub enum TF_EMP_INT_EN_A {
222 #[doc = "0: `0`"]
223 DISABLE = 0,
224 #[doc = "1: `1`"]
225 ENABLE = 1,
226}
227impl From<TF_EMP_INT_EN_A> for bool {
228 #[inline(always)]
229 fn from(variant: TF_EMP_INT_EN_A) -> Self {
230 variant as u8 != 0
231 }
232}
233impl TF_EMP_INT_EN_R {
234 #[doc = "Get enumerated values variant"]
235 #[inline(always)]
236 pub const fn variant(&self) -> TF_EMP_INT_EN_A {
237 match self.bits {
238 false => TF_EMP_INT_EN_A::DISABLE,
239 true => TF_EMP_INT_EN_A::ENABLE,
240 }
241 }
242 #[doc = "`0`"]
243 #[inline(always)]
244 pub fn is_disable(&self) -> bool {
245 *self == TF_EMP_INT_EN_A::DISABLE
246 }
247 #[doc = "`1`"]
248 #[inline(always)]
249 pub fn is_enable(&self) -> bool {
250 *self == TF_EMP_INT_EN_A::ENABLE
251 }
252}
253#[doc = "Field `tf_emp_int_en` writer - TXFIFO Empty Interrupt Enable"]
254pub type TF_EMP_INT_EN_W<'a, REG> = crate::BitWriter<'a, REG, TF_EMP_INT_EN_A>;
255impl<'a, REG> TF_EMP_INT_EN_W<'a, REG>
256where
257 REG: crate::Writable + crate::RegisterSpec,
258{
259 #[doc = "`0`"]
260 #[inline(always)]
261 pub fn disable(self) -> &'a mut crate::W<REG> {
262 self.variant(TF_EMP_INT_EN_A::DISABLE)
263 }
264 #[doc = "`1`"]
265 #[inline(always)]
266 pub fn enable(self) -> &'a mut crate::W<REG> {
267 self.variant(TF_EMP_INT_EN_A::ENABLE)
268 }
269}
270#[doc = "Field `tf_full_int_en` reader - TXFIFO Full Interrupt Enable"]
271pub type TF_FULL_INT_EN_R = crate::BitReader<TF_FULL_INT_EN_A>;
272#[doc = "TXFIFO Full Interrupt Enable\n\nValue on reset: 0"]
273#[derive(Clone, Copy, Debug, PartialEq, Eq)]
274pub enum TF_FULL_INT_EN_A {
275 #[doc = "0: `0`"]
276 DISABLE = 0,
277 #[doc = "1: `1`"]
278 ENABLE = 1,
279}
280impl From<TF_FULL_INT_EN_A> for bool {
281 #[inline(always)]
282 fn from(variant: TF_FULL_INT_EN_A) -> Self {
283 variant as u8 != 0
284 }
285}
286impl TF_FULL_INT_EN_R {
287 #[doc = "Get enumerated values variant"]
288 #[inline(always)]
289 pub const fn variant(&self) -> TF_FULL_INT_EN_A {
290 match self.bits {
291 false => TF_FULL_INT_EN_A::DISABLE,
292 true => TF_FULL_INT_EN_A::ENABLE,
293 }
294 }
295 #[doc = "`0`"]
296 #[inline(always)]
297 pub fn is_disable(&self) -> bool {
298 *self == TF_FULL_INT_EN_A::DISABLE
299 }
300 #[doc = "`1`"]
301 #[inline(always)]
302 pub fn is_enable(&self) -> bool {
303 *self == TF_FULL_INT_EN_A::ENABLE
304 }
305}
306#[doc = "Field `tf_full_int_en` writer - TXFIFO Full Interrupt Enable"]
307pub type TF_FULL_INT_EN_W<'a, REG> = crate::BitWriter<'a, REG, TF_FULL_INT_EN_A>;
308impl<'a, REG> TF_FULL_INT_EN_W<'a, REG>
309where
310 REG: crate::Writable + crate::RegisterSpec,
311{
312 #[doc = "`0`"]
313 #[inline(always)]
314 pub fn disable(self) -> &'a mut crate::W<REG> {
315 self.variant(TF_FULL_INT_EN_A::DISABLE)
316 }
317 #[doc = "`1`"]
318 #[inline(always)]
319 pub fn enable(self) -> &'a mut crate::W<REG> {
320 self.variant(TF_FULL_INT_EN_A::ENABLE)
321 }
322}
323#[doc = "Field `rf_ovf_int_en` reader - RXFIFO Overflow Interrupt Enable"]
324pub type RF_OVF_INT_EN_R = crate::BitReader<RF_OVF_INT_EN_A>;
325#[doc = "RXFIFO Overflow Interrupt Enable\n\nValue on reset: 0"]
326#[derive(Clone, Copy, Debug, PartialEq, Eq)]
327pub enum RF_OVF_INT_EN_A {
328 #[doc = "0: `0`"]
329 DISABLE = 0,
330 #[doc = "1: `1`"]
331 ENABLE = 1,
332}
333impl From<RF_OVF_INT_EN_A> for bool {
334 #[inline(always)]
335 fn from(variant: RF_OVF_INT_EN_A) -> Self {
336 variant as u8 != 0
337 }
338}
339impl RF_OVF_INT_EN_R {
340 #[doc = "Get enumerated values variant"]
341 #[inline(always)]
342 pub const fn variant(&self) -> RF_OVF_INT_EN_A {
343 match self.bits {
344 false => RF_OVF_INT_EN_A::DISABLE,
345 true => RF_OVF_INT_EN_A::ENABLE,
346 }
347 }
348 #[doc = "`0`"]
349 #[inline(always)]
350 pub fn is_disable(&self) -> bool {
351 *self == RF_OVF_INT_EN_A::DISABLE
352 }
353 #[doc = "`1`"]
354 #[inline(always)]
355 pub fn is_enable(&self) -> bool {
356 *self == RF_OVF_INT_EN_A::ENABLE
357 }
358}
359#[doc = "Field `rf_ovf_int_en` writer - RXFIFO Overflow Interrupt Enable"]
360pub type RF_OVF_INT_EN_W<'a, REG> = crate::BitWriter<'a, REG, RF_OVF_INT_EN_A>;
361impl<'a, REG> RF_OVF_INT_EN_W<'a, REG>
362where
363 REG: crate::Writable + crate::RegisterSpec,
364{
365 #[doc = "`0`"]
366 #[inline(always)]
367 pub fn disable(self) -> &'a mut crate::W<REG> {
368 self.variant(RF_OVF_INT_EN_A::DISABLE)
369 }
370 #[doc = "`1`"]
371 #[inline(always)]
372 pub fn enable(self) -> &'a mut crate::W<REG> {
373 self.variant(RF_OVF_INT_EN_A::ENABLE)
374 }
375}
376#[doc = "Field `rf_udr_int_en` reader - RXFIFO Underrun Interrupt Enable"]
377pub type RF_UDR_INT_EN_R = crate::BitReader<RF_UDR_INT_EN_A>;
378#[doc = "RXFIFO Underrun Interrupt Enable\n\nValue on reset: 0"]
379#[derive(Clone, Copy, Debug, PartialEq, Eq)]
380pub enum RF_UDR_INT_EN_A {
381 #[doc = "0: `0`"]
382 DISABLE = 0,
383 #[doc = "1: `1`"]
384 ENABLE = 1,
385}
386impl From<RF_UDR_INT_EN_A> for bool {
387 #[inline(always)]
388 fn from(variant: RF_UDR_INT_EN_A) -> Self {
389 variant as u8 != 0
390 }
391}
392impl RF_UDR_INT_EN_R {
393 #[doc = "Get enumerated values variant"]
394 #[inline(always)]
395 pub const fn variant(&self) -> RF_UDR_INT_EN_A {
396 match self.bits {
397 false => RF_UDR_INT_EN_A::DISABLE,
398 true => RF_UDR_INT_EN_A::ENABLE,
399 }
400 }
401 #[doc = "`0`"]
402 #[inline(always)]
403 pub fn is_disable(&self) -> bool {
404 *self == RF_UDR_INT_EN_A::DISABLE
405 }
406 #[doc = "`1`"]
407 #[inline(always)]
408 pub fn is_enable(&self) -> bool {
409 *self == RF_UDR_INT_EN_A::ENABLE
410 }
411}
412#[doc = "Field `rf_udr_int_en` writer - RXFIFO Underrun Interrupt Enable"]
413pub type RF_UDR_INT_EN_W<'a, REG> = crate::BitWriter<'a, REG, RF_UDR_INT_EN_A>;
414impl<'a, REG> RF_UDR_INT_EN_W<'a, REG>
415where
416 REG: crate::Writable + crate::RegisterSpec,
417{
418 #[doc = "`0`"]
419 #[inline(always)]
420 pub fn disable(self) -> &'a mut crate::W<REG> {
421 self.variant(RF_UDR_INT_EN_A::DISABLE)
422 }
423 #[doc = "`1`"]
424 #[inline(always)]
425 pub fn enable(self) -> &'a mut crate::W<REG> {
426 self.variant(RF_UDR_INT_EN_A::ENABLE)
427 }
428}
429#[doc = "Field `tf_ovf_int_en` reader - TXFIFO Overflow Interrupt Enable"]
430pub type TF_OVF_INT_EN_R = crate::BitReader<TF_OVF_INT_EN_A>;
431#[doc = "TXFIFO Overflow Interrupt Enable\n\nValue on reset: 0"]
432#[derive(Clone, Copy, Debug, PartialEq, Eq)]
433pub enum TF_OVF_INT_EN_A {
434 #[doc = "0: `0`"]
435 DISABLE = 0,
436 #[doc = "1: `1`"]
437 ENABLE = 1,
438}
439impl From<TF_OVF_INT_EN_A> for bool {
440 #[inline(always)]
441 fn from(variant: TF_OVF_INT_EN_A) -> Self {
442 variant as u8 != 0
443 }
444}
445impl TF_OVF_INT_EN_R {
446 #[doc = "Get enumerated values variant"]
447 #[inline(always)]
448 pub const fn variant(&self) -> TF_OVF_INT_EN_A {
449 match self.bits {
450 false => TF_OVF_INT_EN_A::DISABLE,
451 true => TF_OVF_INT_EN_A::ENABLE,
452 }
453 }
454 #[doc = "`0`"]
455 #[inline(always)]
456 pub fn is_disable(&self) -> bool {
457 *self == TF_OVF_INT_EN_A::DISABLE
458 }
459 #[doc = "`1`"]
460 #[inline(always)]
461 pub fn is_enable(&self) -> bool {
462 *self == TF_OVF_INT_EN_A::ENABLE
463 }
464}
465#[doc = "Field `tf_ovf_int_en` writer - TXFIFO Overflow Interrupt Enable"]
466pub type TF_OVF_INT_EN_W<'a, REG> = crate::BitWriter<'a, REG, TF_OVF_INT_EN_A>;
467impl<'a, REG> TF_OVF_INT_EN_W<'a, REG>
468where
469 REG: crate::Writable + crate::RegisterSpec,
470{
471 #[doc = "`0`"]
472 #[inline(always)]
473 pub fn disable(self) -> &'a mut crate::W<REG> {
474 self.variant(TF_OVF_INT_EN_A::DISABLE)
475 }
476 #[doc = "`1`"]
477 #[inline(always)]
478 pub fn enable(self) -> &'a mut crate::W<REG> {
479 self.variant(TF_OVF_INT_EN_A::ENABLE)
480 }
481}
482#[doc = "Field `tf_udr_int_en` reader - TXFIFO Underrun Interrupt Enable"]
483pub type TF_UDR_INT_EN_R = crate::BitReader<TF_UDR_INT_EN_A>;
484#[doc = "TXFIFO Underrun Interrupt Enable\n\nValue on reset: 0"]
485#[derive(Clone, Copy, Debug, PartialEq, Eq)]
486pub enum TF_UDR_INT_EN_A {
487 #[doc = "0: `0`"]
488 DISABLE = 0,
489 #[doc = "1: `1`"]
490 ENABLE = 1,
491}
492impl From<TF_UDR_INT_EN_A> for bool {
493 #[inline(always)]
494 fn from(variant: TF_UDR_INT_EN_A) -> Self {
495 variant as u8 != 0
496 }
497}
498impl TF_UDR_INT_EN_R {
499 #[doc = "Get enumerated values variant"]
500 #[inline(always)]
501 pub const fn variant(&self) -> TF_UDR_INT_EN_A {
502 match self.bits {
503 false => TF_UDR_INT_EN_A::DISABLE,
504 true => TF_UDR_INT_EN_A::ENABLE,
505 }
506 }
507 #[doc = "`0`"]
508 #[inline(always)]
509 pub fn is_disable(&self) -> bool {
510 *self == TF_UDR_INT_EN_A::DISABLE
511 }
512 #[doc = "`1`"]
513 #[inline(always)]
514 pub fn is_enable(&self) -> bool {
515 *self == TF_UDR_INT_EN_A::ENABLE
516 }
517}
518#[doc = "Field `tf_udr_int_en` writer - TXFIFO Underrun Interrupt Enable"]
519pub type TF_UDR_INT_EN_W<'a, REG> = crate::BitWriter<'a, REG, TF_UDR_INT_EN_A>;
520impl<'a, REG> TF_UDR_INT_EN_W<'a, REG>
521where
522 REG: crate::Writable + crate::RegisterSpec,
523{
524 #[doc = "`0`"]
525 #[inline(always)]
526 pub fn disable(self) -> &'a mut crate::W<REG> {
527 self.variant(TF_UDR_INT_EN_A::DISABLE)
528 }
529 #[doc = "`1`"]
530 #[inline(always)]
531 pub fn enable(self) -> &'a mut crate::W<REG> {
532 self.variant(TF_UDR_INT_EN_A::ENABLE)
533 }
534}
535#[doc = "Field `tc_int_en` reader - Transfer Completed Interrupt Enable"]
536pub type TC_INT_EN_R = crate::BitReader<TC_INT_EN_A>;
537#[doc = "Transfer Completed Interrupt Enable\n\nValue on reset: 0"]
538#[derive(Clone, Copy, Debug, PartialEq, Eq)]
539pub enum TC_INT_EN_A {
540 #[doc = "0: `0`"]
541 DISABLE = 0,
542 #[doc = "1: `1`"]
543 ENABLE = 1,
544}
545impl From<TC_INT_EN_A> for bool {
546 #[inline(always)]
547 fn from(variant: TC_INT_EN_A) -> Self {
548 variant as u8 != 0
549 }
550}
551impl TC_INT_EN_R {
552 #[doc = "Get enumerated values variant"]
553 #[inline(always)]
554 pub const fn variant(&self) -> TC_INT_EN_A {
555 match self.bits {
556 false => TC_INT_EN_A::DISABLE,
557 true => TC_INT_EN_A::ENABLE,
558 }
559 }
560 #[doc = "`0`"]
561 #[inline(always)]
562 pub fn is_disable(&self) -> bool {
563 *self == TC_INT_EN_A::DISABLE
564 }
565 #[doc = "`1`"]
566 #[inline(always)]
567 pub fn is_enable(&self) -> bool {
568 *self == TC_INT_EN_A::ENABLE
569 }
570}
571#[doc = "Field `tc_int_en` writer - Transfer Completed Interrupt Enable"]
572pub type TC_INT_EN_W<'a, REG> = crate::BitWriter<'a, REG, TC_INT_EN_A>;
573impl<'a, REG> TC_INT_EN_W<'a, REG>
574where
575 REG: crate::Writable + crate::RegisterSpec,
576{
577 #[doc = "`0`"]
578 #[inline(always)]
579 pub fn disable(self) -> &'a mut crate::W<REG> {
580 self.variant(TC_INT_EN_A::DISABLE)
581 }
582 #[doc = "`1`"]
583 #[inline(always)]
584 pub fn enable(self) -> &'a mut crate::W<REG> {
585 self.variant(TC_INT_EN_A::ENABLE)
586 }
587}
588#[doc = "Field `ss_int_en` reader - SSI Interrupt Enable"]
589pub type SS_INT_EN_R = crate::BitReader<SS_INT_EN_A>;
590#[doc = "SSI Interrupt Enable\n\nValue on reset: 0"]
591#[derive(Clone, Copy, Debug, PartialEq, Eq)]
592pub enum SS_INT_EN_A {
593 #[doc = "0: `0`"]
594 DISABLE = 0,
595 #[doc = "1: `1`"]
596 ENABLE = 1,
597}
598impl From<SS_INT_EN_A> for bool {
599 #[inline(always)]
600 fn from(variant: SS_INT_EN_A) -> Self {
601 variant as u8 != 0
602 }
603}
604impl SS_INT_EN_R {
605 #[doc = "Get enumerated values variant"]
606 #[inline(always)]
607 pub const fn variant(&self) -> SS_INT_EN_A {
608 match self.bits {
609 false => SS_INT_EN_A::DISABLE,
610 true => SS_INT_EN_A::ENABLE,
611 }
612 }
613 #[doc = "`0`"]
614 #[inline(always)]
615 pub fn is_disable(&self) -> bool {
616 *self == SS_INT_EN_A::DISABLE
617 }
618 #[doc = "`1`"]
619 #[inline(always)]
620 pub fn is_enable(&self) -> bool {
621 *self == SS_INT_EN_A::ENABLE
622 }
623}
624#[doc = "Field `ss_int_en` writer - SSI Interrupt Enable"]
625pub type SS_INT_EN_W<'a, REG> = crate::BitWriter<'a, REG, SS_INT_EN_A>;
626impl<'a, REG> SS_INT_EN_W<'a, REG>
627where
628 REG: crate::Writable + crate::RegisterSpec,
629{
630 #[doc = "`0`"]
631 #[inline(always)]
632 pub fn disable(self) -> &'a mut crate::W<REG> {
633 self.variant(SS_INT_EN_A::DISABLE)
634 }
635 #[doc = "`1`"]
636 #[inline(always)]
637 pub fn enable(self) -> &'a mut crate::W<REG> {
638 self.variant(SS_INT_EN_A::ENABLE)
639 }
640}
641impl R {
642 #[doc = "Bit 0 - RXFIFO Ready Request Interrupt Enable"]
643 #[inline(always)]
644 pub fn rf_rdy_int_en(&self) -> RF_RDY_INT_EN_R {
645 RF_RDY_INT_EN_R::new((self.bits & 1) != 0)
646 }
647 #[doc = "Bit 1 - RXFIFO Empty Interrupt Enable"]
648 #[inline(always)]
649 pub fn rf_emp_int_en(&self) -> RF_EMP_INT_EN_R {
650 RF_EMP_INT_EN_R::new(((self.bits >> 1) & 1) != 0)
651 }
652 #[doc = "Bit 2 - RXFIFO Full Interrupt Enable"]
653 #[inline(always)]
654 pub fn rf_full_int_en(&self) -> RF_FULL_INT_EN_R {
655 RF_FULL_INT_EN_R::new(((self.bits >> 2) & 1) != 0)
656 }
657 #[doc = "Bit 4 - TXFIFO Empty Request Interrupt Enable"]
658 #[inline(always)]
659 pub fn tf_erq_int_en(&self) -> TF_ERQ_INT_EN_R {
660 TF_ERQ_INT_EN_R::new(((self.bits >> 4) & 1) != 0)
661 }
662 #[doc = "Bit 5 - TXFIFO Empty Interrupt Enable"]
663 #[inline(always)]
664 pub fn tf_emp_int_en(&self) -> TF_EMP_INT_EN_R {
665 TF_EMP_INT_EN_R::new(((self.bits >> 5) & 1) != 0)
666 }
667 #[doc = "Bit 6 - TXFIFO Full Interrupt Enable"]
668 #[inline(always)]
669 pub fn tf_full_int_en(&self) -> TF_FULL_INT_EN_R {
670 TF_FULL_INT_EN_R::new(((self.bits >> 6) & 1) != 0)
671 }
672 #[doc = "Bit 8 - RXFIFO Overflow Interrupt Enable"]
673 #[inline(always)]
674 pub fn rf_ovf_int_en(&self) -> RF_OVF_INT_EN_R {
675 RF_OVF_INT_EN_R::new(((self.bits >> 8) & 1) != 0)
676 }
677 #[doc = "Bit 9 - RXFIFO Underrun Interrupt Enable"]
678 #[inline(always)]
679 pub fn rf_udr_int_en(&self) -> RF_UDR_INT_EN_R {
680 RF_UDR_INT_EN_R::new(((self.bits >> 9) & 1) != 0)
681 }
682 #[doc = "Bit 10 - TXFIFO Overflow Interrupt Enable"]
683 #[inline(always)]
684 pub fn tf_ovf_int_en(&self) -> TF_OVF_INT_EN_R {
685 TF_OVF_INT_EN_R::new(((self.bits >> 10) & 1) != 0)
686 }
687 #[doc = "Bit 11 - TXFIFO Underrun Interrupt Enable"]
688 #[inline(always)]
689 pub fn tf_udr_int_en(&self) -> TF_UDR_INT_EN_R {
690 TF_UDR_INT_EN_R::new(((self.bits >> 11) & 1) != 0)
691 }
692 #[doc = "Bit 12 - Transfer Completed Interrupt Enable"]
693 #[inline(always)]
694 pub fn tc_int_en(&self) -> TC_INT_EN_R {
695 TC_INT_EN_R::new(((self.bits >> 12) & 1) != 0)
696 }
697 #[doc = "Bit 13 - SSI Interrupt Enable"]
698 #[inline(always)]
699 pub fn ss_int_en(&self) -> SS_INT_EN_R {
700 SS_INT_EN_R::new(((self.bits >> 13) & 1) != 0)
701 }
702}
703impl W {
704 #[doc = "Bit 0 - RXFIFO Ready Request Interrupt Enable"]
705 #[inline(always)]
706 #[must_use]
707 pub fn rf_rdy_int_en(&mut self) -> RF_RDY_INT_EN_W<SPI_IER_SPEC> {
708 RF_RDY_INT_EN_W::new(self, 0)
709 }
710 #[doc = "Bit 1 - RXFIFO Empty Interrupt Enable"]
711 #[inline(always)]
712 #[must_use]
713 pub fn rf_emp_int_en(&mut self) -> RF_EMP_INT_EN_W<SPI_IER_SPEC> {
714 RF_EMP_INT_EN_W::new(self, 1)
715 }
716 #[doc = "Bit 2 - RXFIFO Full Interrupt Enable"]
717 #[inline(always)]
718 #[must_use]
719 pub fn rf_full_int_en(&mut self) -> RF_FULL_INT_EN_W<SPI_IER_SPEC> {
720 RF_FULL_INT_EN_W::new(self, 2)
721 }
722 #[doc = "Bit 4 - TXFIFO Empty Request Interrupt Enable"]
723 #[inline(always)]
724 #[must_use]
725 pub fn tf_erq_int_en(&mut self) -> TF_ERQ_INT_EN_W<SPI_IER_SPEC> {
726 TF_ERQ_INT_EN_W::new(self, 4)
727 }
728 #[doc = "Bit 5 - TXFIFO Empty Interrupt Enable"]
729 #[inline(always)]
730 #[must_use]
731 pub fn tf_emp_int_en(&mut self) -> TF_EMP_INT_EN_W<SPI_IER_SPEC> {
732 TF_EMP_INT_EN_W::new(self, 5)
733 }
734 #[doc = "Bit 6 - TXFIFO Full Interrupt Enable"]
735 #[inline(always)]
736 #[must_use]
737 pub fn tf_full_int_en(&mut self) -> TF_FULL_INT_EN_W<SPI_IER_SPEC> {
738 TF_FULL_INT_EN_W::new(self, 6)
739 }
740 #[doc = "Bit 8 - RXFIFO Overflow Interrupt Enable"]
741 #[inline(always)]
742 #[must_use]
743 pub fn rf_ovf_int_en(&mut self) -> RF_OVF_INT_EN_W<SPI_IER_SPEC> {
744 RF_OVF_INT_EN_W::new(self, 8)
745 }
746 #[doc = "Bit 9 - RXFIFO Underrun Interrupt Enable"]
747 #[inline(always)]
748 #[must_use]
749 pub fn rf_udr_int_en(&mut self) -> RF_UDR_INT_EN_W<SPI_IER_SPEC> {
750 RF_UDR_INT_EN_W::new(self, 9)
751 }
752 #[doc = "Bit 10 - TXFIFO Overflow Interrupt Enable"]
753 #[inline(always)]
754 #[must_use]
755 pub fn tf_ovf_int_en(&mut self) -> TF_OVF_INT_EN_W<SPI_IER_SPEC> {
756 TF_OVF_INT_EN_W::new(self, 10)
757 }
758 #[doc = "Bit 11 - TXFIFO Underrun Interrupt Enable"]
759 #[inline(always)]
760 #[must_use]
761 pub fn tf_udr_int_en(&mut self) -> TF_UDR_INT_EN_W<SPI_IER_SPEC> {
762 TF_UDR_INT_EN_W::new(self, 11)
763 }
764 #[doc = "Bit 12 - Transfer Completed Interrupt Enable"]
765 #[inline(always)]
766 #[must_use]
767 pub fn tc_int_en(&mut self) -> TC_INT_EN_W<SPI_IER_SPEC> {
768 TC_INT_EN_W::new(self, 12)
769 }
770 #[doc = "Bit 13 - SSI Interrupt Enable"]
771 #[inline(always)]
772 #[must_use]
773 pub fn ss_int_en(&mut self) -> SS_INT_EN_W<SPI_IER_SPEC> {
774 SS_INT_EN_W::new(self, 13)
775 }
776 #[doc = r" Writes raw bits to the register."]
777 #[doc = r""]
778 #[doc = r" # Safety"]
779 #[doc = r""]
780 #[doc = r" Passing incorrect value can cause undefined behaviour. See reference manual"]
781 #[inline(always)]
782 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
783 self.bits = bits;
784 self
785 }
786}
787#[doc = "SPI Interrupt Control Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`spi_ier::R`](R). You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`spi_ier::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
788pub struct SPI_IER_SPEC;
789impl crate::RegisterSpec for SPI_IER_SPEC {
790 type Ux = u32;
791}
792#[doc = "`read()` method returns [`spi_ier::R`](R) reader structure"]
793impl crate::Readable for SPI_IER_SPEC {}
794#[doc = "`write(|w| ..)` method takes [`spi_ier::W`](W) writer structure"]
795impl crate::Writable for SPI_IER_SPEC {
796 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
797 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
798}
799#[doc = "`reset()` method sets spi_ier to value 0"]
800impl crate::Resettable for SPI_IER_SPEC {
801 const RESET_VALUE: Self::Ux = 0;
802}