ra8e2_pac/
faci.rs

1/*
2DISCLAIMER
3This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products.
4No other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all
5applicable laws, including copyright laws.
6THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED
7OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
8NON-INFRINGEMENT.  ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY
9LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE FOR ANY DIRECT,
10INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR
11ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability
13of this software. By using this software, you agree to the additional terms and conditions found by accessing the
14following link:
15http://www.renesas.com/disclaimer
16
17*/
18// Generated from SVD 1.00.01, with svd2pac 0.6.0 on Thu, 24 Jul 2025 04:54:26 +0000
19
20#![allow(clippy::identity_op)]
21#![allow(clippy::module_inception)]
22#![allow(clippy::derivable_impls)]
23#[allow(unused_imports)]
24use crate::common::sealed;
25#[allow(unused_imports)]
26use crate::common::*;
27#[doc = r"Flash Application Command Interface"]
28unsafe impl ::core::marker::Send for super::Faci {}
29unsafe impl ::core::marker::Sync for super::Faci {}
30impl super::Faci {
31    #[allow(unused)]
32    #[inline(always)]
33    pub(crate) const fn _svd2pac_as_ptr(&self) -> *mut u8 {
34        self.ptr
35    }
36
37    #[doc = "Flash Access Status Register"]
38    #[inline(always)]
39    pub const fn fastat(
40        &self,
41    ) -> &'static crate::common::Reg<self::Fastat_SPEC, crate::common::RW> {
42        unsafe {
43            crate::common::Reg::<self::Fastat_SPEC, crate::common::RW>::from_ptr(
44                self._svd2pac_as_ptr().add(16usize),
45            )
46        }
47    }
48
49    #[doc = "Flash Access Error Interrupt Enable Register"]
50    #[inline(always)]
51    pub const fn faeint(
52        &self,
53    ) -> &'static crate::common::Reg<self::Faeint_SPEC, crate::common::RW> {
54        unsafe {
55            crate::common::Reg::<self::Faeint_SPEC, crate::common::RW>::from_ptr(
56                self._svd2pac_as_ptr().add(20usize),
57            )
58        }
59    }
60
61    #[doc = "Flash Ready Interrupt Enable Register"]
62    #[inline(always)]
63    pub const fn frdyie(
64        &self,
65    ) -> &'static crate::common::Reg<self::Frdyie_SPEC, crate::common::RW> {
66        unsafe {
67            crate::common::Reg::<self::Frdyie_SPEC, crate::common::RW>::from_ptr(
68                self._svd2pac_as_ptr().add(24usize),
69            )
70        }
71    }
72
73    #[doc = "FACI Command Start Address Register"]
74    #[inline(always)]
75    pub const fn fsaddr(
76        &self,
77    ) -> &'static crate::common::Reg<self::Fsaddr_SPEC, crate::common::RW> {
78        unsafe {
79            crate::common::Reg::<self::Fsaddr_SPEC, crate::common::RW>::from_ptr(
80                self._svd2pac_as_ptr().add(48usize),
81            )
82        }
83    }
84
85    #[doc = "FACI Command End Address Register"]
86    #[inline(always)]
87    pub const fn feaddr(
88        &self,
89    ) -> &'static crate::common::Reg<self::Feaddr_SPEC, crate::common::RW> {
90        unsafe {
91            crate::common::Reg::<self::Feaddr_SPEC, crate::common::RW>::from_ptr(
92                self._svd2pac_as_ptr().add(52usize),
93            )
94        }
95    }
96
97    #[doc = "Flash P/E Mode Entry Protection Register"]
98    #[inline(always)]
99    pub const fn fmeprot(
100        &self,
101    ) -> &'static crate::common::Reg<self::Fmeprot_SPEC, crate::common::RW> {
102        unsafe {
103            crate::common::Reg::<self::Fmeprot_SPEC, crate::common::RW>::from_ptr(
104                self._svd2pac_as_ptr().add(68usize),
105            )
106        }
107    }
108
109    #[doc = "Flash Counter Select Register"]
110    #[inline(always)]
111    pub const fn fcntselr(
112        &self,
113    ) -> &'static crate::common::Reg<self::Fcntselr_SPEC, crate::common::RW> {
114        unsafe {
115            crate::common::Reg::<self::Fcntselr_SPEC, crate::common::RW>::from_ptr(
116                self._svd2pac_as_ptr().add(72usize),
117            )
118        }
119    }
120
121    #[doc = "Flash Counter Data Register %s"]
122    #[inline(always)]
123    pub const fn fcntdatar(
124        &self,
125    ) -> &'static crate::common::ClusterRegisterArray<
126        crate::common::Reg<self::Fcntdatar_SPEC, crate::common::R>,
127        2,
128        0x4,
129    > {
130        unsafe {
131            crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x4cusize))
132        }
133    }
134    #[inline(always)]
135    pub const fn fcntdatar0(
136        &self,
137    ) -> &'static crate::common::Reg<self::Fcntdatar_SPEC, crate::common::R> {
138        unsafe {
139            crate::common::Reg::<self::Fcntdatar_SPEC, crate::common::R>::from_ptr(
140                self._svd2pac_as_ptr().add(0x4cusize),
141            )
142        }
143    }
144    #[inline(always)]
145    pub const fn fcntdatar1(
146        &self,
147    ) -> &'static crate::common::Reg<self::Fcntdatar_SPEC, crate::common::R> {
148        unsafe {
149            crate::common::Reg::<self::Fcntdatar_SPEC, crate::common::R>::from_ptr(
150                self._svd2pac_as_ptr().add(0x50usize),
151            )
152        }
153    }
154
155    #[doc = "Flash Block Protection Register"]
156    #[inline(always)]
157    pub const fn fbprot0(
158        &self,
159    ) -> &'static crate::common::Reg<self::Fbprot0_SPEC, crate::common::RW> {
160        unsafe {
161            crate::common::Reg::<self::Fbprot0_SPEC, crate::common::RW>::from_ptr(
162                self._svd2pac_as_ptr().add(120usize),
163            )
164        }
165    }
166
167    #[doc = "Flash Block Protection for Secure Register"]
168    #[inline(always)]
169    pub const fn fbprot1(
170        &self,
171    ) -> &'static crate::common::Reg<self::Fbprot1_SPEC, crate::common::RW> {
172        unsafe {
173            crate::common::Reg::<self::Fbprot1_SPEC, crate::common::RW>::from_ptr(
174                self._svd2pac_as_ptr().add(124usize),
175            )
176        }
177    }
178
179    #[doc = "Flash Status Register"]
180    #[inline(always)]
181    pub const fn fstatr(&self) -> &'static crate::common::Reg<self::Fstatr_SPEC, crate::common::R> {
182        unsafe {
183            crate::common::Reg::<self::Fstatr_SPEC, crate::common::R>::from_ptr(
184                self._svd2pac_as_ptr().add(128usize),
185            )
186        }
187    }
188
189    #[doc = "Flash P/E Mode Entry Register"]
190    #[inline(always)]
191    pub const fn fentryr(
192        &self,
193    ) -> &'static crate::common::Reg<self::Fentryr_SPEC, crate::common::RW> {
194        unsafe {
195            crate::common::Reg::<self::Fentryr_SPEC, crate::common::RW>::from_ptr(
196                self._svd2pac_as_ptr().add(132usize),
197            )
198        }
199    }
200
201    #[doc = "Flash Sequencer Setup Initialization Register"]
202    #[inline(always)]
203    pub const fn fsuinitr(
204        &self,
205    ) -> &'static crate::common::Reg<self::Fsuinitr_SPEC, crate::common::RW> {
206        unsafe {
207            crate::common::Reg::<self::Fsuinitr_SPEC, crate::common::RW>::from_ptr(
208                self._svd2pac_as_ptr().add(140usize),
209            )
210        }
211    }
212
213    #[doc = "FACI Command Register"]
214    #[inline(always)]
215    pub const fn fcmdr(&self) -> &'static crate::common::Reg<self::Fcmdr_SPEC, crate::common::R> {
216        unsafe {
217            crate::common::Reg::<self::Fcmdr_SPEC, crate::common::R>::from_ptr(
218                self._svd2pac_as_ptr().add(160usize),
219            )
220        }
221    }
222
223    #[doc = "Blank Check Control Register"]
224    #[inline(always)]
225    pub const fn fbccnt(
226        &self,
227    ) -> &'static crate::common::Reg<self::Fbccnt_SPEC, crate::common::RW> {
228        unsafe {
229            crate::common::Reg::<self::Fbccnt_SPEC, crate::common::RW>::from_ptr(
230                self._svd2pac_as_ptr().add(208usize),
231            )
232        }
233    }
234
235    #[doc = "Blank Check Status Register"]
236    #[inline(always)]
237    pub const fn fbcstat(
238        &self,
239    ) -> &'static crate::common::Reg<self::Fbcstat_SPEC, crate::common::R> {
240        unsafe {
241            crate::common::Reg::<self::Fbcstat_SPEC, crate::common::R>::from_ptr(
242                self._svd2pac_as_ptr().add(212usize),
243            )
244        }
245    }
246
247    #[doc = "Data Flash Programming Start Address Register"]
248    #[inline(always)]
249    pub const fn fpsaddr(
250        &self,
251    ) -> &'static crate::common::Reg<self::Fpsaddr_SPEC, crate::common::R> {
252        unsafe {
253            crate::common::Reg::<self::Fpsaddr_SPEC, crate::common::R>::from_ptr(
254                self._svd2pac_as_ptr().add(216usize),
255            )
256        }
257    }
258
259    #[doc = "Flash Startup Area Select Monitor Register"]
260    #[inline(always)]
261    pub const fn fsuasmon(
262        &self,
263    ) -> &'static crate::common::Reg<self::Fsuasmon_SPEC, crate::common::R> {
264        unsafe {
265            crate::common::Reg::<self::Fsuasmon_SPEC, crate::common::R>::from_ptr(
266                self._svd2pac_as_ptr().add(220usize),
267            )
268        }
269    }
270
271    #[doc = "Flash Sequencer Processing Switching Register"]
272    #[inline(always)]
273    pub const fn fcpsr(&self) -> &'static crate::common::Reg<self::Fcpsr_SPEC, crate::common::RW> {
274        unsafe {
275            crate::common::Reg::<self::Fcpsr_SPEC, crate::common::RW>::from_ptr(
276                self._svd2pac_as_ptr().add(224usize),
277            )
278        }
279    }
280
281    #[doc = "Flash Sequencer Processing Clock Notification Register"]
282    #[inline(always)]
283    pub const fn fpckar(
284        &self,
285    ) -> &'static crate::common::Reg<self::Fpckar_SPEC, crate::common::RW> {
286        unsafe {
287            crate::common::Reg::<self::Fpckar_SPEC, crate::common::RW>::from_ptr(
288                self._svd2pac_as_ptr().add(228usize),
289            )
290        }
291    }
292
293    #[doc = "Flash Startup Area Control Register"]
294    #[inline(always)]
295    pub const fn fsuacr(
296        &self,
297    ) -> &'static crate::common::Reg<self::Fsuacr_SPEC, crate::common::RW> {
298        unsafe {
299            crate::common::Reg::<self::Fsuacr_SPEC, crate::common::RW>::from_ptr(
300                self._svd2pac_as_ptr().add(232usize),
301            )
302        }
303    }
304}
305#[doc(hidden)]
306#[derive(Copy, Clone, Eq, PartialEq)]
307pub struct Fastat_SPEC;
308impl crate::sealed::RegSpec for Fastat_SPEC {
309    type DataType = u8;
310}
311
312#[doc = "Flash Access Status Register"]
313pub type Fastat = crate::RegValueT<Fastat_SPEC>;
314
315impl Fastat {
316    #[doc = "Data Flash Memory Access Violation Flag"]
317    #[inline(always)]
318    pub fn dfae(
319        self,
320    ) -> crate::common::RegisterField<
321        3,
322        0x1,
323        1,
324        0,
325        fastat::Dfae,
326        fastat::Dfae,
327        Fastat_SPEC,
328        crate::common::RW,
329    > {
330        crate::common::RegisterField::<
331            3,
332            0x1,
333            1,
334            0,
335            fastat::Dfae,
336            fastat::Dfae,
337            Fastat_SPEC,
338            crate::common::RW,
339        >::from_register(self, 0)
340    }
341
342    #[doc = "Command Lock Flag"]
343    #[inline(always)]
344    pub fn cmdlk(
345        self,
346    ) -> crate::common::RegisterField<
347        4,
348        0x1,
349        1,
350        0,
351        fastat::Cmdlk,
352        fastat::Cmdlk,
353        Fastat_SPEC,
354        crate::common::R,
355    > {
356        crate::common::RegisterField::<
357            4,
358            0x1,
359            1,
360            0,
361            fastat::Cmdlk,
362            fastat::Cmdlk,
363            Fastat_SPEC,
364            crate::common::R,
365        >::from_register(self, 0)
366    }
367
368    #[doc = "Code Flash Memory Access Violation Flag"]
369    #[inline(always)]
370    pub fn cfae(
371        self,
372    ) -> crate::common::RegisterField<
373        7,
374        0x1,
375        1,
376        0,
377        fastat::Cfae,
378        fastat::Cfae,
379        Fastat_SPEC,
380        crate::common::RW,
381    > {
382        crate::common::RegisterField::<
383            7,
384            0x1,
385            1,
386            0,
387            fastat::Cfae,
388            fastat::Cfae,
389            Fastat_SPEC,
390            crate::common::RW,
391        >::from_register(self, 0)
392    }
393}
394impl ::core::default::Default for Fastat {
395    #[inline(always)]
396    fn default() -> Fastat {
397        <crate::RegValueT<Fastat_SPEC> as RegisterValue<_>>::new(0)
398    }
399}
400pub mod fastat {
401
402    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
403    pub struct Dfae_SPEC;
404    pub type Dfae = crate::EnumBitfieldStruct<u8, Dfae_SPEC>;
405    impl Dfae {
406        #[doc = "No data flash memory access violation has occurred"]
407        pub const _0: Self = Self::new(0);
408
409        #[doc = "A data flash memory access violation has occurred."]
410        pub const _1: Self = Self::new(1);
411    }
412    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
413    pub struct Cmdlk_SPEC;
414    pub type Cmdlk = crate::EnumBitfieldStruct<u8, Cmdlk_SPEC>;
415    impl Cmdlk {
416        #[doc = "The flash sequencer is not in the command-locked state"]
417        pub const _0: Self = Self::new(0);
418
419        #[doc = "The flash sequencer is in the command-locked state."]
420        pub const _1: Self = Self::new(1);
421    }
422    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
423    pub struct Cfae_SPEC;
424    pub type Cfae = crate::EnumBitfieldStruct<u8, Cfae_SPEC>;
425    impl Cfae {
426        #[doc = "No code flash memory access violation has occurred"]
427        pub const _0: Self = Self::new(0);
428
429        #[doc = "A code flash memory access violation has occurred."]
430        pub const _1: Self = Self::new(1);
431    }
432}
433#[doc(hidden)]
434#[derive(Copy, Clone, Eq, PartialEq)]
435pub struct Faeint_SPEC;
436impl crate::sealed::RegSpec for Faeint_SPEC {
437    type DataType = u8;
438}
439
440#[doc = "Flash Access Error Interrupt Enable Register"]
441pub type Faeint = crate::RegValueT<Faeint_SPEC>;
442
443impl Faeint {
444    #[doc = "Data Flash Memory Access Violation Interrupt Enable"]
445    #[inline(always)]
446    pub fn dfaeie(
447        self,
448    ) -> crate::common::RegisterField<
449        3,
450        0x1,
451        1,
452        0,
453        faeint::Dfaeie,
454        faeint::Dfaeie,
455        Faeint_SPEC,
456        crate::common::RW,
457    > {
458        crate::common::RegisterField::<
459            3,
460            0x1,
461            1,
462            0,
463            faeint::Dfaeie,
464            faeint::Dfaeie,
465            Faeint_SPEC,
466            crate::common::RW,
467        >::from_register(self, 0)
468    }
469
470    #[doc = "Command Lock Interrupt Enable"]
471    #[inline(always)]
472    pub fn cmdlkie(
473        self,
474    ) -> crate::common::RegisterField<
475        4,
476        0x1,
477        1,
478        0,
479        faeint::Cmdlkie,
480        faeint::Cmdlkie,
481        Faeint_SPEC,
482        crate::common::RW,
483    > {
484        crate::common::RegisterField::<
485            4,
486            0x1,
487            1,
488            0,
489            faeint::Cmdlkie,
490            faeint::Cmdlkie,
491            Faeint_SPEC,
492            crate::common::RW,
493        >::from_register(self, 0)
494    }
495
496    #[doc = "Code Flash Memory Access Violation Interrupt Enable"]
497    #[inline(always)]
498    pub fn cfaeie(
499        self,
500    ) -> crate::common::RegisterField<
501        7,
502        0x1,
503        1,
504        0,
505        faeint::Cfaeie,
506        faeint::Cfaeie,
507        Faeint_SPEC,
508        crate::common::RW,
509    > {
510        crate::common::RegisterField::<
511            7,
512            0x1,
513            1,
514            0,
515            faeint::Cfaeie,
516            faeint::Cfaeie,
517            Faeint_SPEC,
518            crate::common::RW,
519        >::from_register(self, 0)
520    }
521}
522impl ::core::default::Default for Faeint {
523    #[inline(always)]
524    fn default() -> Faeint {
525        <crate::RegValueT<Faeint_SPEC> as RegisterValue<_>>::new(152)
526    }
527}
528pub mod faeint {
529
530    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
531    pub struct Dfaeie_SPEC;
532    pub type Dfaeie = crate::EnumBitfieldStruct<u8, Dfaeie_SPEC>;
533    impl Dfaeie {
534        #[doc = "Generation of an FIFERR interrupt request is disabled when FASTAT.DFAE is set to 1"]
535        pub const _0: Self = Self::new(0);
536
537        #[doc = "Generation of an FIFERR interrupt request is enabled when FASTAT.DFAE is set to 1."]
538        pub const _1: Self = Self::new(1);
539    }
540    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
541    pub struct Cmdlkie_SPEC;
542    pub type Cmdlkie = crate::EnumBitfieldStruct<u8, Cmdlkie_SPEC>;
543    impl Cmdlkie {
544        #[doc = "Generation of an FIFERR interrupt request is disabled when FASTAT.CMDLK is set to 1"]
545        pub const _0: Self = Self::new(0);
546
547        #[doc = "Generation of an FIFERR interrupt request is enabled when FASTAT.CMDLK is set to 1."]
548        pub const _1: Self = Self::new(1);
549    }
550    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
551    pub struct Cfaeie_SPEC;
552    pub type Cfaeie = crate::EnumBitfieldStruct<u8, Cfaeie_SPEC>;
553    impl Cfaeie {
554        #[doc = "Generation of an FIFERR interrupt request is disabled when FASTAT.CFAE is set to 1"]
555        pub const _0: Self = Self::new(0);
556
557        #[doc = "Generation of an FIFERR interrupt request is enabled when FASTAT.CFAE is set to 1."]
558        pub const _1: Self = Self::new(1);
559    }
560}
561#[doc(hidden)]
562#[derive(Copy, Clone, Eq, PartialEq)]
563pub struct Frdyie_SPEC;
564impl crate::sealed::RegSpec for Frdyie_SPEC {
565    type DataType = u8;
566}
567
568#[doc = "Flash Ready Interrupt Enable Register"]
569pub type Frdyie = crate::RegValueT<Frdyie_SPEC>;
570
571impl Frdyie {
572    #[doc = "Flash Ready Interrupt Enable"]
573    #[inline(always)]
574    pub fn frdyie(
575        self,
576    ) -> crate::common::RegisterField<
577        0,
578        0x1,
579        1,
580        0,
581        frdyie::Frdyie,
582        frdyie::Frdyie,
583        Frdyie_SPEC,
584        crate::common::RW,
585    > {
586        crate::common::RegisterField::<
587            0,
588            0x1,
589            1,
590            0,
591            frdyie::Frdyie,
592            frdyie::Frdyie,
593            Frdyie_SPEC,
594            crate::common::RW,
595        >::from_register(self, 0)
596    }
597}
598impl ::core::default::Default for Frdyie {
599    #[inline(always)]
600    fn default() -> Frdyie {
601        <crate::RegValueT<Frdyie_SPEC> as RegisterValue<_>>::new(0)
602    }
603}
604pub mod frdyie {
605
606    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
607    pub struct Frdyie_SPEC;
608    pub type Frdyie = crate::EnumBitfieldStruct<u8, Frdyie_SPEC>;
609    impl Frdyie {
610        #[doc = "Generation of an FRDY interrupt request is disabled"]
611        pub const _0: Self = Self::new(0);
612
613        #[doc = "Generation of an FRDY interrupt request is enabled."]
614        pub const _1: Self = Self::new(1);
615    }
616}
617#[doc(hidden)]
618#[derive(Copy, Clone, Eq, PartialEq)]
619pub struct Fsaddr_SPEC;
620impl crate::sealed::RegSpec for Fsaddr_SPEC {
621    type DataType = u32;
622}
623
624#[doc = "FACI Command Start Address Register"]
625pub type Fsaddr = crate::RegValueT<Fsaddr_SPEC>;
626
627impl NoBitfieldReg<Fsaddr_SPEC> for Fsaddr {}
628impl ::core::default::Default for Fsaddr {
629    #[inline(always)]
630    fn default() -> Fsaddr {
631        <crate::RegValueT<Fsaddr_SPEC> as RegisterValue<_>>::new(0)
632    }
633}
634
635#[doc(hidden)]
636#[derive(Copy, Clone, Eq, PartialEq)]
637pub struct Feaddr_SPEC;
638impl crate::sealed::RegSpec for Feaddr_SPEC {
639    type DataType = u32;
640}
641
642#[doc = "FACI Command End Address Register"]
643pub type Feaddr = crate::RegValueT<Feaddr_SPEC>;
644
645impl Feaddr {
646    #[doc = "End Address for FACI Command Processing"]
647    #[inline(always)]
648    pub fn feaddr(
649        self,
650    ) -> crate::common::RegisterField<0, 0xffffffff, 1, 0, u32, u32, Feaddr_SPEC, crate::common::RW>
651    {
652        crate::common::RegisterField::<0,0xffffffff,1,0,u32,u32,Feaddr_SPEC,crate::common::RW>::from_register(self,0)
653    }
654}
655impl ::core::default::Default for Feaddr {
656    #[inline(always)]
657    fn default() -> Feaddr {
658        <crate::RegValueT<Feaddr_SPEC> as RegisterValue<_>>::new(0)
659    }
660}
661
662#[doc(hidden)]
663#[derive(Copy, Clone, Eq, PartialEq)]
664pub struct Fmeprot_SPEC;
665impl crate::sealed::RegSpec for Fmeprot_SPEC {
666    type DataType = u16;
667}
668
669#[doc = "Flash P/E Mode Entry Protection Register"]
670pub type Fmeprot = crate::RegValueT<Fmeprot_SPEC>;
671
672impl Fmeprot {
673    #[doc = "Code Flash P/E Mode Entry Protection"]
674    #[inline(always)]
675    pub fn ceprot(
676        self,
677    ) -> crate::common::RegisterField<
678        0,
679        0x1,
680        1,
681        0,
682        fmeprot::Ceprot,
683        fmeprot::Ceprot,
684        Fmeprot_SPEC,
685        crate::common::RW,
686    > {
687        crate::common::RegisterField::<
688            0,
689            0x1,
690            1,
691            0,
692            fmeprot::Ceprot,
693            fmeprot::Ceprot,
694            Fmeprot_SPEC,
695            crate::common::RW,
696        >::from_register(self, 0)
697    }
698
699    #[doc = "Key Code"]
700    #[inline(always)]
701    pub fn key(
702        self,
703    ) -> crate::common::RegisterField<8, 0xff, 1, 0, u8, u8, Fmeprot_SPEC, crate::common::W> {
704        crate::common::RegisterField::<8,0xff,1,0,u8,u8,Fmeprot_SPEC,crate::common::W>::from_register(self,0)
705    }
706}
707impl ::core::default::Default for Fmeprot {
708    #[inline(always)]
709    fn default() -> Fmeprot {
710        <crate::RegValueT<Fmeprot_SPEC> as RegisterValue<_>>::new(1)
711    }
712}
713pub mod fmeprot {
714
715    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
716    pub struct Ceprot_SPEC;
717    pub type Ceprot = crate::EnumBitfieldStruct<u8, Ceprot_SPEC>;
718    impl Ceprot {
719        #[doc = "FENTRYC bit is not protected"]
720        pub const _0: Self = Self::new(0);
721
722        #[doc = "FENTRYC bit is protected."]
723        pub const _1: Self = Self::new(1);
724    }
725}
726#[doc(hidden)]
727#[derive(Copy, Clone, Eq, PartialEq)]
728pub struct Fcntselr_SPEC;
729impl crate::sealed::RegSpec for Fcntselr_SPEC {
730    type DataType = u8;
731}
732
733#[doc = "Flash Counter Select Register"]
734pub type Fcntselr = crate::RegValueT<Fcntselr_SPEC>;
735
736impl Fcntselr {
737    #[doc = "Counter Select"]
738    #[inline(always)]
739    pub fn cntsel(
740        self,
741    ) -> crate::common::RegisterField<0, 0x7, 1, 0, u8, u8, Fcntselr_SPEC, crate::common::RW> {
742        crate::common::RegisterField::<0,0x7,1,0,u8,u8,Fcntselr_SPEC,crate::common::RW>::from_register(self,0)
743    }
744}
745impl ::core::default::Default for Fcntselr {
746    #[inline(always)]
747    fn default() -> Fcntselr {
748        <crate::RegValueT<Fcntselr_SPEC> as RegisterValue<_>>::new(0)
749    }
750}
751
752#[doc(hidden)]
753#[derive(Copy, Clone, Eq, PartialEq)]
754pub struct Fcntdatar_SPEC;
755impl crate::sealed::RegSpec for Fcntdatar_SPEC {
756    type DataType = u32;
757}
758
759#[doc = "Flash Counter Data Register %s"]
760pub type Fcntdatar = crate::RegValueT<Fcntdatar_SPEC>;
761
762impl Fcntdatar {
763    #[doc = "Counter Read Data"]
764    #[inline(always)]
765    pub fn cntrdat(
766        self,
767    ) -> crate::common::RegisterField<0, 0xffffffff, 1, 0, u32, u32, Fcntdatar_SPEC, crate::common::R>
768    {
769        crate::common::RegisterField::<
770            0,
771            0xffffffff,
772            1,
773            0,
774            u32,
775            u32,
776            Fcntdatar_SPEC,
777            crate::common::R,
778        >::from_register(self, 0)
779    }
780}
781impl ::core::default::Default for Fcntdatar {
782    #[inline(always)]
783    fn default() -> Fcntdatar {
784        <crate::RegValueT<Fcntdatar_SPEC> as RegisterValue<_>>::new(0)
785    }
786}
787
788#[doc(hidden)]
789#[derive(Copy, Clone, Eq, PartialEq)]
790pub struct Fbprot0_SPEC;
791impl crate::sealed::RegSpec for Fbprot0_SPEC {
792    type DataType = u16;
793}
794
795#[doc = "Flash Block Protection Register"]
796pub type Fbprot0 = crate::RegValueT<Fbprot0_SPEC>;
797
798impl Fbprot0 {
799    #[doc = "Block Protection for Non-secure Cancel"]
800    #[inline(always)]
801    pub fn bpcn0(
802        self,
803    ) -> crate::common::RegisterField<
804        0,
805        0x1,
806        1,
807        0,
808        fbprot0::Bpcn0,
809        fbprot0::Bpcn0,
810        Fbprot0_SPEC,
811        crate::common::RW,
812    > {
813        crate::common::RegisterField::<
814            0,
815            0x1,
816            1,
817            0,
818            fbprot0::Bpcn0,
819            fbprot0::Bpcn0,
820            Fbprot0_SPEC,
821            crate::common::RW,
822        >::from_register(self, 0)
823    }
824
825    #[doc = "Key Code"]
826    #[inline(always)]
827    pub fn key(
828        self,
829    ) -> crate::common::RegisterField<8, 0xff, 1, 0, u8, u8, Fbprot0_SPEC, crate::common::W> {
830        crate::common::RegisterField::<8,0xff,1,0,u8,u8,Fbprot0_SPEC,crate::common::W>::from_register(self,0)
831    }
832}
833impl ::core::default::Default for Fbprot0 {
834    #[inline(always)]
835    fn default() -> Fbprot0 {
836        <crate::RegValueT<Fbprot0_SPEC> as RegisterValue<_>>::new(0)
837    }
838}
839pub mod fbprot0 {
840
841    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
842    pub struct Bpcn0_SPEC;
843    pub type Bpcn0 = crate::EnumBitfieldStruct<u8, Bpcn0_SPEC>;
844    impl Bpcn0 {
845        #[doc = "Block protection is enabled"]
846        pub const _0: Self = Self::new(0);
847
848        #[doc = "Block protection is disabled."]
849        pub const _1: Self = Self::new(1);
850    }
851}
852#[doc(hidden)]
853#[derive(Copy, Clone, Eq, PartialEq)]
854pub struct Fbprot1_SPEC;
855impl crate::sealed::RegSpec for Fbprot1_SPEC {
856    type DataType = u16;
857}
858
859#[doc = "Flash Block Protection for Secure Register"]
860pub type Fbprot1 = crate::RegValueT<Fbprot1_SPEC>;
861
862impl Fbprot1 {
863    #[doc = "Block Protection for Secure Cancel"]
864    #[inline(always)]
865    pub fn bpcn1(
866        self,
867    ) -> crate::common::RegisterField<
868        0,
869        0x1,
870        1,
871        0,
872        fbprot1::Bpcn1,
873        fbprot1::Bpcn1,
874        Fbprot1_SPEC,
875        crate::common::RW,
876    > {
877        crate::common::RegisterField::<
878            0,
879            0x1,
880            1,
881            0,
882            fbprot1::Bpcn1,
883            fbprot1::Bpcn1,
884            Fbprot1_SPEC,
885            crate::common::RW,
886        >::from_register(self, 0)
887    }
888
889    #[doc = "Key Code"]
890    #[inline(always)]
891    pub fn key(
892        self,
893    ) -> crate::common::RegisterField<8, 0xff, 1, 0, u8, u8, Fbprot1_SPEC, crate::common::W> {
894        crate::common::RegisterField::<8,0xff,1,0,u8,u8,Fbprot1_SPEC,crate::common::W>::from_register(self,0)
895    }
896}
897impl ::core::default::Default for Fbprot1 {
898    #[inline(always)]
899    fn default() -> Fbprot1 {
900        <crate::RegValueT<Fbprot1_SPEC> as RegisterValue<_>>::new(0)
901    }
902}
903pub mod fbprot1 {
904
905    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
906    pub struct Bpcn1_SPEC;
907    pub type Bpcn1 = crate::EnumBitfieldStruct<u8, Bpcn1_SPEC>;
908    impl Bpcn1 {
909        #[doc = "Block protection is enabled"]
910        pub const _0: Self = Self::new(0);
911
912        #[doc = "Block protection is disabled."]
913        pub const _1: Self = Self::new(1);
914    }
915}
916#[doc(hidden)]
917#[derive(Copy, Clone, Eq, PartialEq)]
918pub struct Fstatr_SPEC;
919impl crate::sealed::RegSpec for Fstatr_SPEC {
920    type DataType = u32;
921}
922
923#[doc = "Flash Status Register"]
924pub type Fstatr = crate::RegValueT<Fstatr_SPEC>;
925
926impl Fstatr {
927    #[doc = "Flash Write/Erase Protect Error Flag"]
928    #[inline(always)]
929    pub fn flweerr(
930        self,
931    ) -> crate::common::RegisterField<
932        6,
933        0x1,
934        1,
935        0,
936        fstatr::Flweerr,
937        fstatr::Flweerr,
938        Fstatr_SPEC,
939        crate::common::R,
940    > {
941        crate::common::RegisterField::<
942            6,
943            0x1,
944            1,
945            0,
946            fstatr::Flweerr,
947            fstatr::Flweerr,
948            Fstatr_SPEC,
949            crate::common::R,
950        >::from_register(self, 0)
951    }
952
953    #[doc = "Programming Suspend Status Flag"]
954    #[inline(always)]
955    pub fn prgspd(
956        self,
957    ) -> crate::common::RegisterField<
958        8,
959        0x1,
960        1,
961        0,
962        fstatr::Prgspd,
963        fstatr::Prgspd,
964        Fstatr_SPEC,
965        crate::common::R,
966    > {
967        crate::common::RegisterField::<
968            8,
969            0x1,
970            1,
971            0,
972            fstatr::Prgspd,
973            fstatr::Prgspd,
974            Fstatr_SPEC,
975            crate::common::R,
976        >::from_register(self, 0)
977    }
978
979    #[doc = "Erasure Suspend Status Flag"]
980    #[inline(always)]
981    pub fn ersspd(
982        self,
983    ) -> crate::common::RegisterField<
984        9,
985        0x1,
986        1,
987        0,
988        fstatr::Ersspd,
989        fstatr::Ersspd,
990        Fstatr_SPEC,
991        crate::common::R,
992    > {
993        crate::common::RegisterField::<
994            9,
995            0x1,
996            1,
997            0,
998            fstatr::Ersspd,
999            fstatr::Ersspd,
1000            Fstatr_SPEC,
1001            crate::common::R,
1002        >::from_register(self, 0)
1003    }
1004
1005    #[doc = "Data Buffer Full Flag"]
1006    #[inline(always)]
1007    pub fn dbfull(
1008        self,
1009    ) -> crate::common::RegisterField<
1010        10,
1011        0x1,
1012        1,
1013        0,
1014        fstatr::Dbfull,
1015        fstatr::Dbfull,
1016        Fstatr_SPEC,
1017        crate::common::R,
1018    > {
1019        crate::common::RegisterField::<
1020            10,
1021            0x1,
1022            1,
1023            0,
1024            fstatr::Dbfull,
1025            fstatr::Dbfull,
1026            Fstatr_SPEC,
1027            crate::common::R,
1028        >::from_register(self, 0)
1029    }
1030
1031    #[doc = "Suspend Ready Flag"]
1032    #[inline(always)]
1033    pub fn susrdy(
1034        self,
1035    ) -> crate::common::RegisterField<
1036        11,
1037        0x1,
1038        1,
1039        0,
1040        fstatr::Susrdy,
1041        fstatr::Susrdy,
1042        Fstatr_SPEC,
1043        crate::common::R,
1044    > {
1045        crate::common::RegisterField::<
1046            11,
1047            0x1,
1048            1,
1049            0,
1050            fstatr::Susrdy,
1051            fstatr::Susrdy,
1052            Fstatr_SPEC,
1053            crate::common::R,
1054        >::from_register(self, 0)
1055    }
1056
1057    #[doc = "Programming Error Flag"]
1058    #[inline(always)]
1059    pub fn prgerr(
1060        self,
1061    ) -> crate::common::RegisterField<
1062        12,
1063        0x1,
1064        1,
1065        0,
1066        fstatr::Prgerr,
1067        fstatr::Prgerr,
1068        Fstatr_SPEC,
1069        crate::common::R,
1070    > {
1071        crate::common::RegisterField::<
1072            12,
1073            0x1,
1074            1,
1075            0,
1076            fstatr::Prgerr,
1077            fstatr::Prgerr,
1078            Fstatr_SPEC,
1079            crate::common::R,
1080        >::from_register(self, 0)
1081    }
1082
1083    #[doc = "Erasure Error Flag"]
1084    #[inline(always)]
1085    pub fn erserr(
1086        self,
1087    ) -> crate::common::RegisterField<
1088        13,
1089        0x1,
1090        1,
1091        0,
1092        fstatr::Erserr,
1093        fstatr::Erserr,
1094        Fstatr_SPEC,
1095        crate::common::R,
1096    > {
1097        crate::common::RegisterField::<
1098            13,
1099            0x1,
1100            1,
1101            0,
1102            fstatr::Erserr,
1103            fstatr::Erserr,
1104            Fstatr_SPEC,
1105            crate::common::R,
1106        >::from_register(self, 0)
1107    }
1108
1109    #[doc = "Illegal Command Error Flag"]
1110    #[inline(always)]
1111    pub fn ilglerr(
1112        self,
1113    ) -> crate::common::RegisterField<
1114        14,
1115        0x1,
1116        1,
1117        0,
1118        fstatr::Ilglerr,
1119        fstatr::Ilglerr,
1120        Fstatr_SPEC,
1121        crate::common::R,
1122    > {
1123        crate::common::RegisterField::<
1124            14,
1125            0x1,
1126            1,
1127            0,
1128            fstatr::Ilglerr,
1129            fstatr::Ilglerr,
1130            Fstatr_SPEC,
1131            crate::common::R,
1132        >::from_register(self, 0)
1133    }
1134
1135    #[doc = "Flash Ready Flag"]
1136    #[inline(always)]
1137    pub fn frdy(
1138        self,
1139    ) -> crate::common::RegisterField<
1140        15,
1141        0x1,
1142        1,
1143        0,
1144        fstatr::Frdy,
1145        fstatr::Frdy,
1146        Fstatr_SPEC,
1147        crate::common::R,
1148    > {
1149        crate::common::RegisterField::<
1150            15,
1151            0x1,
1152            1,
1153            0,
1154            fstatr::Frdy,
1155            fstatr::Frdy,
1156            Fstatr_SPEC,
1157            crate::common::R,
1158        >::from_register(self, 0)
1159    }
1160
1161    #[doc = "TrustZone Filter Error"]
1162    #[inline(always)]
1163    pub fn tzferr(
1164        self,
1165    ) -> crate::common::RegisterField<
1166        19,
1167        0x1,
1168        1,
1169        0,
1170        fstatr::Tzferr,
1171        fstatr::Tzferr,
1172        Fstatr_SPEC,
1173        crate::common::R,
1174    > {
1175        crate::common::RegisterField::<
1176            19,
1177            0x1,
1178            1,
1179            0,
1180            fstatr::Tzferr,
1181            fstatr::Tzferr,
1182            Fstatr_SPEC,
1183            crate::common::R,
1184        >::from_register(self, 0)
1185    }
1186
1187    #[doc = "Other Error"]
1188    #[inline(always)]
1189    pub fn oterr(
1190        self,
1191    ) -> crate::common::RegisterField<
1192        20,
1193        0x1,
1194        1,
1195        0,
1196        fstatr::Oterr,
1197        fstatr::Oterr,
1198        Fstatr_SPEC,
1199        crate::common::R,
1200    > {
1201        crate::common::RegisterField::<
1202            20,
1203            0x1,
1204            1,
1205            0,
1206            fstatr::Oterr,
1207            fstatr::Oterr,
1208            Fstatr_SPEC,
1209            crate::common::R,
1210        >::from_register(self, 0)
1211    }
1212
1213    #[doc = "Security Error"]
1214    #[inline(always)]
1215    pub fn secerr(
1216        self,
1217    ) -> crate::common::RegisterField<
1218        21,
1219        0x1,
1220        1,
1221        0,
1222        fstatr::Secerr,
1223        fstatr::Secerr,
1224        Fstatr_SPEC,
1225        crate::common::R,
1226    > {
1227        crate::common::RegisterField::<
1228            21,
1229            0x1,
1230            1,
1231            0,
1232            fstatr::Secerr,
1233            fstatr::Secerr,
1234            Fstatr_SPEC,
1235            crate::common::R,
1236        >::from_register(self, 0)
1237    }
1238
1239    #[doc = "FENTRY Setting Error"]
1240    #[inline(always)]
1241    pub fn feseterr(
1242        self,
1243    ) -> crate::common::RegisterField<
1244        22,
1245        0x1,
1246        1,
1247        0,
1248        fstatr::Feseterr,
1249        fstatr::Feseterr,
1250        Fstatr_SPEC,
1251        crate::common::R,
1252    > {
1253        crate::common::RegisterField::<
1254            22,
1255            0x1,
1256            1,
1257            0,
1258            fstatr::Feseterr,
1259            fstatr::Feseterr,
1260            Fstatr_SPEC,
1261            crate::common::R,
1262        >::from_register(self, 0)
1263    }
1264
1265    #[doc = "Illegal Command Error"]
1266    #[inline(always)]
1267    pub fn ilgcomerr(
1268        self,
1269    ) -> crate::common::RegisterField<
1270        23,
1271        0x1,
1272        1,
1273        0,
1274        fstatr::Ilgcomerr,
1275        fstatr::Ilgcomerr,
1276        Fstatr_SPEC,
1277        crate::common::R,
1278    > {
1279        crate::common::RegisterField::<
1280            23,
1281            0x1,
1282            1,
1283            0,
1284            fstatr::Ilgcomerr,
1285            fstatr::Ilgcomerr,
1286            Fstatr_SPEC,
1287            crate::common::R,
1288        >::from_register(self, 0)
1289    }
1290}
1291impl ::core::default::Default for Fstatr {
1292    #[inline(always)]
1293    fn default() -> Fstatr {
1294        <crate::RegValueT<Fstatr_SPEC> as RegisterValue<_>>::new(32768)
1295    }
1296}
1297pub mod fstatr {
1298
1299    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1300    pub struct Flweerr_SPEC;
1301    pub type Flweerr = crate::EnumBitfieldStruct<u8, Flweerr_SPEC>;
1302    impl Flweerr {
1303        #[doc = "An error has not occurred"]
1304        pub const _0: Self = Self::new(0);
1305
1306        #[doc = "An error has occurred."]
1307        pub const _1: Self = Self::new(1);
1308    }
1309    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1310    pub struct Prgspd_SPEC;
1311    pub type Prgspd = crate::EnumBitfieldStruct<u8, Prgspd_SPEC>;
1312    impl Prgspd {
1313        #[doc = "The flash sequencer is not in the programming suspension processing state or programming suspended state"]
1314        pub const _0: Self = Self::new(0);
1315
1316        #[doc = "The flash sequencer is in the programming suspension processing state or programming suspended state."]
1317        pub const _1: Self = Self::new(1);
1318    }
1319    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1320    pub struct Ersspd_SPEC;
1321    pub type Ersspd = crate::EnumBitfieldStruct<u8, Ersspd_SPEC>;
1322    impl Ersspd {
1323        #[doc = "The flash sequencer is not in the erasure suspension processing state or the erasure suspended state"]
1324        pub const _0: Self = Self::new(0);
1325
1326        #[doc = "The flash sequencer is in the erasure suspension processing state or the erasure suspended state."]
1327        pub const _1: Self = Self::new(1);
1328    }
1329    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1330    pub struct Dbfull_SPEC;
1331    pub type Dbfull = crate::EnumBitfieldStruct<u8, Dbfull_SPEC>;
1332    impl Dbfull {
1333        #[doc = "The data buffer is empty"]
1334        pub const _0: Self = Self::new(0);
1335
1336        #[doc = "The data buffer is full."]
1337        pub const _1: Self = Self::new(1);
1338    }
1339    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1340    pub struct Susrdy_SPEC;
1341    pub type Susrdy = crate::EnumBitfieldStruct<u8, Susrdy_SPEC>;
1342    impl Susrdy {
1343        #[doc = "The flash sequencer cannot receive P/E suspend commands"]
1344        pub const _0: Self = Self::new(0);
1345
1346        #[doc = "The flash sequencer can receive P/E suspend commands."]
1347        pub const _1: Self = Self::new(1);
1348    }
1349    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1350    pub struct Prgerr_SPEC;
1351    pub type Prgerr = crate::EnumBitfieldStruct<u8, Prgerr_SPEC>;
1352    impl Prgerr {
1353        #[doc = "Programming has completed successfully"]
1354        pub const _0: Self = Self::new(0);
1355
1356        #[doc = "An error has occurred during programming."]
1357        pub const _1: Self = Self::new(1);
1358    }
1359    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1360    pub struct Erserr_SPEC;
1361    pub type Erserr = crate::EnumBitfieldStruct<u8, Erserr_SPEC>;
1362    impl Erserr {
1363        #[doc = "Erasure has completed successfully"]
1364        pub const _0: Self = Self::new(0);
1365
1366        #[doc = "An error has occurred during erasure."]
1367        pub const _1: Self = Self::new(1);
1368    }
1369    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1370    pub struct Ilglerr_SPEC;
1371    pub type Ilglerr = crate::EnumBitfieldStruct<u8, Ilglerr_SPEC>;
1372    impl Ilglerr {
1373        #[doc = "The flash sequencer has not detected an illegal FACI command or illegal flash memory access"]
1374        pub const _0: Self = Self::new(0);
1375
1376        #[doc = "The flash sequencer has detected an illegal FACI command or illegal flash memory access."]
1377        pub const _1: Self = Self::new(1);
1378    }
1379    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1380    pub struct Frdy_SPEC;
1381    pub type Frdy = crate::EnumBitfieldStruct<u8, Frdy_SPEC>;
1382    impl Frdy {
1383        #[doc = "Program, Block Erase, Multi Block Erase, P/E suspend, P/E resume, Forced Stop, Blank Check, Configuration set, Increment counter, Refresh counter, or Read counter command processing is in progress."]
1384        pub const _0: Self = Self::new(0);
1385
1386        #[doc = "None of the above is in progress."]
1387        pub const _1: Self = Self::new(1);
1388    }
1389    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1390    pub struct Tzferr_SPEC;
1391    pub type Tzferr = crate::EnumBitfieldStruct<u8, Tzferr_SPEC>;
1392    impl Tzferr {
1393        #[doc = "A TrustZone filter error has not been detected."]
1394        pub const _0: Self = Self::new(0);
1395
1396        #[doc = "A TrustZone filter error has been detected."]
1397        pub const _1: Self = Self::new(1);
1398    }
1399    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1400    pub struct Oterr_SPEC;
1401    pub type Oterr = crate::EnumBitfieldStruct<u8, Oterr_SPEC>;
1402    impl Oterr {
1403        #[doc = "An error has not been detected."]
1404        pub const _0: Self = Self::new(0);
1405
1406        #[doc = "An error has been detected."]
1407        pub const _1: Self = Self::new(1);
1408    }
1409    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1410    pub struct Secerr_SPEC;
1411    pub type Secerr = crate::EnumBitfieldStruct<u8, Secerr_SPEC>;
1412    impl Secerr {
1413        #[doc = "A write protection error against MSUASMON.FSPR bit has not been detected."]
1414        pub const _0: Self = Self::new(0);
1415
1416        #[doc = "A write protection error against MSUASMON.FSPR bit has been detected."]
1417        pub const _1: Self = Self::new(1);
1418    }
1419    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1420    pub struct Feseterr_SPEC;
1421    pub type Feseterr = crate::EnumBitfieldStruct<u8, Feseterr_SPEC>;
1422    impl Feseterr {
1423        #[doc = "A setting error in the FENTRYR register has not been detected."]
1424        pub const _0: Self = Self::new(0);
1425
1426        #[doc = "A setting error in the FENTRYR register has been detected."]
1427        pub const _1: Self = Self::new(1);
1428    }
1429    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1430    pub struct Ilgcomerr_SPEC;
1431    pub type Ilgcomerr = crate::EnumBitfieldStruct<u8, Ilgcomerr_SPEC>;
1432    impl Ilgcomerr {
1433        #[doc = "An illegal FACI command error has not been detected."]
1434        pub const _0: Self = Self::new(0);
1435
1436        #[doc = "An illegal FACI command error has been detected."]
1437        pub const _1: Self = Self::new(1);
1438    }
1439}
1440#[doc(hidden)]
1441#[derive(Copy, Clone, Eq, PartialEq)]
1442pub struct Fentryr_SPEC;
1443impl crate::sealed::RegSpec for Fentryr_SPEC {
1444    type DataType = u16;
1445}
1446
1447#[doc = "Flash P/E Mode Entry Register"]
1448pub type Fentryr = crate::RegValueT<Fentryr_SPEC>;
1449
1450impl Fentryr {
1451    #[doc = "Code Flash P/E Mode Entry"]
1452    #[inline(always)]
1453    pub fn fentryc(
1454        self,
1455    ) -> crate::common::RegisterField<
1456        0,
1457        0x1,
1458        1,
1459        0,
1460        fentryr::Fentryc,
1461        fentryr::Fentryc,
1462        Fentryr_SPEC,
1463        crate::common::RW,
1464    > {
1465        crate::common::RegisterField::<
1466            0,
1467            0x1,
1468            1,
1469            0,
1470            fentryr::Fentryc,
1471            fentryr::Fentryc,
1472            Fentryr_SPEC,
1473            crate::common::RW,
1474        >::from_register(self, 0)
1475    }
1476
1477    #[doc = "Data Flash P/E Mode Entry"]
1478    #[inline(always)]
1479    pub fn fentryd(
1480        self,
1481    ) -> crate::common::RegisterField<
1482        7,
1483        0x1,
1484        1,
1485        0,
1486        fentryr::Fentryd,
1487        fentryr::Fentryd,
1488        Fentryr_SPEC,
1489        crate::common::RW,
1490    > {
1491        crate::common::RegisterField::<
1492            7,
1493            0x1,
1494            1,
1495            0,
1496            fentryr::Fentryd,
1497            fentryr::Fentryd,
1498            Fentryr_SPEC,
1499            crate::common::RW,
1500        >::from_register(self, 0)
1501    }
1502
1503    #[doc = "Key Code"]
1504    #[inline(always)]
1505    pub fn key(
1506        self,
1507    ) -> crate::common::RegisterField<8, 0xff, 1, 0, u8, u8, Fentryr_SPEC, crate::common::W> {
1508        crate::common::RegisterField::<8,0xff,1,0,u8,u8,Fentryr_SPEC,crate::common::W>::from_register(self,0)
1509    }
1510}
1511impl ::core::default::Default for Fentryr {
1512    #[inline(always)]
1513    fn default() -> Fentryr {
1514        <crate::RegValueT<Fentryr_SPEC> as RegisterValue<_>>::new(0)
1515    }
1516}
1517pub mod fentryr {
1518
1519    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1520    pub struct Fentryc_SPEC;
1521    pub type Fentryc = crate::EnumBitfieldStruct<u8, Fentryc_SPEC>;
1522    impl Fentryc {
1523        #[doc = "Code flash is in read mode"]
1524        pub const _0: Self = Self::new(0);
1525
1526        #[doc = "Code flash is in P/E mode."]
1527        pub const _1: Self = Self::new(1);
1528    }
1529    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1530    pub struct Fentryd_SPEC;
1531    pub type Fentryd = crate::EnumBitfieldStruct<u8, Fentryd_SPEC>;
1532    impl Fentryd {
1533        #[doc = "Data flash is in read mode"]
1534        pub const _0: Self = Self::new(0);
1535
1536        #[doc = "Data flash is in P/E mode."]
1537        pub const _1: Self = Self::new(1);
1538    }
1539}
1540#[doc(hidden)]
1541#[derive(Copy, Clone, Eq, PartialEq)]
1542pub struct Fsuinitr_SPEC;
1543impl crate::sealed::RegSpec for Fsuinitr_SPEC {
1544    type DataType = u16;
1545}
1546
1547#[doc = "Flash Sequencer Setup Initialization Register"]
1548pub type Fsuinitr = crate::RegValueT<Fsuinitr_SPEC>;
1549
1550impl Fsuinitr {
1551    #[doc = "Set-Up Initialization"]
1552    #[inline(always)]
1553    pub fn suinit(
1554        self,
1555    ) -> crate::common::RegisterField<
1556        0,
1557        0x1,
1558        1,
1559        0,
1560        fsuinitr::Suinit,
1561        fsuinitr::Suinit,
1562        Fsuinitr_SPEC,
1563        crate::common::RW,
1564    > {
1565        crate::common::RegisterField::<
1566            0,
1567            0x1,
1568            1,
1569            0,
1570            fsuinitr::Suinit,
1571            fsuinitr::Suinit,
1572            Fsuinitr_SPEC,
1573            crate::common::RW,
1574        >::from_register(self, 0)
1575    }
1576
1577    #[doc = "Key Code"]
1578    #[inline(always)]
1579    pub fn key(
1580        self,
1581    ) -> crate::common::RegisterField<8, 0xff, 1, 0, u8, u8, Fsuinitr_SPEC, crate::common::W> {
1582        crate::common::RegisterField::<8,0xff,1,0,u8,u8,Fsuinitr_SPEC,crate::common::W>::from_register(self,0)
1583    }
1584}
1585impl ::core::default::Default for Fsuinitr {
1586    #[inline(always)]
1587    fn default() -> Fsuinitr {
1588        <crate::RegValueT<Fsuinitr_SPEC> as RegisterValue<_>>::new(0)
1589    }
1590}
1591pub mod fsuinitr {
1592
1593    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1594    pub struct Suinit_SPEC;
1595    pub type Suinit = crate::EnumBitfieldStruct<u8, Suinit_SPEC>;
1596    impl Suinit {
1597        #[doc = "The FSADDR, FEADDR, FBPROT0, FBPROT1, FENTRYR, FBCCNT, FCPSR, and FCNTSELR flash sequencer setup registers keep their current values"]
1598        pub const _0: Self = Self::new(0);
1599
1600        #[doc = "The FSADDR, FEADDR, FBPROT0, FBRPOT1, FENTRYR, FBCCNT, FCPSR, and FCNTSELR flash sequencer setup registers are initialized."]
1601        pub const _1: Self = Self::new(1);
1602    }
1603}
1604#[doc(hidden)]
1605#[derive(Copy, Clone, Eq, PartialEq)]
1606pub struct Fcmdr_SPEC;
1607impl crate::sealed::RegSpec for Fcmdr_SPEC {
1608    type DataType = u16;
1609}
1610
1611#[doc = "FACI Command Register"]
1612pub type Fcmdr = crate::RegValueT<Fcmdr_SPEC>;
1613
1614impl Fcmdr {
1615    #[doc = "Pre-command Flag"]
1616    #[inline(always)]
1617    pub fn pcmdr(
1618        self,
1619    ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, Fcmdr_SPEC, crate::common::R> {
1620        crate::common::RegisterField::<0,0xff,1,0,u8,u8,Fcmdr_SPEC,crate::common::R>::from_register(self,0)
1621    }
1622
1623    #[doc = "Command Flag"]
1624    #[inline(always)]
1625    pub fn cmdr(
1626        self,
1627    ) -> crate::common::RegisterField<8, 0xff, 1, 0, u8, u8, Fcmdr_SPEC, crate::common::R> {
1628        crate::common::RegisterField::<8,0xff,1,0,u8,u8,Fcmdr_SPEC,crate::common::R>::from_register(self,0)
1629    }
1630}
1631impl ::core::default::Default for Fcmdr {
1632    #[inline(always)]
1633    fn default() -> Fcmdr {
1634        <crate::RegValueT<Fcmdr_SPEC> as RegisterValue<_>>::new(0)
1635    }
1636}
1637
1638#[doc(hidden)]
1639#[derive(Copy, Clone, Eq, PartialEq)]
1640pub struct Fbccnt_SPEC;
1641impl crate::sealed::RegSpec for Fbccnt_SPEC {
1642    type DataType = u8;
1643}
1644
1645#[doc = "Blank Check Control Register"]
1646pub type Fbccnt = crate::RegValueT<Fbccnt_SPEC>;
1647
1648impl Fbccnt {
1649    #[doc = "Blank Check Direction"]
1650    #[inline(always)]
1651    pub fn bcdir(
1652        self,
1653    ) -> crate::common::RegisterField<
1654        0,
1655        0x1,
1656        1,
1657        0,
1658        fbccnt::Bcdir,
1659        fbccnt::Bcdir,
1660        Fbccnt_SPEC,
1661        crate::common::RW,
1662    > {
1663        crate::common::RegisterField::<
1664            0,
1665            0x1,
1666            1,
1667            0,
1668            fbccnt::Bcdir,
1669            fbccnt::Bcdir,
1670            Fbccnt_SPEC,
1671            crate::common::RW,
1672        >::from_register(self, 0)
1673    }
1674}
1675impl ::core::default::Default for Fbccnt {
1676    #[inline(always)]
1677    fn default() -> Fbccnt {
1678        <crate::RegValueT<Fbccnt_SPEC> as RegisterValue<_>>::new(0)
1679    }
1680}
1681pub mod fbccnt {
1682
1683    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1684    pub struct Bcdir_SPEC;
1685    pub type Bcdir = crate::EnumBitfieldStruct<u8, Bcdir_SPEC>;
1686    impl Bcdir {
1687        #[doc = "Blank checking is executed from the lower addresses to the higher addresses (incremental mode)"]
1688        pub const _0: Self = Self::new(0);
1689
1690        #[doc = "Blank checking is executed from the higher addresses to the lower addresses (decremental mode)."]
1691        pub const _1: Self = Self::new(1);
1692    }
1693}
1694#[doc(hidden)]
1695#[derive(Copy, Clone, Eq, PartialEq)]
1696pub struct Fbcstat_SPEC;
1697impl crate::sealed::RegSpec for Fbcstat_SPEC {
1698    type DataType = u8;
1699}
1700
1701#[doc = "Blank Check Status Register"]
1702pub type Fbcstat = crate::RegValueT<Fbcstat_SPEC>;
1703
1704impl Fbcstat {
1705    #[doc = "Blank Check Status Flag"]
1706    #[inline(always)]
1707    pub fn bcst(
1708        self,
1709    ) -> crate::common::RegisterField<
1710        0,
1711        0x1,
1712        1,
1713        0,
1714        fbcstat::Bcst,
1715        fbcstat::Bcst,
1716        Fbcstat_SPEC,
1717        crate::common::R,
1718    > {
1719        crate::common::RegisterField::<
1720            0,
1721            0x1,
1722            1,
1723            0,
1724            fbcstat::Bcst,
1725            fbcstat::Bcst,
1726            Fbcstat_SPEC,
1727            crate::common::R,
1728        >::from_register(self, 0)
1729    }
1730}
1731impl ::core::default::Default for Fbcstat {
1732    #[inline(always)]
1733    fn default() -> Fbcstat {
1734        <crate::RegValueT<Fbcstat_SPEC> as RegisterValue<_>>::new(0)
1735    }
1736}
1737pub mod fbcstat {
1738
1739    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1740    pub struct Bcst_SPEC;
1741    pub type Bcst = crate::EnumBitfieldStruct<u8, Bcst_SPEC>;
1742    impl Bcst {
1743        #[doc = "The target area is in the non-programmed state, that is, the area has been erased but has not yet been reprogrammed"]
1744        pub const _0: Self = Self::new(0);
1745
1746        #[doc = "The target area has been programmed with 0s or 1s."]
1747        pub const _1: Self = Self::new(1);
1748    }
1749}
1750#[doc(hidden)]
1751#[derive(Copy, Clone, Eq, PartialEq)]
1752pub struct Fpsaddr_SPEC;
1753impl crate::sealed::RegSpec for Fpsaddr_SPEC {
1754    type DataType = u32;
1755}
1756
1757#[doc = "Data Flash Programming Start Address Register"]
1758pub type Fpsaddr = crate::RegValueT<Fpsaddr_SPEC>;
1759
1760impl Fpsaddr {
1761    #[doc = "Programmed Area Start Address"]
1762    #[inline(always)]
1763    pub fn psadr(
1764        self,
1765    ) -> crate::common::RegisterField<0, 0x1ffff, 1, 0, u32, u32, Fpsaddr_SPEC, crate::common::R>
1766    {
1767        crate::common::RegisterField::<0,0x1ffff,1,0,u32,u32,Fpsaddr_SPEC,crate::common::R>::from_register(self,0)
1768    }
1769}
1770impl ::core::default::Default for Fpsaddr {
1771    #[inline(always)]
1772    fn default() -> Fpsaddr {
1773        <crate::RegValueT<Fpsaddr_SPEC> as RegisterValue<_>>::new(0)
1774    }
1775}
1776
1777#[doc(hidden)]
1778#[derive(Copy, Clone, Eq, PartialEq)]
1779pub struct Fsuasmon_SPEC;
1780impl crate::sealed::RegSpec for Fsuasmon_SPEC {
1781    type DataType = u32;
1782}
1783
1784#[doc = "Flash Startup Area Select Monitor Register"]
1785pub type Fsuasmon = crate::RegValueT<Fsuasmon_SPEC>;
1786
1787impl Fsuasmon {
1788    #[doc = "Protection Programming Flag to set Boot Flag and Startup Area Control"]
1789    #[inline(always)]
1790    pub fn fspr(
1791        self,
1792    ) -> crate::common::RegisterField<
1793        15,
1794        0x1,
1795        1,
1796        0,
1797        fsuasmon::Fspr,
1798        fsuasmon::Fspr,
1799        Fsuasmon_SPEC,
1800        crate::common::R,
1801    > {
1802        crate::common::RegisterField::<
1803            15,
1804            0x1,
1805            1,
1806            0,
1807            fsuasmon::Fspr,
1808            fsuasmon::Fspr,
1809            Fsuasmon_SPEC,
1810            crate::common::R,
1811        >::from_register(self, 0)
1812    }
1813
1814    #[doc = "Flag of Startup Area Select for Boot Swap"]
1815    #[inline(always)]
1816    pub fn btflg(
1817        self,
1818    ) -> crate::common::RegisterField<
1819        31,
1820        0x1,
1821        1,
1822        0,
1823        fsuasmon::Btflg,
1824        fsuasmon::Btflg,
1825        Fsuasmon_SPEC,
1826        crate::common::R,
1827    > {
1828        crate::common::RegisterField::<
1829            31,
1830            0x1,
1831            1,
1832            0,
1833            fsuasmon::Btflg,
1834            fsuasmon::Btflg,
1835            Fsuasmon_SPEC,
1836            crate::common::R,
1837        >::from_register(self, 0)
1838    }
1839}
1840impl ::core::default::Default for Fsuasmon {
1841    #[inline(always)]
1842    fn default() -> Fsuasmon {
1843        <crate::RegValueT<Fsuasmon_SPEC> as RegisterValue<_>>::new(0)
1844    }
1845}
1846pub mod fsuasmon {
1847
1848    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1849    pub struct Fspr_SPEC;
1850    pub type Fspr = crate::EnumBitfieldStruct<u8, Fspr_SPEC>;
1851    impl Fspr {
1852        #[doc = "Protected state"]
1853        pub const _0: Self = Self::new(0);
1854
1855        #[doc = "Non-protected state."]
1856        pub const _1: Self = Self::new(1);
1857    }
1858    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1859    pub struct Btflg_SPEC;
1860    pub type Btflg = crate::EnumBitfieldStruct<u8, Btflg_SPEC>;
1861    impl Btflg {
1862        #[doc = "The startup area is the alternate block (block 1)"]
1863        pub const _0: Self = Self::new(0);
1864
1865        #[doc = "The startup area is the default block (block 0)."]
1866        pub const _1: Self = Self::new(1);
1867    }
1868}
1869#[doc(hidden)]
1870#[derive(Copy, Clone, Eq, PartialEq)]
1871pub struct Fcpsr_SPEC;
1872impl crate::sealed::RegSpec for Fcpsr_SPEC {
1873    type DataType = u16;
1874}
1875
1876#[doc = "Flash Sequencer Processing Switching Register"]
1877pub type Fcpsr = crate::RegValueT<Fcpsr_SPEC>;
1878
1879impl Fcpsr {
1880    #[doc = "Erasure Suspend Mode"]
1881    #[inline(always)]
1882    pub fn esuspmd(
1883        self,
1884    ) -> crate::common::RegisterField<
1885        0,
1886        0x1,
1887        1,
1888        0,
1889        fcpsr::Esuspmd,
1890        fcpsr::Esuspmd,
1891        Fcpsr_SPEC,
1892        crate::common::RW,
1893    > {
1894        crate::common::RegisterField::<
1895            0,
1896            0x1,
1897            1,
1898            0,
1899            fcpsr::Esuspmd,
1900            fcpsr::Esuspmd,
1901            Fcpsr_SPEC,
1902            crate::common::RW,
1903        >::from_register(self, 0)
1904    }
1905}
1906impl ::core::default::Default for Fcpsr {
1907    #[inline(always)]
1908    fn default() -> Fcpsr {
1909        <crate::RegValueT<Fcpsr_SPEC> as RegisterValue<_>>::new(0)
1910    }
1911}
1912pub mod fcpsr {
1913
1914    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1915    pub struct Esuspmd_SPEC;
1916    pub type Esuspmd = crate::EnumBitfieldStruct<u8, Esuspmd_SPEC>;
1917    impl Esuspmd {
1918        #[doc = "Suspension priority mode"]
1919        pub const _0: Self = Self::new(0);
1920
1921        #[doc = "Erasure priority mode."]
1922        pub const _1: Self = Self::new(1);
1923    }
1924}
1925#[doc(hidden)]
1926#[derive(Copy, Clone, Eq, PartialEq)]
1927pub struct Fpckar_SPEC;
1928impl crate::sealed::RegSpec for Fpckar_SPEC {
1929    type DataType = u16;
1930}
1931
1932#[doc = "Flash Sequencer Processing Clock Notification Register"]
1933pub type Fpckar = crate::RegValueT<Fpckar_SPEC>;
1934
1935impl Fpckar {
1936    #[doc = "Flash Sequencer Operating Clock Notification"]
1937    #[inline(always)]
1938    pub fn pcka(
1939        self,
1940    ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, Fpckar_SPEC, crate::common::RW> {
1941        crate::common::RegisterField::<0,0xff,1,0,u8,u8,Fpckar_SPEC,crate::common::RW>::from_register(self,0)
1942    }
1943
1944    #[doc = "Key Code"]
1945    #[inline(always)]
1946    pub fn key(
1947        self,
1948    ) -> crate::common::RegisterField<8, 0xff, 1, 0, u8, u8, Fpckar_SPEC, crate::common::W> {
1949        crate::common::RegisterField::<8,0xff,1,0,u8,u8,Fpckar_SPEC,crate::common::W>::from_register(self,0)
1950    }
1951}
1952impl ::core::default::Default for Fpckar {
1953    #[inline(always)]
1954    fn default() -> Fpckar {
1955        <crate::RegValueT<Fpckar_SPEC> as RegisterValue<_>>::new(60)
1956    }
1957}
1958
1959#[doc(hidden)]
1960#[derive(Copy, Clone, Eq, PartialEq)]
1961pub struct Fsuacr_SPEC;
1962impl crate::sealed::RegSpec for Fsuacr_SPEC {
1963    type DataType = u16;
1964}
1965
1966#[doc = "Flash Startup Area Control Register"]
1967pub type Fsuacr = crate::RegValueT<Fsuacr_SPEC>;
1968
1969impl Fsuacr {
1970    #[doc = "Startup Area Select"]
1971    #[inline(always)]
1972    pub fn sas(
1973        self,
1974    ) -> crate::common::RegisterField<
1975        0,
1976        0x3,
1977        1,
1978        0,
1979        fsuacr::Sas,
1980        fsuacr::Sas,
1981        Fsuacr_SPEC,
1982        crate::common::RW,
1983    > {
1984        crate::common::RegisterField::<
1985            0,
1986            0x3,
1987            1,
1988            0,
1989            fsuacr::Sas,
1990            fsuacr::Sas,
1991            Fsuacr_SPEC,
1992            crate::common::RW,
1993        >::from_register(self, 0)
1994    }
1995
1996    #[doc = "Key Code"]
1997    #[inline(always)]
1998    pub fn key(
1999        self,
2000    ) -> crate::common::RegisterField<8, 0xff, 1, 0, u8, u8, Fsuacr_SPEC, crate::common::W> {
2001        crate::common::RegisterField::<8,0xff,1,0,u8,u8,Fsuacr_SPEC,crate::common::W>::from_register(self,0)
2002    }
2003}
2004impl ::core::default::Default for Fsuacr {
2005    #[inline(always)]
2006    fn default() -> Fsuacr {
2007        <crate::RegValueT<Fsuacr_SPEC> as RegisterValue<_>>::new(0)
2008    }
2009}
2010pub mod fsuacr {
2011
2012    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2013    pub struct Sas_SPEC;
2014    pub type Sas = crate::EnumBitfieldStruct<u8, Sas_SPEC>;
2015    impl Sas {
2016        #[doc = "Startup area is selected by BTFLG bit"]
2017        pub const _00: Self = Self::new(0);
2018
2019        #[doc = "Startup area is selected by BTFLG bit"]
2020        pub const _01: Self = Self::new(1);
2021
2022        #[doc = "Startup area is temporarily switched to the default area (block 0)"]
2023        pub const _10: Self = Self::new(2);
2024
2025        #[doc = "Startup area is temporarily switched to the alternate area (block 1)."]
2026        pub const _11: Self = Self::new(3);
2027    }
2028}