1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
#[doc = "Register `AESACTL0` reader"]
pub struct R(crate::R<AESACTL0_SPEC>);
impl core::ops::Deref for R {
    type Target = crate::R<AESACTL0_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl From<crate::R<AESACTL0_SPEC>> for R {
    #[inline(always)]
    fn from(reader: crate::R<AESACTL0_SPEC>) -> Self {
        R(reader)
    }
}
#[doc = "Register `AESACTL0` writer"]
pub struct W(crate::W<AESACTL0_SPEC>);
impl core::ops::Deref for W {
    type Target = crate::W<AESACTL0_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl core::ops::DerefMut for W {
    #[inline(always)]
    fn deref_mut(&mut self) -> &mut Self::Target {
        &mut self.0
    }
}
impl From<crate::W<AESACTL0_SPEC>> for W {
    #[inline(always)]
    fn from(writer: crate::W<AESACTL0_SPEC>) -> Self {
        W(writer)
    }
}
#[doc = "AES operation\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum AESOPX_A {
    #[doc = "0: Encryption"]
    AESOPX_0 = 0,
    #[doc = "1: Decryption. The provided key is the same key used for encryption"]
    AESOPX_1 = 1,
    #[doc = "2: Generate first round key required for decryption"]
    AESOPX_2 = 2,
    #[doc = "3: Decryption. The provided key is the first round key required for decryption"]
    AESOPX_3 = 3,
}
impl From<AESOPX_A> for u8 {
    #[inline(always)]
    fn from(variant: AESOPX_A) -> Self {
        variant as _
    }
}
#[doc = "Field `AESOPx` reader - AES operation"]
pub type AESOPX_R = crate::FieldReader<u8, AESOPX_A>;
impl AESOPX_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> AESOPX_A {
        match self.bits {
            0 => AESOPX_A::AESOPX_0,
            1 => AESOPX_A::AESOPX_1,
            2 => AESOPX_A::AESOPX_2,
            3 => AESOPX_A::AESOPX_3,
            _ => unreachable!(),
        }
    }
    #[doc = "Checks if the value of the field is `AESOPX_0`"]
    #[inline(always)]
    pub fn is_aesopx_0(&self) -> bool {
        *self == AESOPX_A::AESOPX_0
    }
    #[doc = "Checks if the value of the field is `AESOPX_1`"]
    #[inline(always)]
    pub fn is_aesopx_1(&self) -> bool {
        *self == AESOPX_A::AESOPX_1
    }
    #[doc = "Checks if the value of the field is `AESOPX_2`"]
    #[inline(always)]
    pub fn is_aesopx_2(&self) -> bool {
        *self == AESOPX_A::AESOPX_2
    }
    #[doc = "Checks if the value of the field is `AESOPX_3`"]
    #[inline(always)]
    pub fn is_aesopx_3(&self) -> bool {
        *self == AESOPX_A::AESOPX_3
    }
}
#[doc = "Field `AESOPx` writer - AES operation"]
pub type AESOPX_W<'a, const O: u8> =
    crate::FieldWriterSafe<'a, u16, AESACTL0_SPEC, u8, AESOPX_A, 2, O>;
impl<'a, const O: u8> AESOPX_W<'a, O> {
    #[doc = "Encryption"]
    #[inline(always)]
    pub fn aesopx_0(self) -> &'a mut W {
        self.variant(AESOPX_A::AESOPX_0)
    }
    #[doc = "Decryption. The provided key is the same key used for encryption"]
    #[inline(always)]
    pub fn aesopx_1(self) -> &'a mut W {
        self.variant(AESOPX_A::AESOPX_1)
    }
    #[doc = "Generate first round key required for decryption"]
    #[inline(always)]
    pub fn aesopx_2(self) -> &'a mut W {
        self.variant(AESOPX_A::AESOPX_2)
    }
    #[doc = "Decryption. The provided key is the first round key required for decryption"]
    #[inline(always)]
    pub fn aesopx_3(self) -> &'a mut W {
        self.variant(AESOPX_A::AESOPX_3)
    }
}
#[doc = "AES key length\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum AESKLX_A {
    #[doc = "0: AES128. The key size is 128 bit"]
    AESKLX_0 = 0,
    #[doc = "1: AES192. The key size is 192 bit."]
    AESKLX_1 = 1,
    #[doc = "2: AES256. The key size is 256 bit"]
    AESKLX_2 = 2,
}
impl From<AESKLX_A> for u8 {
    #[inline(always)]
    fn from(variant: AESKLX_A) -> Self {
        variant as _
    }
}
#[doc = "Field `AESKLx` reader - AES key length"]
pub type AESKLX_R = crate::FieldReader<u8, AESKLX_A>;
impl AESKLX_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> Option<AESKLX_A> {
        match self.bits {
            0 => Some(AESKLX_A::AESKLX_0),
            1 => Some(AESKLX_A::AESKLX_1),
            2 => Some(AESKLX_A::AESKLX_2),
            _ => None,
        }
    }
    #[doc = "Checks if the value of the field is `AESKLX_0`"]
    #[inline(always)]
    pub fn is_aesklx_0(&self) -> bool {
        *self == AESKLX_A::AESKLX_0
    }
    #[doc = "Checks if the value of the field is `AESKLX_1`"]
    #[inline(always)]
    pub fn is_aesklx_1(&self) -> bool {
        *self == AESKLX_A::AESKLX_1
    }
    #[doc = "Checks if the value of the field is `AESKLX_2`"]
    #[inline(always)]
    pub fn is_aesklx_2(&self) -> bool {
        *self == AESKLX_A::AESKLX_2
    }
}
#[doc = "Field `AESKLx` writer - AES key length"]
pub type AESKLX_W<'a, const O: u8> = crate::FieldWriter<'a, u16, AESACTL0_SPEC, u8, AESKLX_A, 2, O>;
impl<'a, const O: u8> AESKLX_W<'a, O> {
    #[doc = "AES128. The key size is 128 bit"]
    #[inline(always)]
    pub fn aesklx_0(self) -> &'a mut W {
        self.variant(AESKLX_A::AESKLX_0)
    }
    #[doc = "AES192. The key size is 192 bit."]
    #[inline(always)]
    pub fn aesklx_1(self) -> &'a mut W {
        self.variant(AESKLX_A::AESKLX_1)
    }
    #[doc = "AES256. The key size is 256 bit"]
    #[inline(always)]
    pub fn aesklx_2(self) -> &'a mut W {
        self.variant(AESKLX_A::AESKLX_2)
    }
}
#[doc = "AES cipher mode select\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum AESCMX_A {
    #[doc = "0: ECB"]
    AESCMX_0 = 0,
    #[doc = "1: CBC"]
    AESCMX_1 = 1,
    #[doc = "2: OFB"]
    AESCMX_2 = 2,
    #[doc = "3: CFB"]
    AESCMX_3 = 3,
}
impl From<AESCMX_A> for u8 {
    #[inline(always)]
    fn from(variant: AESCMX_A) -> Self {
        variant as _
    }
}
#[doc = "Field `AESCMx` reader - AES cipher mode select"]
pub type AESCMX_R = crate::FieldReader<u8, AESCMX_A>;
impl AESCMX_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> AESCMX_A {
        match self.bits {
            0 => AESCMX_A::AESCMX_0,
            1 => AESCMX_A::AESCMX_1,
            2 => AESCMX_A::AESCMX_2,
            3 => AESCMX_A::AESCMX_3,
            _ => unreachable!(),
        }
    }
    #[doc = "Checks if the value of the field is `AESCMX_0`"]
    #[inline(always)]
    pub fn is_aescmx_0(&self) -> bool {
        *self == AESCMX_A::AESCMX_0
    }
    #[doc = "Checks if the value of the field is `AESCMX_1`"]
    #[inline(always)]
    pub fn is_aescmx_1(&self) -> bool {
        *self == AESCMX_A::AESCMX_1
    }
    #[doc = "Checks if the value of the field is `AESCMX_2`"]
    #[inline(always)]
    pub fn is_aescmx_2(&self) -> bool {
        *self == AESCMX_A::AESCMX_2
    }
    #[doc = "Checks if the value of the field is `AESCMX_3`"]
    #[inline(always)]
    pub fn is_aescmx_3(&self) -> bool {
        *self == AESCMX_A::AESCMX_3
    }
}
#[doc = "Field `AESCMx` writer - AES cipher mode select"]
pub type AESCMX_W<'a, const O: u8> =
    crate::FieldWriterSafe<'a, u16, AESACTL0_SPEC, u8, AESCMX_A, 2, O>;
impl<'a, const O: u8> AESCMX_W<'a, O> {
    #[doc = "ECB"]
    #[inline(always)]
    pub fn aescmx_0(self) -> &'a mut W {
        self.variant(AESCMX_A::AESCMX_0)
    }
    #[doc = "CBC"]
    #[inline(always)]
    pub fn aescmx_1(self) -> &'a mut W {
        self.variant(AESCMX_A::AESCMX_1)
    }
    #[doc = "OFB"]
    #[inline(always)]
    pub fn aescmx_2(self) -> &'a mut W {
        self.variant(AESCMX_A::AESCMX_2)
    }
    #[doc = "CFB"]
    #[inline(always)]
    pub fn aescmx_3(self) -> &'a mut W {
        self.variant(AESCMX_A::AESCMX_3)
    }
}
#[doc = "AES software reset\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum AESSWRST_A {
    #[doc = "0: No reset"]
    AESSWRST_0 = 0,
    #[doc = "1: Reset AES accelerator module"]
    AESSWRST_1 = 1,
}
impl From<AESSWRST_A> for bool {
    #[inline(always)]
    fn from(variant: AESSWRST_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `AESSWRST` reader - AES software reset"]
pub type AESSWRST_R = crate::BitReader<AESSWRST_A>;
impl AESSWRST_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> AESSWRST_A {
        match self.bits {
            false => AESSWRST_A::AESSWRST_0,
            true => AESSWRST_A::AESSWRST_1,
        }
    }
    #[doc = "Checks if the value of the field is `AESSWRST_0`"]
    #[inline(always)]
    pub fn is_aesswrst_0(&self) -> bool {
        *self == AESSWRST_A::AESSWRST_0
    }
    #[doc = "Checks if the value of the field is `AESSWRST_1`"]
    #[inline(always)]
    pub fn is_aesswrst_1(&self) -> bool {
        *self == AESSWRST_A::AESSWRST_1
    }
}
#[doc = "Field `AESSWRST` writer - AES software reset"]
pub type AESSWRST_W<'a, const O: u8> = crate::BitWriter<'a, u16, AESACTL0_SPEC, AESSWRST_A, O>;
impl<'a, const O: u8> AESSWRST_W<'a, O> {
    #[doc = "No reset"]
    #[inline(always)]
    pub fn aesswrst_0(self) -> &'a mut W {
        self.variant(AESSWRST_A::AESSWRST_0)
    }
    #[doc = "Reset AES accelerator module"]
    #[inline(always)]
    pub fn aesswrst_1(self) -> &'a mut W {
        self.variant(AESSWRST_A::AESSWRST_1)
    }
}
#[doc = "AES ready interrupt flag\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum AESRDYIFG_A {
    #[doc = "0: No interrupt pending"]
    AESRDYIFG_0 = 0,
    #[doc = "1: Interrupt pending"]
    AESRDYIFG_1 = 1,
}
impl From<AESRDYIFG_A> for bool {
    #[inline(always)]
    fn from(variant: AESRDYIFG_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `AESRDYIFG` reader - AES ready interrupt flag"]
pub type AESRDYIFG_R = crate::BitReader<AESRDYIFG_A>;
impl AESRDYIFG_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> AESRDYIFG_A {
        match self.bits {
            false => AESRDYIFG_A::AESRDYIFG_0,
            true => AESRDYIFG_A::AESRDYIFG_1,
        }
    }
    #[doc = "Checks if the value of the field is `AESRDYIFG_0`"]
    #[inline(always)]
    pub fn is_aesrdyifg_0(&self) -> bool {
        *self == AESRDYIFG_A::AESRDYIFG_0
    }
    #[doc = "Checks if the value of the field is `AESRDYIFG_1`"]
    #[inline(always)]
    pub fn is_aesrdyifg_1(&self) -> bool {
        *self == AESRDYIFG_A::AESRDYIFG_1
    }
}
#[doc = "Field `AESRDYIFG` writer - AES ready interrupt flag"]
pub type AESRDYIFG_W<'a, const O: u8> = crate::BitWriter<'a, u16, AESACTL0_SPEC, AESRDYIFG_A, O>;
impl<'a, const O: u8> AESRDYIFG_W<'a, O> {
    #[doc = "No interrupt pending"]
    #[inline(always)]
    pub fn aesrdyifg_0(self) -> &'a mut W {
        self.variant(AESRDYIFG_A::AESRDYIFG_0)
    }
    #[doc = "Interrupt pending"]
    #[inline(always)]
    pub fn aesrdyifg_1(self) -> &'a mut W {
        self.variant(AESRDYIFG_A::AESRDYIFG_1)
    }
}
#[doc = "AES error flag\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum AESERRFG_A {
    #[doc = "0: No error"]
    AESERRFG_0 = 0,
    #[doc = "1: Error occurred"]
    AESERRFG_1 = 1,
}
impl From<AESERRFG_A> for bool {
    #[inline(always)]
    fn from(variant: AESERRFG_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `AESERRFG` reader - AES error flag"]
pub type AESERRFG_R = crate::BitReader<AESERRFG_A>;
impl AESERRFG_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> AESERRFG_A {
        match self.bits {
            false => AESERRFG_A::AESERRFG_0,
            true => AESERRFG_A::AESERRFG_1,
        }
    }
    #[doc = "Checks if the value of the field is `AESERRFG_0`"]
    #[inline(always)]
    pub fn is_aeserrfg_0(&self) -> bool {
        *self == AESERRFG_A::AESERRFG_0
    }
    #[doc = "Checks if the value of the field is `AESERRFG_1`"]
    #[inline(always)]
    pub fn is_aeserrfg_1(&self) -> bool {
        *self == AESERRFG_A::AESERRFG_1
    }
}
#[doc = "Field `AESERRFG` writer - AES error flag"]
pub type AESERRFG_W<'a, const O: u8> = crate::BitWriter<'a, u16, AESACTL0_SPEC, AESERRFG_A, O>;
impl<'a, const O: u8> AESERRFG_W<'a, O> {
    #[doc = "No error"]
    #[inline(always)]
    pub fn aeserrfg_0(self) -> &'a mut W {
        self.variant(AESERRFG_A::AESERRFG_0)
    }
    #[doc = "Error occurred"]
    #[inline(always)]
    pub fn aeserrfg_1(self) -> &'a mut W {
        self.variant(AESERRFG_A::AESERRFG_1)
    }
}
#[doc = "AES ready interrupt enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum AESRDYIE_A {
    #[doc = "0: Interrupt disabled"]
    AESRDYIE_0 = 0,
    #[doc = "1: Interrupt enabled"]
    AESRDYIE_1 = 1,
}
impl From<AESRDYIE_A> for bool {
    #[inline(always)]
    fn from(variant: AESRDYIE_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `AESRDYIE` reader - AES ready interrupt enable"]
pub type AESRDYIE_R = crate::BitReader<AESRDYIE_A>;
impl AESRDYIE_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> AESRDYIE_A {
        match self.bits {
            false => AESRDYIE_A::AESRDYIE_0,
            true => AESRDYIE_A::AESRDYIE_1,
        }
    }
    #[doc = "Checks if the value of the field is `AESRDYIE_0`"]
    #[inline(always)]
    pub fn is_aesrdyie_0(&self) -> bool {
        *self == AESRDYIE_A::AESRDYIE_0
    }
    #[doc = "Checks if the value of the field is `AESRDYIE_1`"]
    #[inline(always)]
    pub fn is_aesrdyie_1(&self) -> bool {
        *self == AESRDYIE_A::AESRDYIE_1
    }
}
#[doc = "Field `AESRDYIE` writer - AES ready interrupt enable"]
pub type AESRDYIE_W<'a, const O: u8> = crate::BitWriter<'a, u16, AESACTL0_SPEC, AESRDYIE_A, O>;
impl<'a, const O: u8> AESRDYIE_W<'a, O> {
    #[doc = "Interrupt disabled"]
    #[inline(always)]
    pub fn aesrdyie_0(self) -> &'a mut W {
        self.variant(AESRDYIE_A::AESRDYIE_0)
    }
    #[doc = "Interrupt enabled"]
    #[inline(always)]
    pub fn aesrdyie_1(self) -> &'a mut W {
        self.variant(AESRDYIE_A::AESRDYIE_1)
    }
}
#[doc = "AES cipher mode enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum AESCMEN_A {
    #[doc = "0: No DMA triggers are generated"]
    AESCMEN_0 = 0,
    #[doc = "1: DMA ciphermode support operation is enabled and the corresponding DMA triggers are generated"]
    AESCMEN_1 = 1,
}
impl From<AESCMEN_A> for bool {
    #[inline(always)]
    fn from(variant: AESCMEN_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `AESCMEN` reader - AES cipher mode enable"]
pub type AESCMEN_R = crate::BitReader<AESCMEN_A>;
impl AESCMEN_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> AESCMEN_A {
        match self.bits {
            false => AESCMEN_A::AESCMEN_0,
            true => AESCMEN_A::AESCMEN_1,
        }
    }
    #[doc = "Checks if the value of the field is `AESCMEN_0`"]
    #[inline(always)]
    pub fn is_aescmen_0(&self) -> bool {
        *self == AESCMEN_A::AESCMEN_0
    }
    #[doc = "Checks if the value of the field is `AESCMEN_1`"]
    #[inline(always)]
    pub fn is_aescmen_1(&self) -> bool {
        *self == AESCMEN_A::AESCMEN_1
    }
}
#[doc = "Field `AESCMEN` writer - AES cipher mode enable"]
pub type AESCMEN_W<'a, const O: u8> = crate::BitWriter<'a, u16, AESACTL0_SPEC, AESCMEN_A, O>;
impl<'a, const O: u8> AESCMEN_W<'a, O> {
    #[doc = "No DMA triggers are generated"]
    #[inline(always)]
    pub fn aescmen_0(self) -> &'a mut W {
        self.variant(AESCMEN_A::AESCMEN_0)
    }
    #[doc = "DMA ciphermode support operation is enabled and the corresponding DMA triggers are generated"]
    #[inline(always)]
    pub fn aescmen_1(self) -> &'a mut W {
        self.variant(AESCMEN_A::AESCMEN_1)
    }
}
impl R {
    #[doc = "Bits 0:1 - AES operation"]
    #[inline(always)]
    pub fn aesopx(&self) -> AESOPX_R {
        AESOPX_R::new((self.bits & 3) as u8)
    }
    #[doc = "Bits 2:3 - AES key length"]
    #[inline(always)]
    pub fn aesklx(&self) -> AESKLX_R {
        AESKLX_R::new(((self.bits >> 2) & 3) as u8)
    }
    #[doc = "Bits 5:6 - AES cipher mode select"]
    #[inline(always)]
    pub fn aescmx(&self) -> AESCMX_R {
        AESCMX_R::new(((self.bits >> 5) & 3) as u8)
    }
    #[doc = "Bit 7 - AES software reset"]
    #[inline(always)]
    pub fn aesswrst(&self) -> AESSWRST_R {
        AESSWRST_R::new(((self.bits >> 7) & 1) != 0)
    }
    #[doc = "Bit 8 - AES ready interrupt flag"]
    #[inline(always)]
    pub fn aesrdyifg(&self) -> AESRDYIFG_R {
        AESRDYIFG_R::new(((self.bits >> 8) & 1) != 0)
    }
    #[doc = "Bit 11 - AES error flag"]
    #[inline(always)]
    pub fn aeserrfg(&self) -> AESERRFG_R {
        AESERRFG_R::new(((self.bits >> 11) & 1) != 0)
    }
    #[doc = "Bit 12 - AES ready interrupt enable"]
    #[inline(always)]
    pub fn aesrdyie(&self) -> AESRDYIE_R {
        AESRDYIE_R::new(((self.bits >> 12) & 1) != 0)
    }
    #[doc = "Bit 15 - AES cipher mode enable"]
    #[inline(always)]
    pub fn aescmen(&self) -> AESCMEN_R {
        AESCMEN_R::new(((self.bits >> 15) & 1) != 0)
    }
}
impl W {
    #[doc = "Bits 0:1 - AES operation"]
    #[inline(always)]
    pub fn aesopx(&mut self) -> AESOPX_W<0> {
        AESOPX_W::new(self)
    }
    #[doc = "Bits 2:3 - AES key length"]
    #[inline(always)]
    pub fn aesklx(&mut self) -> AESKLX_W<2> {
        AESKLX_W::new(self)
    }
    #[doc = "Bits 5:6 - AES cipher mode select"]
    #[inline(always)]
    pub fn aescmx(&mut self) -> AESCMX_W<5> {
        AESCMX_W::new(self)
    }
    #[doc = "Bit 7 - AES software reset"]
    #[inline(always)]
    pub fn aesswrst(&mut self) -> AESSWRST_W<7> {
        AESSWRST_W::new(self)
    }
    #[doc = "Bit 8 - AES ready interrupt flag"]
    #[inline(always)]
    pub fn aesrdyifg(&mut self) -> AESRDYIFG_W<8> {
        AESRDYIFG_W::new(self)
    }
    #[doc = "Bit 11 - AES error flag"]
    #[inline(always)]
    pub fn aeserrfg(&mut self) -> AESERRFG_W<11> {
        AESERRFG_W::new(self)
    }
    #[doc = "Bit 12 - AES ready interrupt enable"]
    #[inline(always)]
    pub fn aesrdyie(&mut self) -> AESRDYIE_W<12> {
        AESRDYIE_W::new(self)
    }
    #[doc = "Bit 15 - AES cipher mode enable"]
    #[inline(always)]
    pub fn aescmen(&mut self) -> AESCMEN_W<15> {
        AESCMEN_W::new(self)
    }
    #[doc = "Writes raw bits to the register."]
    #[inline(always)]
    pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
        self.0.bits(bits);
        self
    }
}
#[doc = "AES Accelerator Control Register 0\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 [aesactl0](index.html) module"]
pub struct AESACTL0_SPEC;
impl crate::RegisterSpec for AESACTL0_SPEC {
    type Ux = u16;
}
#[doc = "`read()` method returns [aesactl0::R](R) reader structure"]
impl crate::Readable for AESACTL0_SPEC {
    type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [aesactl0::W](W) writer structure"]
impl crate::Writable for AESACTL0_SPEC {
    type Writer = W;
}
#[doc = "`reset()` method sets AESACTL0 to value 0"]
impl crate::Resettable for AESACTL0_SPEC {
    #[inline(always)]
    fn reset_value() -> Self::Ux {
        0
    }
}