1#[doc = "Register `NISTER` reader"]
2pub type R = crate::R<NisterSpec>;
3#[doc = "Register `NISTER` writer"]
4pub type W = crate::W<NisterSpec>;
5#[doc = "Command Complete Status Enable\n\nValue on reset: 0"]
6#[derive(Clone, Copy, Debug, PartialEq, Eq)]
7pub enum Cmdcselect {
8 #[doc = "0: Masked"]
9 Masked = 0,
10 #[doc = "1: Enabled"]
11 Enabled = 1,
12}
13impl From<Cmdcselect> for bool {
14 #[inline(always)]
15 fn from(variant: Cmdcselect) -> Self {
16 variant as u8 != 0
17 }
18}
19#[doc = "Field `CMDC` reader - Command Complete Status Enable"]
20pub type CmdcR = crate::BitReader<Cmdcselect>;
21impl CmdcR {
22 #[doc = "Get enumerated values variant"]
23 #[inline(always)]
24 pub const fn variant(&self) -> Cmdcselect {
25 match self.bits {
26 false => Cmdcselect::Masked,
27 true => Cmdcselect::Enabled,
28 }
29 }
30 #[doc = "Masked"]
31 #[inline(always)]
32 pub fn is_masked(&self) -> bool {
33 *self == Cmdcselect::Masked
34 }
35 #[doc = "Enabled"]
36 #[inline(always)]
37 pub fn is_enabled(&self) -> bool {
38 *self == Cmdcselect::Enabled
39 }
40}
41#[doc = "Field `CMDC` writer - Command Complete Status Enable"]
42pub type CmdcW<'a, REG> = crate::BitWriter<'a, REG, Cmdcselect>;
43impl<'a, REG> CmdcW<'a, REG>
44where
45 REG: crate::Writable + crate::RegisterSpec,
46{
47 #[doc = "Masked"]
48 #[inline(always)]
49 pub fn masked(self) -> &'a mut crate::W<REG> {
50 self.variant(Cmdcselect::Masked)
51 }
52 #[doc = "Enabled"]
53 #[inline(always)]
54 pub fn enabled(self) -> &'a mut crate::W<REG> {
55 self.variant(Cmdcselect::Enabled)
56 }
57}
58#[doc = "Transfer Complete Status Enable\n\nValue on reset: 0"]
59#[derive(Clone, Copy, Debug, PartialEq, Eq)]
60pub enum Trfcselect {
61 #[doc = "0: Masked"]
62 Masked = 0,
63 #[doc = "1: Enabled"]
64 Enabled = 1,
65}
66impl From<Trfcselect> for bool {
67 #[inline(always)]
68 fn from(variant: Trfcselect) -> Self {
69 variant as u8 != 0
70 }
71}
72#[doc = "Field `TRFC` reader - Transfer Complete Status Enable"]
73pub type TrfcR = crate::BitReader<Trfcselect>;
74impl TrfcR {
75 #[doc = "Get enumerated values variant"]
76 #[inline(always)]
77 pub const fn variant(&self) -> Trfcselect {
78 match self.bits {
79 false => Trfcselect::Masked,
80 true => Trfcselect::Enabled,
81 }
82 }
83 #[doc = "Masked"]
84 #[inline(always)]
85 pub fn is_masked(&self) -> bool {
86 *self == Trfcselect::Masked
87 }
88 #[doc = "Enabled"]
89 #[inline(always)]
90 pub fn is_enabled(&self) -> bool {
91 *self == Trfcselect::Enabled
92 }
93}
94#[doc = "Field `TRFC` writer - Transfer Complete Status Enable"]
95pub type TrfcW<'a, REG> = crate::BitWriter<'a, REG, Trfcselect>;
96impl<'a, REG> TrfcW<'a, REG>
97where
98 REG: crate::Writable + crate::RegisterSpec,
99{
100 #[doc = "Masked"]
101 #[inline(always)]
102 pub fn masked(self) -> &'a mut crate::W<REG> {
103 self.variant(Trfcselect::Masked)
104 }
105 #[doc = "Enabled"]
106 #[inline(always)]
107 pub fn enabled(self) -> &'a mut crate::W<REG> {
108 self.variant(Trfcselect::Enabled)
109 }
110}
111#[doc = "Block Gap Event Status Enable\n\nValue on reset: 0"]
112#[derive(Clone, Copy, Debug, PartialEq, Eq)]
113pub enum Blkgeselect {
114 #[doc = "0: Masked"]
115 Masked = 0,
116 #[doc = "1: Enabled"]
117 Enabled = 1,
118}
119impl From<Blkgeselect> for bool {
120 #[inline(always)]
121 fn from(variant: Blkgeselect) -> Self {
122 variant as u8 != 0
123 }
124}
125#[doc = "Field `BLKGE` reader - Block Gap Event Status Enable"]
126pub type BlkgeR = crate::BitReader<Blkgeselect>;
127impl BlkgeR {
128 #[doc = "Get enumerated values variant"]
129 #[inline(always)]
130 pub const fn variant(&self) -> Blkgeselect {
131 match self.bits {
132 false => Blkgeselect::Masked,
133 true => Blkgeselect::Enabled,
134 }
135 }
136 #[doc = "Masked"]
137 #[inline(always)]
138 pub fn is_masked(&self) -> bool {
139 *self == Blkgeselect::Masked
140 }
141 #[doc = "Enabled"]
142 #[inline(always)]
143 pub fn is_enabled(&self) -> bool {
144 *self == Blkgeselect::Enabled
145 }
146}
147#[doc = "Field `BLKGE` writer - Block Gap Event Status Enable"]
148pub type BlkgeW<'a, REG> = crate::BitWriter<'a, REG, Blkgeselect>;
149impl<'a, REG> BlkgeW<'a, REG>
150where
151 REG: crate::Writable + crate::RegisterSpec,
152{
153 #[doc = "Masked"]
154 #[inline(always)]
155 pub fn masked(self) -> &'a mut crate::W<REG> {
156 self.variant(Blkgeselect::Masked)
157 }
158 #[doc = "Enabled"]
159 #[inline(always)]
160 pub fn enabled(self) -> &'a mut crate::W<REG> {
161 self.variant(Blkgeselect::Enabled)
162 }
163}
164#[doc = "DMA Interrupt Status Enable\n\nValue on reset: 0"]
165#[derive(Clone, Copy, Debug, PartialEq, Eq)]
166pub enum Dmaintselect {
167 #[doc = "0: Masked"]
168 Masked = 0,
169 #[doc = "1: Enabled"]
170 Enabled = 1,
171}
172impl From<Dmaintselect> for bool {
173 #[inline(always)]
174 fn from(variant: Dmaintselect) -> Self {
175 variant as u8 != 0
176 }
177}
178#[doc = "Field `DMAINT` reader - DMA Interrupt Status Enable"]
179pub type DmaintR = crate::BitReader<Dmaintselect>;
180impl DmaintR {
181 #[doc = "Get enumerated values variant"]
182 #[inline(always)]
183 pub const fn variant(&self) -> Dmaintselect {
184 match self.bits {
185 false => Dmaintselect::Masked,
186 true => Dmaintselect::Enabled,
187 }
188 }
189 #[doc = "Masked"]
190 #[inline(always)]
191 pub fn is_masked(&self) -> bool {
192 *self == Dmaintselect::Masked
193 }
194 #[doc = "Enabled"]
195 #[inline(always)]
196 pub fn is_enabled(&self) -> bool {
197 *self == Dmaintselect::Enabled
198 }
199}
200#[doc = "Field `DMAINT` writer - DMA Interrupt Status Enable"]
201pub type DmaintW<'a, REG> = crate::BitWriter<'a, REG, Dmaintselect>;
202impl<'a, REG> DmaintW<'a, REG>
203where
204 REG: crate::Writable + crate::RegisterSpec,
205{
206 #[doc = "Masked"]
207 #[inline(always)]
208 pub fn masked(self) -> &'a mut crate::W<REG> {
209 self.variant(Dmaintselect::Masked)
210 }
211 #[doc = "Enabled"]
212 #[inline(always)]
213 pub fn enabled(self) -> &'a mut crate::W<REG> {
214 self.variant(Dmaintselect::Enabled)
215 }
216}
217#[doc = "Buffer Write Ready Status Enable\n\nValue on reset: 0"]
218#[derive(Clone, Copy, Debug, PartialEq, Eq)]
219pub enum Bwrrdyselect {
220 #[doc = "0: Masked"]
221 Masked = 0,
222 #[doc = "1: Enabled"]
223 Enabled = 1,
224}
225impl From<Bwrrdyselect> for bool {
226 #[inline(always)]
227 fn from(variant: Bwrrdyselect) -> Self {
228 variant as u8 != 0
229 }
230}
231#[doc = "Field `BWRRDY` reader - Buffer Write Ready Status Enable"]
232pub type BwrrdyR = crate::BitReader<Bwrrdyselect>;
233impl BwrrdyR {
234 #[doc = "Get enumerated values variant"]
235 #[inline(always)]
236 pub const fn variant(&self) -> Bwrrdyselect {
237 match self.bits {
238 false => Bwrrdyselect::Masked,
239 true => Bwrrdyselect::Enabled,
240 }
241 }
242 #[doc = "Masked"]
243 #[inline(always)]
244 pub fn is_masked(&self) -> bool {
245 *self == Bwrrdyselect::Masked
246 }
247 #[doc = "Enabled"]
248 #[inline(always)]
249 pub fn is_enabled(&self) -> bool {
250 *self == Bwrrdyselect::Enabled
251 }
252}
253#[doc = "Field `BWRRDY` writer - Buffer Write Ready Status Enable"]
254pub type BwrrdyW<'a, REG> = crate::BitWriter<'a, REG, Bwrrdyselect>;
255impl<'a, REG> BwrrdyW<'a, REG>
256where
257 REG: crate::Writable + crate::RegisterSpec,
258{
259 #[doc = "Masked"]
260 #[inline(always)]
261 pub fn masked(self) -> &'a mut crate::W<REG> {
262 self.variant(Bwrrdyselect::Masked)
263 }
264 #[doc = "Enabled"]
265 #[inline(always)]
266 pub fn enabled(self) -> &'a mut crate::W<REG> {
267 self.variant(Bwrrdyselect::Enabled)
268 }
269}
270#[doc = "Buffer Read Ready Status Enable\n\nValue on reset: 0"]
271#[derive(Clone, Copy, Debug, PartialEq, Eq)]
272pub enum Brdrdyselect {
273 #[doc = "0: Masked"]
274 Masked = 0,
275 #[doc = "1: Enabled"]
276 Enabled = 1,
277}
278impl From<Brdrdyselect> for bool {
279 #[inline(always)]
280 fn from(variant: Brdrdyselect) -> Self {
281 variant as u8 != 0
282 }
283}
284#[doc = "Field `BRDRDY` reader - Buffer Read Ready Status Enable"]
285pub type BrdrdyR = crate::BitReader<Brdrdyselect>;
286impl BrdrdyR {
287 #[doc = "Get enumerated values variant"]
288 #[inline(always)]
289 pub const fn variant(&self) -> Brdrdyselect {
290 match self.bits {
291 false => Brdrdyselect::Masked,
292 true => Brdrdyselect::Enabled,
293 }
294 }
295 #[doc = "Masked"]
296 #[inline(always)]
297 pub fn is_masked(&self) -> bool {
298 *self == Brdrdyselect::Masked
299 }
300 #[doc = "Enabled"]
301 #[inline(always)]
302 pub fn is_enabled(&self) -> bool {
303 *self == Brdrdyselect::Enabled
304 }
305}
306#[doc = "Field `BRDRDY` writer - Buffer Read Ready Status Enable"]
307pub type BrdrdyW<'a, REG> = crate::BitWriter<'a, REG, Brdrdyselect>;
308impl<'a, REG> BrdrdyW<'a, REG>
309where
310 REG: crate::Writable + crate::RegisterSpec,
311{
312 #[doc = "Masked"]
313 #[inline(always)]
314 pub fn masked(self) -> &'a mut crate::W<REG> {
315 self.variant(Brdrdyselect::Masked)
316 }
317 #[doc = "Enabled"]
318 #[inline(always)]
319 pub fn enabled(self) -> &'a mut crate::W<REG> {
320 self.variant(Brdrdyselect::Enabled)
321 }
322}
323#[doc = "Card Insertion Status Enable\n\nValue on reset: 0"]
324#[derive(Clone, Copy, Debug, PartialEq, Eq)]
325pub enum Cinsselect {
326 #[doc = "0: Masked"]
327 Masked = 0,
328 #[doc = "1: Enabled"]
329 Enabled = 1,
330}
331impl From<Cinsselect> for bool {
332 #[inline(always)]
333 fn from(variant: Cinsselect) -> Self {
334 variant as u8 != 0
335 }
336}
337#[doc = "Field `CINS` reader - Card Insertion Status Enable"]
338pub type CinsR = crate::BitReader<Cinsselect>;
339impl CinsR {
340 #[doc = "Get enumerated values variant"]
341 #[inline(always)]
342 pub const fn variant(&self) -> Cinsselect {
343 match self.bits {
344 false => Cinsselect::Masked,
345 true => Cinsselect::Enabled,
346 }
347 }
348 #[doc = "Masked"]
349 #[inline(always)]
350 pub fn is_masked(&self) -> bool {
351 *self == Cinsselect::Masked
352 }
353 #[doc = "Enabled"]
354 #[inline(always)]
355 pub fn is_enabled(&self) -> bool {
356 *self == Cinsselect::Enabled
357 }
358}
359#[doc = "Field `CINS` writer - Card Insertion Status Enable"]
360pub type CinsW<'a, REG> = crate::BitWriter<'a, REG, Cinsselect>;
361impl<'a, REG> CinsW<'a, REG>
362where
363 REG: crate::Writable + crate::RegisterSpec,
364{
365 #[doc = "Masked"]
366 #[inline(always)]
367 pub fn masked(self) -> &'a mut crate::W<REG> {
368 self.variant(Cinsselect::Masked)
369 }
370 #[doc = "Enabled"]
371 #[inline(always)]
372 pub fn enabled(self) -> &'a mut crate::W<REG> {
373 self.variant(Cinsselect::Enabled)
374 }
375}
376#[doc = "Card Removal Status Enable\n\nValue on reset: 0"]
377#[derive(Clone, Copy, Debug, PartialEq, Eq)]
378pub enum Cremselect {
379 #[doc = "0: Masked"]
380 Masked = 0,
381 #[doc = "1: Enabled"]
382 Enabled = 1,
383}
384impl From<Cremselect> for bool {
385 #[inline(always)]
386 fn from(variant: Cremselect) -> Self {
387 variant as u8 != 0
388 }
389}
390#[doc = "Field `CREM` reader - Card Removal Status Enable"]
391pub type CremR = crate::BitReader<Cremselect>;
392impl CremR {
393 #[doc = "Get enumerated values variant"]
394 #[inline(always)]
395 pub const fn variant(&self) -> Cremselect {
396 match self.bits {
397 false => Cremselect::Masked,
398 true => Cremselect::Enabled,
399 }
400 }
401 #[doc = "Masked"]
402 #[inline(always)]
403 pub fn is_masked(&self) -> bool {
404 *self == Cremselect::Masked
405 }
406 #[doc = "Enabled"]
407 #[inline(always)]
408 pub fn is_enabled(&self) -> bool {
409 *self == Cremselect::Enabled
410 }
411}
412#[doc = "Field `CREM` writer - Card Removal Status Enable"]
413pub type CremW<'a, REG> = crate::BitWriter<'a, REG, Cremselect>;
414impl<'a, REG> CremW<'a, REG>
415where
416 REG: crate::Writable + crate::RegisterSpec,
417{
418 #[doc = "Masked"]
419 #[inline(always)]
420 pub fn masked(self) -> &'a mut crate::W<REG> {
421 self.variant(Cremselect::Masked)
422 }
423 #[doc = "Enabled"]
424 #[inline(always)]
425 pub fn enabled(self) -> &'a mut crate::W<REG> {
426 self.variant(Cremselect::Enabled)
427 }
428}
429#[doc = "Card Interrupt Status Enable\n\nValue on reset: 0"]
430#[derive(Clone, Copy, Debug, PartialEq, Eq)]
431pub enum Cintselect {
432 #[doc = "0: Masked"]
433 Masked = 0,
434 #[doc = "1: Enabled"]
435 Enabled = 1,
436}
437impl From<Cintselect> for bool {
438 #[inline(always)]
439 fn from(variant: Cintselect) -> Self {
440 variant as u8 != 0
441 }
442}
443#[doc = "Field `CINT` reader - Card Interrupt Status Enable"]
444pub type CintR = crate::BitReader<Cintselect>;
445impl CintR {
446 #[doc = "Get enumerated values variant"]
447 #[inline(always)]
448 pub const fn variant(&self) -> Cintselect {
449 match self.bits {
450 false => Cintselect::Masked,
451 true => Cintselect::Enabled,
452 }
453 }
454 #[doc = "Masked"]
455 #[inline(always)]
456 pub fn is_masked(&self) -> bool {
457 *self == Cintselect::Masked
458 }
459 #[doc = "Enabled"]
460 #[inline(always)]
461 pub fn is_enabled(&self) -> bool {
462 *self == Cintselect::Enabled
463 }
464}
465#[doc = "Field `CINT` writer - Card Interrupt Status Enable"]
466pub type CintW<'a, REG> = crate::BitWriter<'a, REG, Cintselect>;
467impl<'a, REG> CintW<'a, REG>
468where
469 REG: crate::Writable + crate::RegisterSpec,
470{
471 #[doc = "Masked"]
472 #[inline(always)]
473 pub fn masked(self) -> &'a mut crate::W<REG> {
474 self.variant(Cintselect::Masked)
475 }
476 #[doc = "Enabled"]
477 #[inline(always)]
478 pub fn enabled(self) -> &'a mut crate::W<REG> {
479 self.variant(Cintselect::Enabled)
480 }
481}
482impl R {
483 #[doc = "Bit 0 - Command Complete Status Enable"]
484 #[inline(always)]
485 pub fn cmdc(&self) -> CmdcR {
486 CmdcR::new((self.bits & 1) != 0)
487 }
488 #[doc = "Bit 1 - Transfer Complete Status Enable"]
489 #[inline(always)]
490 pub fn trfc(&self) -> TrfcR {
491 TrfcR::new(((self.bits >> 1) & 1) != 0)
492 }
493 #[doc = "Bit 2 - Block Gap Event Status Enable"]
494 #[inline(always)]
495 pub fn blkge(&self) -> BlkgeR {
496 BlkgeR::new(((self.bits >> 2) & 1) != 0)
497 }
498 #[doc = "Bit 3 - DMA Interrupt Status Enable"]
499 #[inline(always)]
500 pub fn dmaint(&self) -> DmaintR {
501 DmaintR::new(((self.bits >> 3) & 1) != 0)
502 }
503 #[doc = "Bit 4 - Buffer Write Ready Status Enable"]
504 #[inline(always)]
505 pub fn bwrrdy(&self) -> BwrrdyR {
506 BwrrdyR::new(((self.bits >> 4) & 1) != 0)
507 }
508 #[doc = "Bit 5 - Buffer Read Ready Status Enable"]
509 #[inline(always)]
510 pub fn brdrdy(&self) -> BrdrdyR {
511 BrdrdyR::new(((self.bits >> 5) & 1) != 0)
512 }
513 #[doc = "Bit 6 - Card Insertion Status Enable"]
514 #[inline(always)]
515 pub fn cins(&self) -> CinsR {
516 CinsR::new(((self.bits >> 6) & 1) != 0)
517 }
518 #[doc = "Bit 7 - Card Removal Status Enable"]
519 #[inline(always)]
520 pub fn crem(&self) -> CremR {
521 CremR::new(((self.bits >> 7) & 1) != 0)
522 }
523 #[doc = "Bit 8 - Card Interrupt Status Enable"]
524 #[inline(always)]
525 pub fn cint(&self) -> CintR {
526 CintR::new(((self.bits >> 8) & 1) != 0)
527 }
528}
529impl W {
530 #[doc = "Bit 0 - Command Complete Status Enable"]
531 #[inline(always)]
532 #[must_use]
533 pub fn cmdc(&mut self) -> CmdcW<NisterSpec> {
534 CmdcW::new(self, 0)
535 }
536 #[doc = "Bit 1 - Transfer Complete Status Enable"]
537 #[inline(always)]
538 #[must_use]
539 pub fn trfc(&mut self) -> TrfcW<NisterSpec> {
540 TrfcW::new(self, 1)
541 }
542 #[doc = "Bit 2 - Block Gap Event Status Enable"]
543 #[inline(always)]
544 #[must_use]
545 pub fn blkge(&mut self) -> BlkgeW<NisterSpec> {
546 BlkgeW::new(self, 2)
547 }
548 #[doc = "Bit 3 - DMA Interrupt Status Enable"]
549 #[inline(always)]
550 #[must_use]
551 pub fn dmaint(&mut self) -> DmaintW<NisterSpec> {
552 DmaintW::new(self, 3)
553 }
554 #[doc = "Bit 4 - Buffer Write Ready Status Enable"]
555 #[inline(always)]
556 #[must_use]
557 pub fn bwrrdy(&mut self) -> BwrrdyW<NisterSpec> {
558 BwrrdyW::new(self, 4)
559 }
560 #[doc = "Bit 5 - Buffer Read Ready Status Enable"]
561 #[inline(always)]
562 #[must_use]
563 pub fn brdrdy(&mut self) -> BrdrdyW<NisterSpec> {
564 BrdrdyW::new(self, 5)
565 }
566 #[doc = "Bit 6 - Card Insertion Status Enable"]
567 #[inline(always)]
568 #[must_use]
569 pub fn cins(&mut self) -> CinsW<NisterSpec> {
570 CinsW::new(self, 6)
571 }
572 #[doc = "Bit 7 - Card Removal Status Enable"]
573 #[inline(always)]
574 #[must_use]
575 pub fn crem(&mut self) -> CremW<NisterSpec> {
576 CremW::new(self, 7)
577 }
578 #[doc = "Bit 8 - Card Interrupt Status Enable"]
579 #[inline(always)]
580 #[must_use]
581 pub fn cint(&mut self) -> CintW<NisterSpec> {
582 CintW::new(self, 8)
583 }
584}
585#[doc = "Normal Interrupt Status Enable\n\nYou can [`read`](crate::Reg::read) this register and get [`nister::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`nister::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
586pub struct NisterSpec;
587impl crate::RegisterSpec for NisterSpec {
588 type Ux = u16;
589}
590#[doc = "`read()` method returns [`nister::R`](R) reader structure"]
591impl crate::Readable for NisterSpec {}
592#[doc = "`write(|w| ..)` method takes [`nister::W`](W) writer structure"]
593impl crate::Writable for NisterSpec {
594 type Safety = crate::Unsafe;
595 const ZERO_TO_MODIFY_FIELDS_BITMAP: u16 = 0;
596 const ONE_TO_MODIFY_FIELDS_BITMAP: u16 = 0;
597}
598#[doc = "`reset()` method sets NISTER to value 0"]
599impl crate::Resettable for NisterSpec {
600 const RESET_VALUE: u16 = 0;
601}