1pub type R = crate::R<CRrs>;
3pub type W = crate::W<CRrs>;
5#[cfg_attr(feature = "defmt", derive(defmt::Format))]
9#[derive(Clone, Copy, Debug, PartialEq, Eq)]
10pub enum EN {
11 Disabled = 0,
13 Enabled = 1,
15}
16impl From<EN> for bool {
17 #[inline(always)]
18 fn from(variant: EN) -> Self {
19 variant as u8 != 0
20 }
21}
22pub type EN_R = crate::BitReader<EN>;
24impl EN_R {
25 #[inline(always)]
27 pub const fn variant(&self) -> EN {
28 match self.bits {
29 false => EN::Disabled,
30 true => EN::Enabled,
31 }
32 }
33 #[inline(always)]
35 pub fn is_disabled(&self) -> bool {
36 *self == EN::Disabled
37 }
38 #[inline(always)]
40 pub fn is_enabled(&self) -> bool {
41 *self == EN::Enabled
42 }
43}
44pub type EN_W<'a, REG> = crate::BitWriter<'a, REG, EN>;
46impl<'a, REG> EN_W<'a, REG>
47where
48 REG: crate::Writable + crate::RegisterSpec,
49{
50 #[inline(always)]
52 pub fn disabled(self) -> &'a mut crate::W<REG> {
53 self.variant(EN::Disabled)
54 }
55 #[inline(always)]
57 pub fn enabled(self) -> &'a mut crate::W<REG> {
58 self.variant(EN::Enabled)
59 }
60}
61#[cfg_attr(feature = "defmt", derive(defmt::Format))]
65#[derive(Clone, Copy, Debug, PartialEq, Eq)]
66#[repr(u8)]
67pub enum DATATYPE {
68 None = 0,
70 HalfWord = 1,
72 Byte = 2,
74 Bit = 3,
76}
77impl From<DATATYPE> for u8 {
78 #[inline(always)]
79 fn from(variant: DATATYPE) -> Self {
80 variant as _
81 }
82}
83impl crate::FieldSpec for DATATYPE {
84 type Ux = u8;
85}
86impl crate::IsEnum for DATATYPE {}
87pub type DATATYPE_R = crate::FieldReader<DATATYPE>;
89impl DATATYPE_R {
90 #[inline(always)]
92 pub const fn variant(&self) -> DATATYPE {
93 match self.bits {
94 0 => DATATYPE::None,
95 1 => DATATYPE::HalfWord,
96 2 => DATATYPE::Byte,
97 3 => DATATYPE::Bit,
98 _ => unreachable!(),
99 }
100 }
101 #[inline(always)]
103 pub fn is_none(&self) -> bool {
104 *self == DATATYPE::None
105 }
106 #[inline(always)]
108 pub fn is_half_word(&self) -> bool {
109 *self == DATATYPE::HalfWord
110 }
111 #[inline(always)]
113 pub fn is_byte(&self) -> bool {
114 *self == DATATYPE::Byte
115 }
116 #[inline(always)]
118 pub fn is_bit(&self) -> bool {
119 *self == DATATYPE::Bit
120 }
121}
122pub type DATATYPE_W<'a, REG> = crate::FieldWriter<'a, REG, 2, DATATYPE, crate::Safe>;
124impl<'a, REG> DATATYPE_W<'a, REG>
125where
126 REG: crate::Writable + crate::RegisterSpec,
127 REG::Ux: From<u8>,
128{
129 #[inline(always)]
131 pub fn none(self) -> &'a mut crate::W<REG> {
132 self.variant(DATATYPE::None)
133 }
134 #[inline(always)]
136 pub fn half_word(self) -> &'a mut crate::W<REG> {
137 self.variant(DATATYPE::HalfWord)
138 }
139 #[inline(always)]
141 pub fn byte(self) -> &'a mut crate::W<REG> {
142 self.variant(DATATYPE::Byte)
143 }
144 #[inline(always)]
146 pub fn bit_(self) -> &'a mut crate::W<REG> {
147 self.variant(DATATYPE::Bit)
148 }
149}
150#[cfg_attr(feature = "defmt", derive(defmt::Format))]
154#[derive(Clone, Copy, Debug, PartialEq, Eq)]
155#[repr(u8)]
156pub enum MODE {
157 Mode1 = 0,
159 Mode2 = 1,
161 Mode3 = 2,
163 Mode4 = 3,
165}
166impl From<MODE> for u8 {
167 #[inline(always)]
168 fn from(variant: MODE) -> Self {
169 variant as _
170 }
171}
172impl crate::FieldSpec for MODE {
173 type Ux = u8;
174}
175impl crate::IsEnum for MODE {}
176pub type MODE_R = crate::FieldReader<MODE>;
178impl MODE_R {
179 #[inline(always)]
181 pub const fn variant(&self) -> MODE {
182 match self.bits {
183 0 => MODE::Mode1,
184 1 => MODE::Mode2,
185 2 => MODE::Mode3,
186 3 => MODE::Mode4,
187 _ => unreachable!(),
188 }
189 }
190 #[inline(always)]
192 pub fn is_mode1(&self) -> bool {
193 *self == MODE::Mode1
194 }
195 #[inline(always)]
197 pub fn is_mode2(&self) -> bool {
198 *self == MODE::Mode2
199 }
200 #[inline(always)]
202 pub fn is_mode3(&self) -> bool {
203 *self == MODE::Mode3
204 }
205 #[inline(always)]
207 pub fn is_mode4(&self) -> bool {
208 *self == MODE::Mode4
209 }
210}
211pub type MODE_W<'a, REG> = crate::FieldWriter<'a, REG, 2, MODE, crate::Safe>;
213impl<'a, REG> MODE_W<'a, REG>
214where
215 REG: crate::Writable + crate::RegisterSpec,
216 REG::Ux: From<u8>,
217{
218 #[inline(always)]
220 pub fn mode1(self) -> &'a mut crate::W<REG> {
221 self.variant(MODE::Mode1)
222 }
223 #[inline(always)]
225 pub fn mode2(self) -> &'a mut crate::W<REG> {
226 self.variant(MODE::Mode2)
227 }
228 #[inline(always)]
230 pub fn mode3(self) -> &'a mut crate::W<REG> {
231 self.variant(MODE::Mode3)
232 }
233 #[inline(always)]
235 pub fn mode4(self) -> &'a mut crate::W<REG> {
236 self.variant(MODE::Mode4)
237 }
238}
239#[cfg_attr(feature = "defmt", derive(defmt::Format))]
243#[derive(Clone, Copy, Debug, PartialEq, Eq)]
244#[repr(u8)]
245pub enum CHMOD10 {
246 Ecb = 0,
248 Cbc = 1,
250 Ctr = 2,
252 Gcm = 3,
254}
255impl From<CHMOD10> for u8 {
256 #[inline(always)]
257 fn from(variant: CHMOD10) -> Self {
258 variant as _
259 }
260}
261impl crate::FieldSpec for CHMOD10 {
262 type Ux = u8;
263}
264impl crate::IsEnum for CHMOD10 {}
265pub type CHMOD10_R = crate::FieldReader<CHMOD10>;
267impl CHMOD10_R {
268 #[inline(always)]
270 pub const fn variant(&self) -> CHMOD10 {
271 match self.bits {
272 0 => CHMOD10::Ecb,
273 1 => CHMOD10::Cbc,
274 2 => CHMOD10::Ctr,
275 3 => CHMOD10::Gcm,
276 _ => unreachable!(),
277 }
278 }
279 #[inline(always)]
281 pub fn is_ecb(&self) -> bool {
282 *self == CHMOD10::Ecb
283 }
284 #[inline(always)]
286 pub fn is_cbc(&self) -> bool {
287 *self == CHMOD10::Cbc
288 }
289 #[inline(always)]
291 pub fn is_ctr(&self) -> bool {
292 *self == CHMOD10::Ctr
293 }
294 #[inline(always)]
296 pub fn is_gcm(&self) -> bool {
297 *self == CHMOD10::Gcm
298 }
299}
300pub type CHMOD10_W<'a, REG> = crate::FieldWriter<'a, REG, 2, CHMOD10, crate::Safe>;
302impl<'a, REG> CHMOD10_W<'a, REG>
303where
304 REG: crate::Writable + crate::RegisterSpec,
305 REG::Ux: From<u8>,
306{
307 #[inline(always)]
309 pub fn ecb(self) -> &'a mut crate::W<REG> {
310 self.variant(CHMOD10::Ecb)
311 }
312 #[inline(always)]
314 pub fn cbc(self) -> &'a mut crate::W<REG> {
315 self.variant(CHMOD10::Cbc)
316 }
317 #[inline(always)]
319 pub fn ctr(self) -> &'a mut crate::W<REG> {
320 self.variant(CHMOD10::Ctr)
321 }
322 #[inline(always)]
324 pub fn gcm(self) -> &'a mut crate::W<REG> {
325 self.variant(CHMOD10::Gcm)
326 }
327}
328#[cfg_attr(feature = "defmt", derive(defmt::Format))]
332#[derive(Clone, Copy, Debug, PartialEq, Eq)]
333pub enum CCFCW {
334 Clear = 1,
336}
337impl From<CCFCW> for bool {
338 #[inline(always)]
339 fn from(variant: CCFCW) -> Self {
340 variant as u8 != 0
341 }
342}
343pub type CCFC_R = crate::BitReader<CCFCW>;
345impl CCFC_R {
346 #[inline(always)]
348 pub const fn variant(&self) -> Option<CCFCW> {
349 match self.bits {
350 true => Some(CCFCW::Clear),
351 _ => None,
352 }
353 }
354 #[inline(always)]
356 pub fn is_clear(&self) -> bool {
357 *self == CCFCW::Clear
358 }
359}
360pub type CCFC_W<'a, REG> = crate::BitWriter<'a, REG, CCFCW>;
362impl<'a, REG> CCFC_W<'a, REG>
363where
364 REG: crate::Writable + crate::RegisterSpec,
365{
366 #[inline(always)]
368 pub fn clear(self) -> &'a mut crate::W<REG> {
369 self.variant(CCFCW::Clear)
370 }
371}
372#[cfg_attr(feature = "defmt", derive(defmt::Format))]
376#[derive(Clone, Copy, Debug, PartialEq, Eq)]
377pub enum ERRCW {
378 Clear = 1,
380}
381impl From<ERRCW> for bool {
382 #[inline(always)]
383 fn from(variant: ERRCW) -> Self {
384 variant as u8 != 0
385 }
386}
387pub type ERRC_R = crate::BitReader<ERRCW>;
389impl ERRC_R {
390 #[inline(always)]
392 pub const fn variant(&self) -> Option<ERRCW> {
393 match self.bits {
394 true => Some(ERRCW::Clear),
395 _ => None,
396 }
397 }
398 #[inline(always)]
400 pub fn is_clear(&self) -> bool {
401 *self == ERRCW::Clear
402 }
403}
404pub type ERRC_W<'a, REG> = crate::BitWriter<'a, REG, ERRCW>;
406impl<'a, REG> ERRC_W<'a, REG>
407where
408 REG: crate::Writable + crate::RegisterSpec,
409{
410 #[inline(always)]
412 pub fn clear(self) -> &'a mut crate::W<REG> {
413 self.variant(ERRCW::Clear)
414 }
415}
416#[cfg_attr(feature = "defmt", derive(defmt::Format))]
420#[derive(Clone, Copy, Debug, PartialEq, Eq)]
421pub enum CCFIE {
422 Disabled = 0,
424 Enabled = 1,
426}
427impl From<CCFIE> for bool {
428 #[inline(always)]
429 fn from(variant: CCFIE) -> Self {
430 variant as u8 != 0
431 }
432}
433pub type CCFIE_R = crate::BitReader<CCFIE>;
435impl CCFIE_R {
436 #[inline(always)]
438 pub const fn variant(&self) -> CCFIE {
439 match self.bits {
440 false => CCFIE::Disabled,
441 true => CCFIE::Enabled,
442 }
443 }
444 #[inline(always)]
446 pub fn is_disabled(&self) -> bool {
447 *self == CCFIE::Disabled
448 }
449 #[inline(always)]
451 pub fn is_enabled(&self) -> bool {
452 *self == CCFIE::Enabled
453 }
454}
455pub type CCFIE_W<'a, REG> = crate::BitWriter<'a, REG, CCFIE>;
457impl<'a, REG> CCFIE_W<'a, REG>
458where
459 REG: crate::Writable + crate::RegisterSpec,
460{
461 #[inline(always)]
463 pub fn disabled(self) -> &'a mut crate::W<REG> {
464 self.variant(CCFIE::Disabled)
465 }
466 #[inline(always)]
468 pub fn enabled(self) -> &'a mut crate::W<REG> {
469 self.variant(CCFIE::Enabled)
470 }
471}
472#[cfg_attr(feature = "defmt", derive(defmt::Format))]
476#[derive(Clone, Copy, Debug, PartialEq, Eq)]
477pub enum ERRIE {
478 Disabled = 0,
480 Enabled = 1,
482}
483impl From<ERRIE> for bool {
484 #[inline(always)]
485 fn from(variant: ERRIE) -> Self {
486 variant as u8 != 0
487 }
488}
489pub type ERRIE_R = crate::BitReader<ERRIE>;
491impl ERRIE_R {
492 #[inline(always)]
494 pub const fn variant(&self) -> ERRIE {
495 match self.bits {
496 false => ERRIE::Disabled,
497 true => ERRIE::Enabled,
498 }
499 }
500 #[inline(always)]
502 pub fn is_disabled(&self) -> bool {
503 *self == ERRIE::Disabled
504 }
505 #[inline(always)]
507 pub fn is_enabled(&self) -> bool {
508 *self == ERRIE::Enabled
509 }
510}
511pub type ERRIE_W<'a, REG> = crate::BitWriter<'a, REG, ERRIE>;
513impl<'a, REG> ERRIE_W<'a, REG>
514where
515 REG: crate::Writable + crate::RegisterSpec,
516{
517 #[inline(always)]
519 pub fn disabled(self) -> &'a mut crate::W<REG> {
520 self.variant(ERRIE::Disabled)
521 }
522 #[inline(always)]
524 pub fn enabled(self) -> &'a mut crate::W<REG> {
525 self.variant(ERRIE::Enabled)
526 }
527}
528#[cfg_attr(feature = "defmt", derive(defmt::Format))]
532#[derive(Clone, Copy, Debug, PartialEq, Eq)]
533pub enum DMAINEN {
534 Disabled = 0,
536 Enabled = 1,
538}
539impl From<DMAINEN> for bool {
540 #[inline(always)]
541 fn from(variant: DMAINEN) -> Self {
542 variant as u8 != 0
543 }
544}
545pub type DMAINEN_R = crate::BitReader<DMAINEN>;
547impl DMAINEN_R {
548 #[inline(always)]
550 pub const fn variant(&self) -> DMAINEN {
551 match self.bits {
552 false => DMAINEN::Disabled,
553 true => DMAINEN::Enabled,
554 }
555 }
556 #[inline(always)]
558 pub fn is_disabled(&self) -> bool {
559 *self == DMAINEN::Disabled
560 }
561 #[inline(always)]
563 pub fn is_enabled(&self) -> bool {
564 *self == DMAINEN::Enabled
565 }
566}
567pub type DMAINEN_W<'a, REG> = crate::BitWriter<'a, REG, DMAINEN>;
569impl<'a, REG> DMAINEN_W<'a, REG>
570where
571 REG: crate::Writable + crate::RegisterSpec,
572{
573 #[inline(always)]
575 pub fn disabled(self) -> &'a mut crate::W<REG> {
576 self.variant(DMAINEN::Disabled)
577 }
578 #[inline(always)]
580 pub fn enabled(self) -> &'a mut crate::W<REG> {
581 self.variant(DMAINEN::Enabled)
582 }
583}
584#[cfg_attr(feature = "defmt", derive(defmt::Format))]
588#[derive(Clone, Copy, Debug, PartialEq, Eq)]
589pub enum DMAOUTEN {
590 Disabled = 0,
592 Enabled = 1,
594}
595impl From<DMAOUTEN> for bool {
596 #[inline(always)]
597 fn from(variant: DMAOUTEN) -> Self {
598 variant as u8 != 0
599 }
600}
601pub type DMAOUTEN_R = crate::BitReader<DMAOUTEN>;
603impl DMAOUTEN_R {
604 #[inline(always)]
606 pub const fn variant(&self) -> DMAOUTEN {
607 match self.bits {
608 false => DMAOUTEN::Disabled,
609 true => DMAOUTEN::Enabled,
610 }
611 }
612 #[inline(always)]
614 pub fn is_disabled(&self) -> bool {
615 *self == DMAOUTEN::Disabled
616 }
617 #[inline(always)]
619 pub fn is_enabled(&self) -> bool {
620 *self == DMAOUTEN::Enabled
621 }
622}
623pub type DMAOUTEN_W<'a, REG> = crate::BitWriter<'a, REG, DMAOUTEN>;
625impl<'a, REG> DMAOUTEN_W<'a, REG>
626where
627 REG: crate::Writable + crate::RegisterSpec,
628{
629 #[inline(always)]
631 pub fn disabled(self) -> &'a mut crate::W<REG> {
632 self.variant(DMAOUTEN::Disabled)
633 }
634 #[inline(always)]
636 pub fn enabled(self) -> &'a mut crate::W<REG> {
637 self.variant(DMAOUTEN::Enabled)
638 }
639}
640#[cfg_attr(feature = "defmt", derive(defmt::Format))]
644#[derive(Clone, Copy, Debug, PartialEq, Eq)]
645#[repr(u8)]
646pub enum GCMPH {
647 Init = 0,
649 Header = 1,
651 Payload = 2,
653 Final = 3,
655}
656impl From<GCMPH> for u8 {
657 #[inline(always)]
658 fn from(variant: GCMPH) -> Self {
659 variant as _
660 }
661}
662impl crate::FieldSpec for GCMPH {
663 type Ux = u8;
664}
665impl crate::IsEnum for GCMPH {}
666pub type GCMPH_R = crate::FieldReader<GCMPH>;
668impl GCMPH_R {
669 #[inline(always)]
671 pub const fn variant(&self) -> GCMPH {
672 match self.bits {
673 0 => GCMPH::Init,
674 1 => GCMPH::Header,
675 2 => GCMPH::Payload,
676 3 => GCMPH::Final,
677 _ => unreachable!(),
678 }
679 }
680 #[inline(always)]
682 pub fn is_init(&self) -> bool {
683 *self == GCMPH::Init
684 }
685 #[inline(always)]
687 pub fn is_header(&self) -> bool {
688 *self == GCMPH::Header
689 }
690 #[inline(always)]
692 pub fn is_payload(&self) -> bool {
693 *self == GCMPH::Payload
694 }
695 #[inline(always)]
697 pub fn is_final(&self) -> bool {
698 *self == GCMPH::Final
699 }
700}
701pub type GCMPH_W<'a, REG> = crate::FieldWriter<'a, REG, 2, GCMPH, crate::Safe>;
703impl<'a, REG> GCMPH_W<'a, REG>
704where
705 REG: crate::Writable + crate::RegisterSpec,
706 REG::Ux: From<u8>,
707{
708 #[inline(always)]
710 pub fn init(self) -> &'a mut crate::W<REG> {
711 self.variant(GCMPH::Init)
712 }
713 #[inline(always)]
715 pub fn header(self) -> &'a mut crate::W<REG> {
716 self.variant(GCMPH::Header)
717 }
718 #[inline(always)]
720 pub fn payload(self) -> &'a mut crate::W<REG> {
721 self.variant(GCMPH::Payload)
722 }
723 #[inline(always)]
725 pub fn final_(self) -> &'a mut crate::W<REG> {
726 self.variant(GCMPH::Final)
727 }
728}
729#[cfg_attr(feature = "defmt", derive(defmt::Format))]
733#[derive(Clone, Copy, Debug, PartialEq, Eq)]
734pub enum CHMOD2 {
735 Chmod = 0,
737 Ccm = 1,
739}
740impl From<CHMOD2> for bool {
741 #[inline(always)]
742 fn from(variant: CHMOD2) -> Self {
743 variant as u8 != 0
744 }
745}
746pub type CHMOD2_R = crate::BitReader<CHMOD2>;
748impl CHMOD2_R {
749 #[inline(always)]
751 pub const fn variant(&self) -> CHMOD2 {
752 match self.bits {
753 false => CHMOD2::Chmod,
754 true => CHMOD2::Ccm,
755 }
756 }
757 #[inline(always)]
759 pub fn is_chmod(&self) -> bool {
760 *self == CHMOD2::Chmod
761 }
762 #[inline(always)]
764 pub fn is_ccm(&self) -> bool {
765 *self == CHMOD2::Ccm
766 }
767}
768pub type CHMOD2_W<'a, REG> = crate::BitWriter<'a, REG, CHMOD2>;
770impl<'a, REG> CHMOD2_W<'a, REG>
771where
772 REG: crate::Writable + crate::RegisterSpec,
773{
774 #[inline(always)]
776 pub fn chmod(self) -> &'a mut crate::W<REG> {
777 self.variant(CHMOD2::Chmod)
778 }
779 #[inline(always)]
781 pub fn ccm(self) -> &'a mut crate::W<REG> {
782 self.variant(CHMOD2::Ccm)
783 }
784}
785#[cfg_attr(feature = "defmt", derive(defmt::Format))]
789#[derive(Clone, Copy, Debug, PartialEq, Eq)]
790pub enum KEYSIZE {
791 Aes128 = 0,
793 Aes256 = 1,
795}
796impl From<KEYSIZE> for bool {
797 #[inline(always)]
798 fn from(variant: KEYSIZE) -> Self {
799 variant as u8 != 0
800 }
801}
802pub type KEYSIZE_R = crate::BitReader<KEYSIZE>;
804impl KEYSIZE_R {
805 #[inline(always)]
807 pub const fn variant(&self) -> KEYSIZE {
808 match self.bits {
809 false => KEYSIZE::Aes128,
810 true => KEYSIZE::Aes256,
811 }
812 }
813 #[inline(always)]
815 pub fn is_aes128(&self) -> bool {
816 *self == KEYSIZE::Aes128
817 }
818 #[inline(always)]
820 pub fn is_aes256(&self) -> bool {
821 *self == KEYSIZE::Aes256
822 }
823}
824pub type KEYSIZE_W<'a, REG> = crate::BitWriter<'a, REG, KEYSIZE>;
826impl<'a, REG> KEYSIZE_W<'a, REG>
827where
828 REG: crate::Writable + crate::RegisterSpec,
829{
830 #[inline(always)]
832 pub fn aes128(self) -> &'a mut crate::W<REG> {
833 self.variant(KEYSIZE::Aes128)
834 }
835 #[inline(always)]
837 pub fn aes256(self) -> &'a mut crate::W<REG> {
838 self.variant(KEYSIZE::Aes256)
839 }
840}
841pub type NPBLB_R = crate::FieldReader;
843pub type NPBLB_W<'a, REG> = crate::FieldWriter<'a, REG, 4, u8, crate::Safe>;
845impl R {
846 #[inline(always)]
848 pub fn en(&self) -> EN_R {
849 EN_R::new((self.bits & 1) != 0)
850 }
851 #[inline(always)]
853 pub fn datatype(&self) -> DATATYPE_R {
854 DATATYPE_R::new(((self.bits >> 1) & 3) as u8)
855 }
856 #[inline(always)]
858 pub fn mode(&self) -> MODE_R {
859 MODE_R::new(((self.bits >> 3) & 3) as u8)
860 }
861 #[inline(always)]
863 pub fn chmod10(&self) -> CHMOD10_R {
864 CHMOD10_R::new(((self.bits >> 5) & 3) as u8)
865 }
866 #[inline(always)]
868 pub fn ccfc(&self) -> CCFC_R {
869 CCFC_R::new(((self.bits >> 7) & 1) != 0)
870 }
871 #[inline(always)]
873 pub fn errc(&self) -> ERRC_R {
874 ERRC_R::new(((self.bits >> 8) & 1) != 0)
875 }
876 #[inline(always)]
878 pub fn ccfie(&self) -> CCFIE_R {
879 CCFIE_R::new(((self.bits >> 9) & 1) != 0)
880 }
881 #[inline(always)]
883 pub fn errie(&self) -> ERRIE_R {
884 ERRIE_R::new(((self.bits >> 10) & 1) != 0)
885 }
886 #[inline(always)]
888 pub fn dmainen(&self) -> DMAINEN_R {
889 DMAINEN_R::new(((self.bits >> 11) & 1) != 0)
890 }
891 #[inline(always)]
893 pub fn dmaouten(&self) -> DMAOUTEN_R {
894 DMAOUTEN_R::new(((self.bits >> 12) & 1) != 0)
895 }
896 #[inline(always)]
898 pub fn gcmph(&self) -> GCMPH_R {
899 GCMPH_R::new(((self.bits >> 13) & 3) as u8)
900 }
901 #[inline(always)]
903 pub fn chmod2(&self) -> CHMOD2_R {
904 CHMOD2_R::new(((self.bits >> 16) & 1) != 0)
905 }
906 #[inline(always)]
908 pub fn keysize(&self) -> KEYSIZE_R {
909 KEYSIZE_R::new(((self.bits >> 18) & 1) != 0)
910 }
911 #[inline(always)]
913 pub fn npblb(&self) -> NPBLB_R {
914 NPBLB_R::new(((self.bits >> 20) & 0x0f) as u8)
915 }
916}
917impl core::fmt::Debug for R {
918 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
919 f.debug_struct("CR")
920 .field("npblb", &self.npblb())
921 .field("keysize", &self.keysize())
922 .field("chmod2", &self.chmod2())
923 .field("gcmph", &self.gcmph())
924 .field("dmaouten", &self.dmaouten())
925 .field("dmainen", &self.dmainen())
926 .field("errie", &self.errie())
927 .field("ccfie", &self.ccfie())
928 .field("errc", &self.errc())
929 .field("ccfc", &self.ccfc())
930 .field("chmod10", &self.chmod10())
931 .field("mode", &self.mode())
932 .field("datatype", &self.datatype())
933 .field("en", &self.en())
934 .finish()
935 }
936}
937impl W {
938 #[inline(always)]
940 pub fn en(&mut self) -> EN_W<CRrs> {
941 EN_W::new(self, 0)
942 }
943 #[inline(always)]
945 pub fn datatype(&mut self) -> DATATYPE_W<CRrs> {
946 DATATYPE_W::new(self, 1)
947 }
948 #[inline(always)]
950 pub fn mode(&mut self) -> MODE_W<CRrs> {
951 MODE_W::new(self, 3)
952 }
953 #[inline(always)]
955 pub fn chmod10(&mut self) -> CHMOD10_W<CRrs> {
956 CHMOD10_W::new(self, 5)
957 }
958 #[inline(always)]
960 pub fn ccfc(&mut self) -> CCFC_W<CRrs> {
961 CCFC_W::new(self, 7)
962 }
963 #[inline(always)]
965 pub fn errc(&mut self) -> ERRC_W<CRrs> {
966 ERRC_W::new(self, 8)
967 }
968 #[inline(always)]
970 pub fn ccfie(&mut self) -> CCFIE_W<CRrs> {
971 CCFIE_W::new(self, 9)
972 }
973 #[inline(always)]
975 pub fn errie(&mut self) -> ERRIE_W<CRrs> {
976 ERRIE_W::new(self, 10)
977 }
978 #[inline(always)]
980 pub fn dmainen(&mut self) -> DMAINEN_W<CRrs> {
981 DMAINEN_W::new(self, 11)
982 }
983 #[inline(always)]
985 pub fn dmaouten(&mut self) -> DMAOUTEN_W<CRrs> {
986 DMAOUTEN_W::new(self, 12)
987 }
988 #[inline(always)]
990 pub fn gcmph(&mut self) -> GCMPH_W<CRrs> {
991 GCMPH_W::new(self, 13)
992 }
993 #[inline(always)]
995 pub fn chmod2(&mut self) -> CHMOD2_W<CRrs> {
996 CHMOD2_W::new(self, 16)
997 }
998 #[inline(always)]
1000 pub fn keysize(&mut self) -> KEYSIZE_W<CRrs> {
1001 KEYSIZE_W::new(self, 18)
1002 }
1003 #[inline(always)]
1005 pub fn npblb(&mut self) -> NPBLB_W<CRrs> {
1006 NPBLB_W::new(self, 20)
1007 }
1008}
1009pub struct CRrs;
1015impl crate::RegisterSpec for CRrs {
1016 type Ux = u32;
1017}
1018impl crate::Readable for CRrs {}
1020impl crate::Writable for CRrs {
1022 type Safety = crate::Unsafe;
1023}
1024impl crate::Resettable for CRrs {}