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
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
#[doc = "Register `CTL` reader"]
pub type R = crate::R<CtlSpec>;
#[doc = "Register `CTL` writer"]
pub type W = crate::W<CtlSpec>;
#[doc = "Main flash page program command bit\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Pg {
    #[doc = "1: Flash programming activated"]
    Program = 1,
}
impl From<Pg> for bool {
    #[inline(always)]
    fn from(variant: Pg) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `PG` reader - Main flash page program command bit"]
pub type PgR = crate::BitReader<Pg>;
impl PgR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Option<Pg> {
        match self.bits {
            true => Some(Pg::Program),
            _ => None,
        }
    }
    #[doc = "Flash programming activated"]
    #[inline(always)]
    pub fn is_program(&self) -> bool {
        *self == Pg::Program
    }
}
#[doc = "Field `PG` writer - Main flash page program command bit"]
pub type PgW<'a, REG> = crate::BitWriter<'a, REG, Pg>;
impl<'a, REG> PgW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "Flash programming activated"]
    #[inline(always)]
    pub fn program(self) -> &'a mut crate::W<REG> {
        self.variant(Pg::Program)
    }
}
#[doc = "Main flash page erase command bit\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Per {
    #[doc = "1: Erase activated for selected page"]
    PageErase = 1,
}
impl From<Per> for bool {
    #[inline(always)]
    fn from(variant: Per) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `PER` reader - Main flash page erase command bit"]
pub type PerR = crate::BitReader<Per>;
impl PerR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Option<Per> {
        match self.bits {
            true => Some(Per::PageErase),
            _ => None,
        }
    }
    #[doc = "Erase activated for selected page"]
    #[inline(always)]
    pub fn is_page_erase(&self) -> bool {
        *self == Per::PageErase
    }
}
#[doc = "Field `PER` writer - Main flash page erase command bit"]
pub type PerW<'a, REG> = crate::BitWriter<'a, REG, Per>;
impl<'a, REG> PerW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "Erase activated for selected page"]
    #[inline(always)]
    pub fn page_erase(self) -> &'a mut crate::W<REG> {
        self.variant(Per::PageErase)
    }
}
#[doc = "Main flash mass erase command bit\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Mer {
    #[doc = "1: Erase activated for all user sectors"]
    MassErase = 1,
}
impl From<Mer> for bool {
    #[inline(always)]
    fn from(variant: Mer) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `MER` reader - Main flash mass erase command bit"]
pub type MerR = crate::BitReader<Mer>;
impl MerR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Option<Mer> {
        match self.bits {
            true => Some(Mer::MassErase),
            _ => None,
        }
    }
    #[doc = "Erase activated for all user sectors"]
    #[inline(always)]
    pub fn is_mass_erase(&self) -> bool {
        *self == Mer::MassErase
    }
}
#[doc = "Field `MER` writer - Main flash mass erase command bit"]
pub type MerW<'a, REG> = crate::BitWriter<'a, REG, Mer>;
impl<'a, REG> MerW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "Erase activated for all user sectors"]
    #[inline(always)]
    pub fn mass_erase(self) -> &'a mut crate::W<REG> {
        self.variant(Mer::MassErase)
    }
}
#[doc = "Option byte program command bit\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Obpg {
    #[doc = "1: Program option byte activated"]
    OptionByteProgramming = 1,
}
impl From<Obpg> for bool {
    #[inline(always)]
    fn from(variant: Obpg) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `OBPG` reader - Option byte program command bit"]
pub type ObpgR = crate::BitReader<Obpg>;
impl ObpgR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Option<Obpg> {
        match self.bits {
            true => Some(Obpg::OptionByteProgramming),
            _ => None,
        }
    }
    #[doc = "Program option byte activated"]
    #[inline(always)]
    pub fn is_option_byte_programming(&self) -> bool {
        *self == Obpg::OptionByteProgramming
    }
}
#[doc = "Field `OBPG` writer - Option byte program command bit"]
pub type ObpgW<'a, REG> = crate::BitWriter<'a, REG, Obpg>;
impl<'a, REG> ObpgW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "Program option byte activated"]
    #[inline(always)]
    pub fn option_byte_programming(self) -> &'a mut crate::W<REG> {
        self.variant(Obpg::OptionByteProgramming)
    }
}
#[doc = "Option byte erase command bit\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Ober {
    #[doc = "1: Erase option byte activated"]
    OptionByteErase = 1,
}
impl From<Ober> for bool {
    #[inline(always)]
    fn from(variant: Ober) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `OBER` reader - Option byte erase command bit"]
pub type OberR = crate::BitReader<Ober>;
impl OberR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Option<Ober> {
        match self.bits {
            true => Some(Ober::OptionByteErase),
            _ => None,
        }
    }
    #[doc = "Erase option byte activated"]
    #[inline(always)]
    pub fn is_option_byte_erase(&self) -> bool {
        *self == Ober::OptionByteErase
    }
}
#[doc = "Field `OBER` writer - Option byte erase command bit"]
pub type OberW<'a, REG> = crate::BitWriter<'a, REG, Ober>;
impl<'a, REG> OberW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "Erase option byte activated"]
    #[inline(always)]
    pub fn option_byte_erase(self) -> &'a mut crate::W<REG> {
        self.variant(Ober::OptionByteErase)
    }
}
#[doc = "Send erase command to FMC bit\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Startw {
    #[doc = "1: Trigger an erase operation"]
    Start = 1,
}
impl From<Startw> for bool {
    #[inline(always)]
    fn from(variant: Startw) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `START` reader - Send erase command to FMC bit"]
pub type StartR = crate::BitReader<Startw>;
impl StartR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Option<Startw> {
        match self.bits {
            true => Some(Startw::Start),
            _ => None,
        }
    }
    #[doc = "Trigger an erase operation"]
    #[inline(always)]
    pub fn is_start(&self) -> bool {
        *self == Startw::Start
    }
}
#[doc = "Field `START` writer - Send erase command to FMC bit"]
pub type StartW<'a, REG> = crate::BitWriter<'a, REG, Startw>;
impl<'a, REG> StartW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "Trigger an erase operation"]
    #[inline(always)]
    pub fn start(self) -> &'a mut crate::W<REG> {
        self.variant(Startw::Start)
    }
}
#[doc = "FMC_CTL lock bit\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Lkr {
    #[doc = "0: CTL register is unlocked"]
    Unlocked = 0,
    #[doc = "1: CTL register is locked"]
    Locked = 1,
}
impl From<Lkr> for bool {
    #[inline(always)]
    fn from(variant: Lkr) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `LK` reader - FMC_CTL lock bit"]
pub type LkR = crate::BitReader<Lkr>;
impl LkR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Lkr {
        match self.bits {
            false => Lkr::Unlocked,
            true => Lkr::Locked,
        }
    }
    #[doc = "CTL register is unlocked"]
    #[inline(always)]
    pub fn is_unlocked(&self) -> bool {
        *self == Lkr::Unlocked
    }
    #[doc = "CTL register is locked"]
    #[inline(always)]
    pub fn is_locked(&self) -> bool {
        *self == Lkr::Locked
    }
}
#[doc = "FMC_CTL lock bit\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum LkwWO {
    #[doc = "1: Lock CTL register"]
    Lock = 1,
}
impl From<LkwWO> for bool {
    #[inline(always)]
    fn from(variant: LkwWO) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `LK` writer - FMC_CTL lock bit"]
pub type LkW<'a, REG> = crate::BitWriter<'a, REG, LkwWO>;
impl<'a, REG> LkW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "Lock CTL register"]
    #[inline(always)]
    pub fn lock(self) -> &'a mut crate::W<REG> {
        self.variant(LkwWO::Lock)
    }
}
#[doc = "Option byte erase/program enable bit\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Obwenr {
    #[doc = "0: Option byte write disabled"]
    Disabled = 0,
    #[doc = "1: Option byte write enabled"]
    Enabled = 1,
}
impl From<Obwenr> for bool {
    #[inline(always)]
    fn from(variant: Obwenr) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `OBWEN` reader - Option byte erase/program enable bit"]
pub type ObwenR = crate::BitReader<Obwenr>;
impl ObwenR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Obwenr {
        match self.bits {
            false => Obwenr::Disabled,
            true => Obwenr::Enabled,
        }
    }
    #[doc = "Option byte write disabled"]
    #[inline(always)]
    pub fn is_disabled(&self) -> bool {
        *self == Obwenr::Disabled
    }
    #[doc = "Option byte write enabled"]
    #[inline(always)]
    pub fn is_enabled(&self) -> bool {
        *self == Obwenr::Enabled
    }
}
#[doc = "Option byte erase/program enable bit\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum ObwenwWO {
    #[doc = "0: Disable option byte write"]
    Disable = 0,
}
impl From<ObwenwWO> for bool {
    #[inline(always)]
    fn from(variant: ObwenwWO) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `OBWEN` writer - Option byte erase/program enable bit"]
pub type ObwenW<'a, REG> = crate::BitWriter<'a, REG, ObwenwWO>;
impl<'a, REG> ObwenW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "Disable option byte write"]
    #[inline(always)]
    pub fn disable(self) -> &'a mut crate::W<REG> {
        self.variant(ObwenwWO::Disable)
    }
}
#[doc = "Error interrupt enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Errie {
    #[doc = "0: Error interrupt generation disabled"]
    Disabled = 0,
    #[doc = "1: Error interrupt generation enabled"]
    Enabled = 1,
}
impl From<Errie> for bool {
    #[inline(always)]
    fn from(variant: Errie) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `ERRIE` reader - Error interrupt enable"]
pub type ErrieR = crate::BitReader<Errie>;
impl ErrieR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Errie {
        match self.bits {
            false => Errie::Disabled,
            true => Errie::Enabled,
        }
    }
    #[doc = "Error interrupt generation disabled"]
    #[inline(always)]
    pub fn is_disabled(&self) -> bool {
        *self == Errie::Disabled
    }
    #[doc = "Error interrupt generation enabled"]
    #[inline(always)]
    pub fn is_enabled(&self) -> bool {
        *self == Errie::Enabled
    }
}
#[doc = "Field `ERRIE` writer - Error interrupt enable"]
pub type ErrieW<'a, REG> = crate::BitWriter<'a, REG, Errie>;
impl<'a, REG> ErrieW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "Error interrupt generation disabled"]
    #[inline(always)]
    pub fn disabled(self) -> &'a mut crate::W<REG> {
        self.variant(Errie::Disabled)
    }
    #[doc = "Error interrupt generation enabled"]
    #[inline(always)]
    pub fn enabled(self) -> &'a mut crate::W<REG> {
        self.variant(Errie::Enabled)
    }
}
#[doc = "End of operation interrupt enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Endie {
    #[doc = "0: End of operation interrupt disabled"]
    Disabled = 0,
    #[doc = "1: End of operation interrupt enabled"]
    Enabled = 1,
}
impl From<Endie> for bool {
    #[inline(always)]
    fn from(variant: Endie) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `ENDIE` reader - End of operation interrupt enable"]
pub type EndieR = crate::BitReader<Endie>;
impl EndieR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Endie {
        match self.bits {
            false => Endie::Disabled,
            true => Endie::Enabled,
        }
    }
    #[doc = "End of operation interrupt disabled"]
    #[inline(always)]
    pub fn is_disabled(&self) -> bool {
        *self == Endie::Disabled
    }
    #[doc = "End of operation interrupt enabled"]
    #[inline(always)]
    pub fn is_enabled(&self) -> bool {
        *self == Endie::Enabled
    }
}
#[doc = "Field `ENDIE` writer - End of operation interrupt enable"]
pub type EndieW<'a, REG> = crate::BitWriter<'a, REG, Endie>;
impl<'a, REG> EndieW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "End of operation interrupt disabled"]
    #[inline(always)]
    pub fn disabled(self) -> &'a mut crate::W<REG> {
        self.variant(Endie::Disabled)
    }
    #[doc = "End of operation interrupt enabled"]
    #[inline(always)]
    pub fn enabled(self) -> &'a mut crate::W<REG> {
        self.variant(Endie::Enabled)
    }
}
#[doc = "Option byte reload bit\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Obrld {
    #[doc = "1: Force option bytes reload and reset"]
    Reload = 1,
}
impl From<Obrld> for bool {
    #[inline(always)]
    fn from(variant: Obrld) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `OBRLD` reader - Option byte reload bit"]
pub type ObrldR = crate::BitReader<Obrld>;
impl ObrldR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Option<Obrld> {
        match self.bits {
            true => Some(Obrld::Reload),
            _ => None,
        }
    }
    #[doc = "Force option bytes reload and reset"]
    #[inline(always)]
    pub fn is_reload(&self) -> bool {
        *self == Obrld::Reload
    }
}
#[doc = "Field `OBRLD` writer - Option byte reload bit"]
pub type ObrldW<'a, REG> = crate::BitWriter<'a, REG, Obrld>;
impl<'a, REG> ObrldW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "Force option bytes reload and reset"]
    #[inline(always)]
    pub fn reload(self) -> &'a mut crate::W<REG> {
        self.variant(Obrld::Reload)
    }
}
impl R {
    #[doc = "Bit 0 - Main flash page program command bit"]
    #[inline(always)]
    pub fn pg(&self) -> PgR {
        PgR::new((self.bits & 1) != 0)
    }
    #[doc = "Bit 1 - Main flash page erase command bit"]
    #[inline(always)]
    pub fn per(&self) -> PerR {
        PerR::new(((self.bits >> 1) & 1) != 0)
    }
    #[doc = "Bit 2 - Main flash mass erase command bit"]
    #[inline(always)]
    pub fn mer(&self) -> MerR {
        MerR::new(((self.bits >> 2) & 1) != 0)
    }
    #[doc = "Bit 4 - Option byte program command bit"]
    #[inline(always)]
    pub fn obpg(&self) -> ObpgR {
        ObpgR::new(((self.bits >> 4) & 1) != 0)
    }
    #[doc = "Bit 5 - Option byte erase command bit"]
    #[inline(always)]
    pub fn ober(&self) -> OberR {
        OberR::new(((self.bits >> 5) & 1) != 0)
    }
    #[doc = "Bit 6 - Send erase command to FMC bit"]
    #[inline(always)]
    pub fn start(&self) -> StartR {
        StartR::new(((self.bits >> 6) & 1) != 0)
    }
    #[doc = "Bit 7 - FMC_CTL lock bit"]
    #[inline(always)]
    pub fn lk(&self) -> LkR {
        LkR::new(((self.bits >> 7) & 1) != 0)
    }
    #[doc = "Bit 9 - Option byte erase/program enable bit"]
    #[inline(always)]
    pub fn obwen(&self) -> ObwenR {
        ObwenR::new(((self.bits >> 9) & 1) != 0)
    }
    #[doc = "Bit 10 - Error interrupt enable"]
    #[inline(always)]
    pub fn errie(&self) -> ErrieR {
        ErrieR::new(((self.bits >> 10) & 1) != 0)
    }
    #[doc = "Bit 12 - End of operation interrupt enable"]
    #[inline(always)]
    pub fn endie(&self) -> EndieR {
        EndieR::new(((self.bits >> 12) & 1) != 0)
    }
    #[doc = "Bit 13 - Option byte reload bit"]
    #[inline(always)]
    pub fn obrld(&self) -> ObrldR {
        ObrldR::new(((self.bits >> 13) & 1) != 0)
    }
}
impl W {
    #[doc = "Bit 0 - Main flash page program command bit"]
    #[inline(always)]
    #[must_use]
    pub fn pg(&mut self) -> PgW<CtlSpec> {
        PgW::new(self, 0)
    }
    #[doc = "Bit 1 - Main flash page erase command bit"]
    #[inline(always)]
    #[must_use]
    pub fn per(&mut self) -> PerW<CtlSpec> {
        PerW::new(self, 1)
    }
    #[doc = "Bit 2 - Main flash mass erase command bit"]
    #[inline(always)]
    #[must_use]
    pub fn mer(&mut self) -> MerW<CtlSpec> {
        MerW::new(self, 2)
    }
    #[doc = "Bit 4 - Option byte program command bit"]
    #[inline(always)]
    #[must_use]
    pub fn obpg(&mut self) -> ObpgW<CtlSpec> {
        ObpgW::new(self, 4)
    }
    #[doc = "Bit 5 - Option byte erase command bit"]
    #[inline(always)]
    #[must_use]
    pub fn ober(&mut self) -> OberW<CtlSpec> {
        OberW::new(self, 5)
    }
    #[doc = "Bit 6 - Send erase command to FMC bit"]
    #[inline(always)]
    #[must_use]
    pub fn start(&mut self) -> StartW<CtlSpec> {
        StartW::new(self, 6)
    }
    #[doc = "Bit 7 - FMC_CTL lock bit"]
    #[inline(always)]
    #[must_use]
    pub fn lk(&mut self) -> LkW<CtlSpec> {
        LkW::new(self, 7)
    }
    #[doc = "Bit 9 - Option byte erase/program enable bit"]
    #[inline(always)]
    #[must_use]
    pub fn obwen(&mut self) -> ObwenW<CtlSpec> {
        ObwenW::new(self, 9)
    }
    #[doc = "Bit 10 - Error interrupt enable"]
    #[inline(always)]
    #[must_use]
    pub fn errie(&mut self) -> ErrieW<CtlSpec> {
        ErrieW::new(self, 10)
    }
    #[doc = "Bit 12 - End of operation interrupt enable"]
    #[inline(always)]
    #[must_use]
    pub fn endie(&mut self) -> EndieW<CtlSpec> {
        EndieW::new(self, 12)
    }
    #[doc = "Bit 13 - Option byte reload bit"]
    #[inline(always)]
    #[must_use]
    pub fn obrld(&mut self) -> ObrldW<CtlSpec> {
        ObrldW::new(self, 13)
    }
}
#[doc = "Flash control register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`ctl::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 [`ctl::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct CtlSpec;
impl crate::RegisterSpec for CtlSpec {
    type Ux = u32;
}
#[doc = "`read()` method returns [`ctl::R`](R) reader structure"]
impl crate::Readable for CtlSpec {}
#[doc = "`write(|w| ..)` method takes [`ctl::W`](W) writer structure"]
impl crate::Writable for CtlSpec {
    type Safety = crate::Unsafe;
    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
}
#[doc = "`reset()` method sets CTL to value 0x80"]
impl crate::Resettable for CtlSpec {
    const RESET_VALUE: u32 = 0x80;
}