Skip to main content

ra0e1_pac/
flcn.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.10.00, with svd2pac 0.6.1 on Sun, 15 Mar 2026 07:00:13 +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 I/O Registers"]
28unsafe impl ::core::marker::Send for super::Flcn {}
29unsafe impl ::core::marker::Sync for super::Flcn {}
30impl super::Flcn {
31    #[allow(unused)]
32    #[inline(always)]
33    pub(crate) const fn _svd2pac_as_ptr(&self) -> *mut u8 {
34        self.ptr
35    }
36
37    #[doc = "Data Flash Control Register"]
38    #[inline(always)]
39    pub const fn dflctl(
40        &self,
41    ) -> &'static crate::common::Reg<self::Dflctl_SPEC, crate::common::RW> {
42        unsafe {
43            crate::common::Reg::<self::Dflctl_SPEC, crate::common::RW>::from_ptr(
44                self._svd2pac_as_ptr().add(144usize),
45            )
46        }
47    }
48
49    #[doc = "Flash P/E Mode Control Register"]
50    #[inline(always)]
51    pub const fn fpmcr(&self) -> &'static crate::common::Reg<self::Fpmcr_SPEC, crate::common::RW> {
52        unsafe {
53            crate::common::Reg::<self::Fpmcr_SPEC, crate::common::RW>::from_ptr(
54                self._svd2pac_as_ptr().add(256usize),
55            )
56        }
57    }
58
59    #[doc = "Flash Area Select Register"]
60    #[inline(always)]
61    pub const fn fasr(&self) -> &'static crate::common::Reg<self::Fasr_SPEC, crate::common::RW> {
62        unsafe {
63            crate::common::Reg::<self::Fasr_SPEC, crate::common::RW>::from_ptr(
64                self._svd2pac_as_ptr().add(260usize),
65            )
66        }
67    }
68
69    #[doc = "Flash Processing Start Address Register L"]
70    #[inline(always)]
71    pub const fn fsarl(&self) -> &'static crate::common::Reg<self::Fsarl_SPEC, crate::common::RW> {
72        unsafe {
73            crate::common::Reg::<self::Fsarl_SPEC, crate::common::RW>::from_ptr(
74                self._svd2pac_as_ptr().add(264usize),
75            )
76        }
77    }
78
79    #[doc = "Flash Processing Start Address Register H"]
80    #[inline(always)]
81    pub const fn fsarh(&self) -> &'static crate::common::Reg<self::Fsarh_SPEC, crate::common::RW> {
82        unsafe {
83            crate::common::Reg::<self::Fsarh_SPEC, crate::common::RW>::from_ptr(
84                self._svd2pac_as_ptr().add(272usize),
85            )
86        }
87    }
88
89    #[doc = "Flash Control Register"]
90    #[inline(always)]
91    pub const fn fcr(&self) -> &'static crate::common::Reg<self::Fcr_SPEC, crate::common::RW> {
92        unsafe {
93            crate::common::Reg::<self::Fcr_SPEC, crate::common::RW>::from_ptr(
94                self._svd2pac_as_ptr().add(276usize),
95            )
96        }
97    }
98
99    #[doc = "Flash Processing End Address Register L"]
100    #[inline(always)]
101    pub const fn fearl(&self) -> &'static crate::common::Reg<self::Fearl_SPEC, crate::common::RW> {
102        unsafe {
103            crate::common::Reg::<self::Fearl_SPEC, crate::common::RW>::from_ptr(
104                self._svd2pac_as_ptr().add(280usize),
105            )
106        }
107    }
108
109    #[doc = "Flash Processing End Address Register H"]
110    #[inline(always)]
111    pub const fn fearh(&self) -> &'static crate::common::Reg<self::Fearh_SPEC, crate::common::RW> {
112        unsafe {
113            crate::common::Reg::<self::Fearh_SPEC, crate::common::RW>::from_ptr(
114                self._svd2pac_as_ptr().add(288usize),
115            )
116        }
117    }
118
119    #[doc = "Flash Reset Register"]
120    #[inline(always)]
121    pub const fn fresetr(
122        &self,
123    ) -> &'static crate::common::Reg<self::Fresetr_SPEC, crate::common::RW> {
124        unsafe {
125            crate::common::Reg::<self::Fresetr_SPEC, crate::common::RW>::from_ptr(
126                self._svd2pac_as_ptr().add(292usize),
127            )
128        }
129    }
130
131    #[doc = "Flash Status Register 1"]
132    #[inline(always)]
133    pub const fn fstatr1(
134        &self,
135    ) -> &'static crate::common::Reg<self::Fstatr1_SPEC, crate::common::R> {
136        unsafe {
137            crate::common::Reg::<self::Fstatr1_SPEC, crate::common::R>::from_ptr(
138                self._svd2pac_as_ptr().add(300usize),
139            )
140        }
141    }
142
143    #[doc = "Flash Write Buffer Register L0"]
144    #[inline(always)]
145    pub const fn fwbl0(&self) -> &'static crate::common::Reg<self::Fwbl0_SPEC, crate::common::RW> {
146        unsafe {
147            crate::common::Reg::<self::Fwbl0_SPEC, crate::common::RW>::from_ptr(
148                self._svd2pac_as_ptr().add(304usize),
149            )
150        }
151    }
152
153    #[doc = "Flash Write Buffer Register H0"]
154    #[inline(always)]
155    pub const fn fwbh0(&self) -> &'static crate::common::Reg<self::Fwbh0_SPEC, crate::common::RW> {
156        unsafe {
157            crate::common::Reg::<self::Fwbh0_SPEC, crate::common::RW>::from_ptr(
158                self._svd2pac_as_ptr().add(312usize),
159            )
160        }
161    }
162
163    #[doc = "Protection Unlock Register"]
164    #[inline(always)]
165    pub const fn fpr(&self) -> &'static crate::common::Reg<self::Fpr_SPEC, crate::common::W> {
166        unsafe {
167            crate::common::Reg::<self::Fpr_SPEC, crate::common::W>::from_ptr(
168                self._svd2pac_as_ptr().add(384usize),
169            )
170        }
171    }
172
173    #[doc = "Protection Unlock Status Register"]
174    #[inline(always)]
175    pub const fn fpsr(&self) -> &'static crate::common::Reg<self::Fpsr_SPEC, crate::common::R> {
176        unsafe {
177            crate::common::Reg::<self::Fpsr_SPEC, crate::common::R>::from_ptr(
178                self._svd2pac_as_ptr().add(388usize),
179            )
180        }
181    }
182
183    #[doc = "Flash Startup Setting Monitor Register"]
184    #[inline(always)]
185    pub const fn fscmr(&self) -> &'static crate::common::Reg<self::Fscmr_SPEC, crate::common::R> {
186        unsafe {
187            crate::common::Reg::<self::Fscmr_SPEC, crate::common::R>::from_ptr(
188                self._svd2pac_as_ptr().add(448usize),
189            )
190        }
191    }
192
193    #[doc = "Flash Access Window Start Address Monitor Register"]
194    #[inline(always)]
195    pub const fn fawsmr(&self) -> &'static crate::common::Reg<self::Fawsmr_SPEC, crate::common::R> {
196        unsafe {
197            crate::common::Reg::<self::Fawsmr_SPEC, crate::common::R>::from_ptr(
198                self._svd2pac_as_ptr().add(456usize),
199            )
200        }
201    }
202
203    #[doc = "Flash Access Window End Address Monitor Register"]
204    #[inline(always)]
205    pub const fn fawemr(&self) -> &'static crate::common::Reg<self::Fawemr_SPEC, crate::common::R> {
206        unsafe {
207            crate::common::Reg::<self::Fawemr_SPEC, crate::common::R>::from_ptr(
208                self._svd2pac_as_ptr().add(464usize),
209            )
210        }
211    }
212
213    #[doc = "Flash Initial Setting Register"]
214    #[inline(always)]
215    pub const fn fisr(&self) -> &'static crate::common::Reg<self::Fisr_SPEC, crate::common::RW> {
216        unsafe {
217            crate::common::Reg::<self::Fisr_SPEC, crate::common::RW>::from_ptr(
218                self._svd2pac_as_ptr().add(472usize),
219            )
220        }
221    }
222
223    #[doc = "Flash Extra Area Control Register"]
224    #[inline(always)]
225    pub const fn fexcr(&self) -> &'static crate::common::Reg<self::Fexcr_SPEC, crate::common::RW> {
226        unsafe {
227            crate::common::Reg::<self::Fexcr_SPEC, crate::common::RW>::from_ptr(
228                self._svd2pac_as_ptr().add(476usize),
229            )
230        }
231    }
232
233    #[doc = "Flash Error Address Monitor Register L"]
234    #[inline(always)]
235    pub const fn feaml(&self) -> &'static crate::common::Reg<self::Feaml_SPEC, crate::common::R> {
236        unsafe {
237            crate::common::Reg::<self::Feaml_SPEC, crate::common::R>::from_ptr(
238                self._svd2pac_as_ptr().add(480usize),
239            )
240        }
241    }
242
243    #[doc = "Flash Error Address Monitor Register H"]
244    #[inline(always)]
245    pub const fn feamh(&self) -> &'static crate::common::Reg<self::Feamh_SPEC, crate::common::R> {
246        unsafe {
247            crate::common::Reg::<self::Feamh_SPEC, crate::common::R>::from_ptr(
248                self._svd2pac_as_ptr().add(488usize),
249            )
250        }
251    }
252
253    #[doc = "Flash Status Register 2"]
254    #[inline(always)]
255    pub const fn fstatr2(
256        &self,
257    ) -> &'static crate::common::Reg<self::Fstatr2_SPEC, crate::common::R> {
258        unsafe {
259            crate::common::Reg::<self::Fstatr2_SPEC, crate::common::R>::from_ptr(
260                self._svd2pac_as_ptr().add(496usize),
261            )
262        }
263    }
264
265    #[doc = "High-speed On-chip Oscillator Trimming Register"]
266    #[inline(always)]
267    pub const fn hiotrm(
268        &self,
269    ) -> &'static crate::common::Reg<self::Hiotrm_SPEC, crate::common::RW> {
270        unsafe {
271            crate::common::Reg::<self::Hiotrm_SPEC, crate::common::RW>::from_ptr(
272                self._svd2pac_as_ptr().add(512usize),
273            )
274        }
275    }
276
277    #[doc = "Flash Operating Mode Control Register"]
278    #[inline(always)]
279    pub const fn flmode(
280        &self,
281    ) -> &'static crate::common::Reg<self::Flmode_SPEC, crate::common::RW> {
282        unsafe {
283            crate::common::Reg::<self::Flmode_SPEC, crate::common::RW>::from_ptr(
284                self._svd2pac_as_ptr().add(522usize),
285            )
286        }
287    }
288
289    #[doc = "Flash Operating Mode Protect Register"]
290    #[inline(always)]
291    pub const fn flmwrp(
292        &self,
293    ) -> &'static crate::common::Reg<self::Flmwrp_SPEC, crate::common::RW> {
294        unsafe {
295            crate::common::Reg::<self::Flmwrp_SPEC, crate::common::RW>::from_ptr(
296                self._svd2pac_as_ptr().add(523usize),
297            )
298        }
299    }
300
301    #[doc = "Flash P/E Mode Entry Register"]
302    #[inline(always)]
303    pub const fn fentryr(
304        &self,
305    ) -> &'static crate::common::Reg<self::Fentryr_SPEC, crate::common::RW> {
306        unsafe {
307            crate::common::Reg::<self::Fentryr_SPEC, crate::common::RW>::from_ptr(
308                self._svd2pac_as_ptr().add(538usize),
309            )
310        }
311    }
312}
313#[doc(hidden)]
314#[derive(Copy, Clone, Eq, PartialEq)]
315pub struct Dflctl_SPEC;
316impl crate::sealed::RegSpec for Dflctl_SPEC {
317    type DataType = u8;
318}
319
320#[doc = "Data Flash Control Register"]
321pub type Dflctl = crate::RegValueT<Dflctl_SPEC>;
322
323impl Dflctl {
324    #[doc = "Data Flash Access Enable"]
325    #[inline(always)]
326    pub fn dflen(
327        self,
328    ) -> crate::common::RegisterField<
329        0,
330        0x1,
331        1,
332        0,
333        dflctl::Dflen,
334        dflctl::Dflen,
335        Dflctl_SPEC,
336        crate::common::RW,
337    > {
338        crate::common::RegisterField::<
339            0,
340            0x1,
341            1,
342            0,
343            dflctl::Dflen,
344            dflctl::Dflen,
345            Dflctl_SPEC,
346            crate::common::RW,
347        >::from_register(self, 0)
348    }
349}
350impl ::core::default::Default for Dflctl {
351    #[inline(always)]
352    fn default() -> Dflctl {
353        <crate::RegValueT<Dflctl_SPEC> as RegisterValue<_>>::new(0)
354    }
355}
356pub mod dflctl {
357
358    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
359    pub struct Dflen_SPEC;
360    pub type Dflen = crate::EnumBitfieldStruct<u8, Dflen_SPEC>;
361    impl Dflen {
362        #[doc = "Access to the data flash is disabled"]
363        pub const _0: Self = Self::new(0);
364
365        #[doc = "Access to the data flash is enabled"]
366        pub const _1: Self = Self::new(1);
367    }
368}
369#[doc(hidden)]
370#[derive(Copy, Clone, Eq, PartialEq)]
371pub struct Fpmcr_SPEC;
372impl crate::sealed::RegSpec for Fpmcr_SPEC {
373    type DataType = u8;
374}
375
376#[doc = "Flash P/E Mode Control Register"]
377pub type Fpmcr = crate::RegValueT<Fpmcr_SPEC>;
378
379impl Fpmcr {
380    #[doc = "Flash Operating Mode Select 0"]
381    #[inline(always)]
382    pub fn fms0(
383        self,
384    ) -> crate::common::RegisterField<
385        1,
386        0x1,
387        1,
388        0,
389        fpmcr::Fms0,
390        fpmcr::Fms0,
391        Fpmcr_SPEC,
392        crate::common::RW,
393    > {
394        crate::common::RegisterField::<
395            1,
396            0x1,
397            1,
398            0,
399            fpmcr::Fms0,
400            fpmcr::Fms0,
401            Fpmcr_SPEC,
402            crate::common::RW,
403        >::from_register(self, 0)
404    }
405
406    #[doc = "Code Flash P/E Disable"]
407    #[inline(always)]
408    pub fn rpdis(
409        self,
410    ) -> crate::common::RegisterField<
411        3,
412        0x1,
413        1,
414        0,
415        fpmcr::Rpdis,
416        fpmcr::Rpdis,
417        Fpmcr_SPEC,
418        crate::common::RW,
419    > {
420        crate::common::RegisterField::<
421            3,
422            0x1,
423            1,
424            0,
425            fpmcr::Rpdis,
426            fpmcr::Rpdis,
427            Fpmcr_SPEC,
428            crate::common::RW,
429        >::from_register(self, 0)
430    }
431
432    #[doc = "Flash Operating Mode Select 1"]
433    #[inline(always)]
434    pub fn fms1(self) -> crate::common::RegisterFieldBool<4, 1, 0, Fpmcr_SPEC, crate::common::RW> {
435        crate::common::RegisterFieldBool::<4, 1, 0, Fpmcr_SPEC, crate::common::RW>::from_register(
436            self, 0,
437        )
438    }
439}
440impl ::core::default::Default for Fpmcr {
441    #[inline(always)]
442    fn default() -> Fpmcr {
443        <crate::RegValueT<Fpmcr_SPEC> as RegisterValue<_>>::new(8)
444    }
445}
446pub mod fpmcr {
447
448    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
449    pub struct Fms0_SPEC;
450    pub type Fms0 = crate::EnumBitfieldStruct<u8, Fms0_SPEC>;
451    impl Fms0 {
452        #[doc = "FMS1 = 0: Read mode FMS1 = 1: Data flash P/E mode."]
453        pub const _0: Self = Self::new(0);
454
455        #[doc = "FMS1 = 0: Code flash P/E mode FMS1 = 1: Setting prohibited."]
456        pub const _1: Self = Self::new(1);
457    }
458    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
459    pub struct Rpdis_SPEC;
460    pub type Rpdis = crate::EnumBitfieldStruct<u8, Rpdis_SPEC>;
461    impl Rpdis {
462        #[doc = "Programming of the code flash is enabled"]
463        pub const _0: Self = Self::new(0);
464
465        #[doc = "Programming of the code flash is disabled."]
466        pub const _1: Self = Self::new(1);
467    }
468}
469#[doc(hidden)]
470#[derive(Copy, Clone, Eq, PartialEq)]
471pub struct Fasr_SPEC;
472impl crate::sealed::RegSpec for Fasr_SPEC {
473    type DataType = u8;
474}
475
476#[doc = "Flash Area Select Register"]
477pub type Fasr = crate::RegValueT<Fasr_SPEC>;
478
479impl Fasr {
480    #[doc = "Extra Area Select"]
481    #[inline(always)]
482    pub fn exs(
483        self,
484    ) -> crate::common::RegisterField<
485        0,
486        0x1,
487        1,
488        0,
489        fasr::Exs,
490        fasr::Exs,
491        Fasr_SPEC,
492        crate::common::RW,
493    > {
494        crate::common::RegisterField::<
495            0,
496            0x1,
497            1,
498            0,
499            fasr::Exs,
500            fasr::Exs,
501            Fasr_SPEC,
502            crate::common::RW,
503        >::from_register(self, 0)
504    }
505}
506impl ::core::default::Default for Fasr {
507    #[inline(always)]
508    fn default() -> Fasr {
509        <crate::RegValueT<Fasr_SPEC> as RegisterValue<_>>::new(0)
510    }
511}
512pub mod fasr {
513
514    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
515    pub struct Exs_SPEC;
516    pub type Exs = crate::EnumBitfieldStruct<u8, Exs_SPEC>;
517    impl Exs {
518        #[doc = "User area or data area"]
519        pub const _0: Self = Self::new(0);
520
521        #[doc = "Extra area."]
522        pub const _1: Self = Self::new(1);
523    }
524}
525#[doc(hidden)]
526#[derive(Copy, Clone, Eq, PartialEq)]
527pub struct Fsarl_SPEC;
528impl crate::sealed::RegSpec for Fsarl_SPEC {
529    type DataType = u16;
530}
531
532#[doc = "Flash Processing Start Address Register L"]
533pub type Fsarl = crate::RegValueT<Fsarl_SPEC>;
534
535impl Fsarl {
536    #[doc = "Flash Processing Start Address L"]
537    #[inline(always)]
538    pub fn fsarl(
539        self,
540    ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Fsarl_SPEC, crate::common::RW>
541    {
542        crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Fsarl_SPEC,crate::common::RW>::from_register(self,0)
543    }
544}
545impl ::core::default::Default for Fsarl {
546    #[inline(always)]
547    fn default() -> Fsarl {
548        <crate::RegValueT<Fsarl_SPEC> as RegisterValue<_>>::new(0)
549    }
550}
551
552#[doc(hidden)]
553#[derive(Copy, Clone, Eq, PartialEq)]
554pub struct Fsarh_SPEC;
555impl crate::sealed::RegSpec for Fsarh_SPEC {
556    type DataType = u16;
557}
558
559#[doc = "Flash Processing Start Address Register H"]
560pub type Fsarh = crate::RegValueT<Fsarh_SPEC>;
561
562impl Fsarh {
563    #[doc = "Flash Processing Start Address H"]
564    #[inline(always)]
565    pub fn fsarh(
566        self,
567    ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Fsarh_SPEC, crate::common::RW>
568    {
569        crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Fsarh_SPEC,crate::common::RW>::from_register(self,0)
570    }
571}
572impl ::core::default::Default for Fsarh {
573    #[inline(always)]
574    fn default() -> Fsarh {
575        <crate::RegValueT<Fsarh_SPEC> as RegisterValue<_>>::new(0)
576    }
577}
578
579#[doc(hidden)]
580#[derive(Copy, Clone, Eq, PartialEq)]
581pub struct Fcr_SPEC;
582impl crate::sealed::RegSpec for Fcr_SPEC {
583    type DataType = u8;
584}
585
586#[doc = "Flash Control Register"]
587pub type Fcr = crate::RegValueT<Fcr_SPEC>;
588
589impl Fcr {
590    #[doc = "Software Command Setting"]
591    #[inline(always)]
592    pub fn cmd(
593        self,
594    ) -> crate::common::RegisterField<0, 0xf, 1, 0, fcr::Cmd, fcr::Cmd, Fcr_SPEC, crate::common::RW>
595    {
596        crate::common::RegisterField::<0,0xf,1,0,fcr::Cmd,fcr::Cmd,Fcr_SPEC,crate::common::RW>::from_register(self,0)
597    }
598
599    #[doc = "Forced Processing Stop"]
600    #[inline(always)]
601    pub fn stop(self) -> crate::common::RegisterFieldBool<6, 1, 0, Fcr_SPEC, crate::common::RW> {
602        crate::common::RegisterFieldBool::<6, 1, 0, Fcr_SPEC, crate::common::RW>::from_register(
603            self, 0,
604        )
605    }
606
607    #[doc = "Processing Start"]
608    #[inline(always)]
609    pub fn opst(
610        self,
611    ) -> crate::common::RegisterField<7, 0x1, 1, 0, fcr::Opst, fcr::Opst, Fcr_SPEC, crate::common::RW>
612    {
613        crate::common::RegisterField::<
614            7,
615            0x1,
616            1,
617            0,
618            fcr::Opst,
619            fcr::Opst,
620            Fcr_SPEC,
621            crate::common::RW,
622        >::from_register(self, 0)
623    }
624}
625impl ::core::default::Default for Fcr {
626    #[inline(always)]
627    fn default() -> Fcr {
628        <crate::RegValueT<Fcr_SPEC> as RegisterValue<_>>::new(0)
629    }
630}
631pub mod fcr {
632
633    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
634    pub struct Cmd_SPEC;
635    pub type Cmd = crate::EnumBitfieldStruct<u8, Cmd_SPEC>;
636    impl Cmd {
637        #[doc = "Program"]
638        pub const _0_X_1: Self = Self::new(1);
639
640        #[doc = "Blank check (code flash)"]
641        pub const _0_X_3: Self = Self::new(3);
642
643        #[doc = "Block erase"]
644        pub const _0_X_4: Self = Self::new(4);
645
646        #[doc = "Blank check (data flash)"]
647        pub const _0_X_B: Self = Self::new(11);
648    }
649    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
650    pub struct Opst_SPEC;
651    pub type Opst = crate::EnumBitfieldStruct<u8, Opst_SPEC>;
652    impl Opst {
653        #[doc = "Processing stops"]
654        pub const _0: Self = Self::new(0);
655
656        #[doc = "Processing starts."]
657        pub const _1: Self = Self::new(1);
658    }
659}
660#[doc(hidden)]
661#[derive(Copy, Clone, Eq, PartialEq)]
662pub struct Fearl_SPEC;
663impl crate::sealed::RegSpec for Fearl_SPEC {
664    type DataType = u16;
665}
666
667#[doc = "Flash Processing End Address Register L"]
668pub type Fearl = crate::RegValueT<Fearl_SPEC>;
669
670impl Fearl {
671    #[doc = "Flash Processing End Address L"]
672    #[inline(always)]
673    pub fn fearl(
674        self,
675    ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Fearl_SPEC, crate::common::RW>
676    {
677        crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Fearl_SPEC,crate::common::RW>::from_register(self,0)
678    }
679}
680impl ::core::default::Default for Fearl {
681    #[inline(always)]
682    fn default() -> Fearl {
683        <crate::RegValueT<Fearl_SPEC> as RegisterValue<_>>::new(0)
684    }
685}
686
687#[doc(hidden)]
688#[derive(Copy, Clone, Eq, PartialEq)]
689pub struct Fearh_SPEC;
690impl crate::sealed::RegSpec for Fearh_SPEC {
691    type DataType = u16;
692}
693
694#[doc = "Flash Processing End Address Register H"]
695pub type Fearh = crate::RegValueT<Fearh_SPEC>;
696
697impl Fearh {
698    #[doc = "Flash Processing End Address H"]
699    #[inline(always)]
700    pub fn fearh(
701        self,
702    ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Fearh_SPEC, crate::common::RW>
703    {
704        crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Fearh_SPEC,crate::common::RW>::from_register(self,0)
705    }
706}
707impl ::core::default::Default for Fearh {
708    #[inline(always)]
709    fn default() -> Fearh {
710        <crate::RegValueT<Fearh_SPEC> as RegisterValue<_>>::new(0)
711    }
712}
713
714#[doc(hidden)]
715#[derive(Copy, Clone, Eq, PartialEq)]
716pub struct Fresetr_SPEC;
717impl crate::sealed::RegSpec for Fresetr_SPEC {
718    type DataType = u8;
719}
720
721#[doc = "Flash Reset Register"]
722pub type Fresetr = crate::RegValueT<Fresetr_SPEC>;
723
724impl Fresetr {
725    #[doc = "Software Reset of the Registers"]
726    #[inline(always)]
727    pub fn freset(
728        self,
729    ) -> crate::common::RegisterField<
730        0,
731        0x1,
732        1,
733        0,
734        fresetr::Freset,
735        fresetr::Freset,
736        Fresetr_SPEC,
737        crate::common::RW,
738    > {
739        crate::common::RegisterField::<
740            0,
741            0x1,
742            1,
743            0,
744            fresetr::Freset,
745            fresetr::Freset,
746            Fresetr_SPEC,
747            crate::common::RW,
748        >::from_register(self, 0)
749    }
750}
751impl ::core::default::Default for Fresetr {
752    #[inline(always)]
753    fn default() -> Fresetr {
754        <crate::RegValueT<Fresetr_SPEC> as RegisterValue<_>>::new(0)
755    }
756}
757pub mod fresetr {
758
759    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
760    pub struct Freset_SPEC;
761    pub type Freset = crate::EnumBitfieldStruct<u8, Freset_SPEC>;
762    impl Freset {
763        #[doc = "The registers related to the flash programming are not reset"]
764        pub const _0: Self = Self::new(0);
765
766        #[doc = "The registers related to the flash programming are reset."]
767        pub const _1: Self = Self::new(1);
768    }
769}
770#[doc(hidden)]
771#[derive(Copy, Clone, Eq, PartialEq)]
772pub struct Fstatr1_SPEC;
773impl crate::sealed::RegSpec for Fstatr1_SPEC {
774    type DataType = u8;
775}
776
777#[doc = "Flash Status Register 1"]
778pub type Fstatr1 = crate::RegValueT<Fstatr1_SPEC>;
779
780impl Fstatr1 {
781    #[doc = "Flash Ready Flag"]
782    #[inline(always)]
783    pub fn frdy(
784        self,
785    ) -> crate::common::RegisterField<
786        6,
787        0x1,
788        1,
789        0,
790        fstatr1::Frdy,
791        fstatr1::Frdy,
792        Fstatr1_SPEC,
793        crate::common::R,
794    > {
795        crate::common::RegisterField::<
796            6,
797            0x1,
798            1,
799            0,
800            fstatr1::Frdy,
801            fstatr1::Frdy,
802            Fstatr1_SPEC,
803            crate::common::R,
804        >::from_register(self, 0)
805    }
806
807    #[doc = "Extra Area Ready Flag"]
808    #[inline(always)]
809    pub fn exrdy(
810        self,
811    ) -> crate::common::RegisterField<
812        7,
813        0x1,
814        1,
815        0,
816        fstatr1::Exrdy,
817        fstatr1::Exrdy,
818        Fstatr1_SPEC,
819        crate::common::R,
820    > {
821        crate::common::RegisterField::<
822            7,
823            0x1,
824            1,
825            0,
826            fstatr1::Exrdy,
827            fstatr1::Exrdy,
828            Fstatr1_SPEC,
829            crate::common::R,
830        >::from_register(self, 0)
831    }
832}
833impl ::core::default::Default for Fstatr1 {
834    #[inline(always)]
835    fn default() -> Fstatr1 {
836        <crate::RegValueT<Fstatr1_SPEC> as RegisterValue<_>>::new(4)
837    }
838}
839pub mod fstatr1 {
840
841    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
842    pub struct Frdy_SPEC;
843    pub type Frdy = crate::EnumBitfieldStruct<u8, Frdy_SPEC>;
844    impl Frdy {
845        #[doc = "The software command of the FCR register is not terminated."]
846        pub const _0: Self = Self::new(0);
847
848        #[doc = "The software command of the FCR register is terminated."]
849        pub const _1: Self = Self::new(1);
850    }
851    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
852    pub struct Exrdy_SPEC;
853    pub type Exrdy = crate::EnumBitfieldStruct<u8, Exrdy_SPEC>;
854    impl Exrdy {
855        #[doc = "The software command of the FEXCR register is not terminated."]
856        pub const _0: Self = Self::new(0);
857
858        #[doc = "The software command of the FEXCR register is terminated."]
859        pub const _1: Self = Self::new(1);
860    }
861}
862#[doc(hidden)]
863#[derive(Copy, Clone, Eq, PartialEq)]
864pub struct Fwbl0_SPEC;
865impl crate::sealed::RegSpec for Fwbl0_SPEC {
866    type DataType = u16;
867}
868
869#[doc = "Flash Write Buffer Register L0"]
870pub type Fwbl0 = crate::RegValueT<Fwbl0_SPEC>;
871
872impl Fwbl0 {
873    #[doc = "Flash Write Buffer L0"]
874    #[inline(always)]
875    pub fn wdata(
876        self,
877    ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Fwbl0_SPEC, crate::common::RW>
878    {
879        crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Fwbl0_SPEC,crate::common::RW>::from_register(self,0)
880    }
881}
882impl ::core::default::Default for Fwbl0 {
883    #[inline(always)]
884    fn default() -> Fwbl0 {
885        <crate::RegValueT<Fwbl0_SPEC> as RegisterValue<_>>::new(0)
886    }
887}
888
889#[doc(hidden)]
890#[derive(Copy, Clone, Eq, PartialEq)]
891pub struct Fwbh0_SPEC;
892impl crate::sealed::RegSpec for Fwbh0_SPEC {
893    type DataType = u16;
894}
895
896#[doc = "Flash Write Buffer Register H0"]
897pub type Fwbh0 = crate::RegValueT<Fwbh0_SPEC>;
898
899impl Fwbh0 {
900    #[doc = "Flash Write Buffer H0"]
901    #[inline(always)]
902    pub fn wdata(
903        self,
904    ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Fwbh0_SPEC, crate::common::RW>
905    {
906        crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Fwbh0_SPEC,crate::common::RW>::from_register(self,0)
907    }
908}
909impl ::core::default::Default for Fwbh0 {
910    #[inline(always)]
911    fn default() -> Fwbh0 {
912        <crate::RegValueT<Fwbh0_SPEC> as RegisterValue<_>>::new(0)
913    }
914}
915
916#[doc(hidden)]
917#[derive(Copy, Clone, Eq, PartialEq)]
918pub struct Fpr_SPEC;
919impl crate::sealed::RegSpec for Fpr_SPEC {
920    type DataType = u8;
921}
922
923#[doc = "Protection Unlock Register"]
924pub type Fpr = crate::RegValueT<Fpr_SPEC>;
925
926impl Fpr {
927    #[doc = "Protection Unlock"]
928    #[inline(always)]
929    pub fn fpr(
930        self,
931    ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, Fpr_SPEC, crate::common::W> {
932        crate::common::RegisterField::<0,0xff,1,0,u8,u8,Fpr_SPEC,crate::common::W>::from_register(self,0)
933    }
934}
935impl ::core::default::Default for Fpr {
936    #[inline(always)]
937    fn default() -> Fpr {
938        <crate::RegValueT<Fpr_SPEC> as RegisterValue<_>>::new(0)
939    }
940}
941
942#[doc(hidden)]
943#[derive(Copy, Clone, Eq, PartialEq)]
944pub struct Fpsr_SPEC;
945impl crate::sealed::RegSpec for Fpsr_SPEC {
946    type DataType = u8;
947}
948
949#[doc = "Protection Unlock Status Register"]
950pub type Fpsr = crate::RegValueT<Fpsr_SPEC>;
951
952impl Fpsr {
953    #[doc = "Protect Error Flag"]
954    #[inline(always)]
955    pub fn perr(
956        self,
957    ) -> crate::common::RegisterField<
958        0,
959        0x1,
960        1,
961        0,
962        fpsr::Perr,
963        fpsr::Perr,
964        Fpsr_SPEC,
965        crate::common::R,
966    > {
967        crate::common::RegisterField::<
968            0,
969            0x1,
970            1,
971            0,
972            fpsr::Perr,
973            fpsr::Perr,
974            Fpsr_SPEC,
975            crate::common::R,
976        >::from_register(self, 0)
977    }
978}
979impl ::core::default::Default for Fpsr {
980    #[inline(always)]
981    fn default() -> Fpsr {
982        <crate::RegValueT<Fpsr_SPEC> as RegisterValue<_>>::new(0)
983    }
984}
985pub mod fpsr {
986
987    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
988    pub struct Perr_SPEC;
989    pub type Perr = crate::EnumBitfieldStruct<u8, Perr_SPEC>;
990    impl Perr {
991        #[doc = "No error"]
992        pub const _0: Self = Self::new(0);
993
994        #[doc = "An error occurs"]
995        pub const _1: Self = Self::new(1);
996    }
997}
998#[doc(hidden)]
999#[derive(Copy, Clone, Eq, PartialEq)]
1000pub struct Fscmr_SPEC;
1001impl crate::sealed::RegSpec for Fscmr_SPEC {
1002    type DataType = u16;
1003}
1004
1005#[doc = "Flash Startup Setting Monitor Register"]
1006pub type Fscmr = crate::RegValueT<Fscmr_SPEC>;
1007
1008impl Fscmr {
1009    #[doc = "Startup Area Setting Monitor Flag"]
1010    #[inline(always)]
1011    pub fn sasmf(
1012        self,
1013    ) -> crate::common::RegisterField<
1014        8,
1015        0x1,
1016        1,
1017        0,
1018        fscmr::Sasmf,
1019        fscmr::Sasmf,
1020        Fscmr_SPEC,
1021        crate::common::R,
1022    > {
1023        crate::common::RegisterField::<
1024            8,
1025            0x1,
1026            1,
1027            0,
1028            fscmr::Sasmf,
1029            fscmr::Sasmf,
1030            Fscmr_SPEC,
1031            crate::common::R,
1032        >::from_register(self, 0)
1033    }
1034
1035    #[doc = "Access Window Protection Flag"]
1036    #[inline(always)]
1037    pub fn fspr(
1038        self,
1039    ) -> crate::common::RegisterField<
1040        14,
1041        0x1,
1042        1,
1043        0,
1044        fscmr::Fspr,
1045        fscmr::Fspr,
1046        Fscmr_SPEC,
1047        crate::common::R,
1048    > {
1049        crate::common::RegisterField::<
1050            14,
1051            0x1,
1052            1,
1053            0,
1054            fscmr::Fspr,
1055            fscmr::Fspr,
1056            Fscmr_SPEC,
1057            crate::common::R,
1058        >::from_register(self, 0)
1059    }
1060}
1061impl ::core::default::Default for Fscmr {
1062    #[inline(always)]
1063    fn default() -> Fscmr {
1064        <crate::RegValueT<Fscmr_SPEC> as RegisterValue<_>>::new(0)
1065    }
1066}
1067pub mod fscmr {
1068
1069    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1070    pub struct Sasmf_SPEC;
1071    pub type Sasmf = crate::EnumBitfieldStruct<u8, Sasmf_SPEC>;
1072    impl Sasmf {
1073        #[doc = "Setting to start up using the alternative area"]
1074        pub const _0: Self = Self::new(0);
1075
1076        #[doc = "Setting to start up using the default area"]
1077        pub const _1: Self = Self::new(1);
1078    }
1079    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1080    pub struct Fspr_SPEC;
1081    pub type Fspr = crate::EnumBitfieldStruct<u8, Fspr_SPEC>;
1082    impl Fspr {
1083        #[doc = "Access window setting disabled."]
1084        pub const _0: Self = Self::new(0);
1085
1086        #[doc = "Access window setting enabled."]
1087        pub const _1: Self = Self::new(1);
1088    }
1089}
1090#[doc(hidden)]
1091#[derive(Copy, Clone, Eq, PartialEq)]
1092pub struct Fawsmr_SPEC;
1093impl crate::sealed::RegSpec for Fawsmr_SPEC {
1094    type DataType = u16;
1095}
1096
1097#[doc = "Flash Access Window Start Address Monitor Register"]
1098pub type Fawsmr = crate::RegValueT<Fawsmr_SPEC>;
1099
1100impl Fawsmr {
1101    #[doc = "Access Window Start Address"]
1102    #[inline(always)]
1103    pub fn faws(
1104        self,
1105    ) -> crate::common::RegisterField<0, 0x7ff, 1, 0, u16, u16, Fawsmr_SPEC, crate::common::R> {
1106        crate::common::RegisterField::<0,0x7ff,1,0,u16,u16,Fawsmr_SPEC,crate::common::R>::from_register(self,0)
1107    }
1108
1109    #[doc = "Access Window Protection Flag"]
1110    #[inline(always)]
1111    pub fn fspr(self) -> crate::common::RegisterFieldBool<15, 1, 0, Fawsmr_SPEC, crate::common::R> {
1112        crate::common::RegisterFieldBool::<15, 1, 0, Fawsmr_SPEC, crate::common::R>::from_register(
1113            self, 0,
1114        )
1115    }
1116}
1117impl ::core::default::Default for Fawsmr {
1118    #[inline(always)]
1119    fn default() -> Fawsmr {
1120        <crate::RegValueT<Fawsmr_SPEC> as RegisterValue<_>>::new(0)
1121    }
1122}
1123
1124#[doc(hidden)]
1125#[derive(Copy, Clone, Eq, PartialEq)]
1126pub struct Fawemr_SPEC;
1127impl crate::sealed::RegSpec for Fawemr_SPEC {
1128    type DataType = u16;
1129}
1130
1131#[doc = "Flash Access Window End Address Monitor Register"]
1132pub type Fawemr = crate::RegValueT<Fawemr_SPEC>;
1133
1134impl Fawemr {
1135    #[doc = "Access Window End Address"]
1136    #[inline(always)]
1137    pub fn fawe(
1138        self,
1139    ) -> crate::common::RegisterField<0, 0x7ff, 1, 0, u16, u16, Fawemr_SPEC, crate::common::R> {
1140        crate::common::RegisterField::<0,0x7ff,1,0,u16,u16,Fawemr_SPEC,crate::common::R>::from_register(self,0)
1141    }
1142
1143    #[doc = "Startup Area Setting Monitor Flag"]
1144    #[inline(always)]
1145    pub fn sasmf(
1146        self,
1147    ) -> crate::common::RegisterFieldBool<15, 1, 0, Fawemr_SPEC, crate::common::R> {
1148        crate::common::RegisterFieldBool::<15, 1, 0, Fawemr_SPEC, crate::common::R>::from_register(
1149            self, 0,
1150        )
1151    }
1152}
1153impl ::core::default::Default for Fawemr {
1154    #[inline(always)]
1155    fn default() -> Fawemr {
1156        <crate::RegValueT<Fawemr_SPEC> as RegisterValue<_>>::new(0)
1157    }
1158}
1159
1160#[doc(hidden)]
1161#[derive(Copy, Clone, Eq, PartialEq)]
1162pub struct Fisr_SPEC;
1163impl crate::sealed::RegSpec for Fisr_SPEC {
1164    type DataType = u8;
1165}
1166
1167#[doc = "Flash Initial Setting Register"]
1168pub type Fisr = crate::RegValueT<Fisr_SPEC>;
1169
1170impl Fisr {
1171    #[doc = "Flash-IF Clock Notification"]
1172    #[inline(always)]
1173    pub fn pcka(
1174        self,
1175    ) -> crate::common::RegisterField<0, 0x1f, 1, 0, u8, u8, Fisr_SPEC, crate::common::RW> {
1176        crate::common::RegisterField::<0,0x1f,1,0,u8,u8,Fisr_SPEC,crate::common::RW>::from_register(self,0)
1177    }
1178
1179    #[doc = "Startup Area Select"]
1180    #[inline(always)]
1181    pub fn sas(
1182        self,
1183    ) -> crate::common::RegisterField<
1184        6,
1185        0x3,
1186        1,
1187        0,
1188        fisr::Sas,
1189        fisr::Sas,
1190        Fisr_SPEC,
1191        crate::common::RW,
1192    > {
1193        crate::common::RegisterField::<
1194            6,
1195            0x3,
1196            1,
1197            0,
1198            fisr::Sas,
1199            fisr::Sas,
1200            Fisr_SPEC,
1201            crate::common::RW,
1202        >::from_register(self, 0)
1203    }
1204}
1205impl ::core::default::Default for Fisr {
1206    #[inline(always)]
1207    fn default() -> Fisr {
1208        <crate::RegValueT<Fisr_SPEC> as RegisterValue<_>>::new(0)
1209    }
1210}
1211pub mod fisr {
1212
1213    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1214    pub struct Sas_SPEC;
1215    pub type Sas = crate::EnumBitfieldStruct<u8, Sas_SPEC>;
1216    impl Sas {
1217        #[doc = "The startup area is switched to the default area temporarily"]
1218        pub const _10: Self = Self::new(2);
1219
1220        #[doc = "The startup area is switched to the alternate area temporarily."]
1221        pub const _11: Self = Self::new(3);
1222    }
1223}
1224#[doc(hidden)]
1225#[derive(Copy, Clone, Eq, PartialEq)]
1226pub struct Fexcr_SPEC;
1227impl crate::sealed::RegSpec for Fexcr_SPEC {
1228    type DataType = u8;
1229}
1230
1231#[doc = "Flash Extra Area Control Register"]
1232pub type Fexcr = crate::RegValueT<Fexcr_SPEC>;
1233
1234impl Fexcr {
1235    #[doc = "Software Command Setting"]
1236    #[inline(always)]
1237    pub fn cmd(
1238        self,
1239    ) -> crate::common::RegisterField<
1240        0,
1241        0x7,
1242        1,
1243        0,
1244        fexcr::Cmd,
1245        fexcr::Cmd,
1246        Fexcr_SPEC,
1247        crate::common::RW,
1248    > {
1249        crate::common::RegisterField::<
1250            0,
1251            0x7,
1252            1,
1253            0,
1254            fexcr::Cmd,
1255            fexcr::Cmd,
1256            Fexcr_SPEC,
1257            crate::common::RW,
1258        >::from_register(self, 0)
1259    }
1260
1261    #[doc = "Processing Start"]
1262    #[inline(always)]
1263    pub fn opst(
1264        self,
1265    ) -> crate::common::RegisterField<
1266        7,
1267        0x1,
1268        1,
1269        0,
1270        fexcr::Opst,
1271        fexcr::Opst,
1272        Fexcr_SPEC,
1273        crate::common::RW,
1274    > {
1275        crate::common::RegisterField::<
1276            7,
1277            0x1,
1278            1,
1279            0,
1280            fexcr::Opst,
1281            fexcr::Opst,
1282            Fexcr_SPEC,
1283            crate::common::RW,
1284        >::from_register(self, 0)
1285    }
1286}
1287impl ::core::default::Default for Fexcr {
1288    #[inline(always)]
1289    fn default() -> Fexcr {
1290        <crate::RegValueT<Fexcr_SPEC> as RegisterValue<_>>::new(0)
1291    }
1292}
1293pub mod fexcr {
1294
1295    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1296    pub struct Cmd_SPEC;
1297    pub type Cmd = crate::EnumBitfieldStruct<u8, Cmd_SPEC>;
1298    impl Cmd {
1299        #[doc = "Access window information program Startup area selection and security setting"]
1300        pub const _010: Self = Self::new(2);
1301
1302        #[doc = "OCDID1 program"]
1303        pub const _011: Self = Self::new(3);
1304
1305        #[doc = "OCDID2 program"]
1306        pub const _100: Self = Self::new(4);
1307
1308        #[doc = "OCDID3 program"]
1309        pub const _101: Self = Self::new(5);
1310
1311        #[doc = "OCDID4 program"]
1312        pub const _110: Self = Self::new(6);
1313    }
1314    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1315    pub struct Opst_SPEC;
1316    pub type Opst = crate::EnumBitfieldStruct<u8, Opst_SPEC>;
1317    impl Opst {
1318        #[doc = "Processing stops"]
1319        pub const _0: Self = Self::new(0);
1320
1321        #[doc = "Processing starts."]
1322        pub const _1: Self = Self::new(1);
1323    }
1324}
1325#[doc(hidden)]
1326#[derive(Copy, Clone, Eq, PartialEq)]
1327pub struct Feaml_SPEC;
1328impl crate::sealed::RegSpec for Feaml_SPEC {
1329    type DataType = u16;
1330}
1331
1332#[doc = "Flash Error Address Monitor Register L"]
1333pub type Feaml = crate::RegValueT<Feaml_SPEC>;
1334
1335impl Feaml {
1336    #[doc = "Flash Error Address Monitor Register L"]
1337    #[inline(always)]
1338    pub fn feaml(
1339        self,
1340    ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Feaml_SPEC, crate::common::R> {
1341        crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Feaml_SPEC,crate::common::R>::from_register(self,0)
1342    }
1343}
1344impl ::core::default::Default for Feaml {
1345    #[inline(always)]
1346    fn default() -> Feaml {
1347        <crate::RegValueT<Feaml_SPEC> as RegisterValue<_>>::new(0)
1348    }
1349}
1350
1351#[doc(hidden)]
1352#[derive(Copy, Clone, Eq, PartialEq)]
1353pub struct Feamh_SPEC;
1354impl crate::sealed::RegSpec for Feamh_SPEC {
1355    type DataType = u16;
1356}
1357
1358#[doc = "Flash Error Address Monitor Register H"]
1359pub type Feamh = crate::RegValueT<Feamh_SPEC>;
1360
1361impl Feamh {
1362    #[doc = "Flash Error Address Monitor Register H"]
1363    #[inline(always)]
1364    pub fn feamh(
1365        self,
1366    ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Feamh_SPEC, crate::common::R> {
1367        crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Feamh_SPEC,crate::common::R>::from_register(self,0)
1368    }
1369}
1370impl ::core::default::Default for Feamh {
1371    #[inline(always)]
1372    fn default() -> Feamh {
1373        <crate::RegValueT<Feamh_SPEC> as RegisterValue<_>>::new(0)
1374    }
1375}
1376
1377#[doc(hidden)]
1378#[derive(Copy, Clone, Eq, PartialEq)]
1379pub struct Fstatr2_SPEC;
1380impl crate::sealed::RegSpec for Fstatr2_SPEC {
1381    type DataType = u16;
1382}
1383
1384#[doc = "Flash Status Register 2"]
1385pub type Fstatr2 = crate::RegValueT<Fstatr2_SPEC>;
1386
1387impl Fstatr2 {
1388    #[doc = "Erase Error Flag"]
1389    #[inline(always)]
1390    pub fn ererr(
1391        self,
1392    ) -> crate::common::RegisterField<
1393        0,
1394        0x1,
1395        1,
1396        0,
1397        fstatr2::Ererr,
1398        fstatr2::Ererr,
1399        Fstatr2_SPEC,
1400        crate::common::R,
1401    > {
1402        crate::common::RegisterField::<
1403            0,
1404            0x1,
1405            1,
1406            0,
1407            fstatr2::Ererr,
1408            fstatr2::Ererr,
1409            Fstatr2_SPEC,
1410            crate::common::R,
1411        >::from_register(self, 0)
1412    }
1413
1414    #[doc = "Program Error Flag"]
1415    #[inline(always)]
1416    pub fn prgerr(
1417        self,
1418    ) -> crate::common::RegisterField<
1419        1,
1420        0x1,
1421        1,
1422        0,
1423        fstatr2::Prgerr,
1424        fstatr2::Prgerr,
1425        Fstatr2_SPEC,
1426        crate::common::R,
1427    > {
1428        crate::common::RegisterField::<
1429            1,
1430            0x1,
1431            1,
1432            0,
1433            fstatr2::Prgerr,
1434            fstatr2::Prgerr,
1435            Fstatr2_SPEC,
1436            crate::common::R,
1437        >::from_register(self, 0)
1438    }
1439
1440    #[doc = "Blank Check Error Flag"]
1441    #[inline(always)]
1442    pub fn bcerr(
1443        self,
1444    ) -> crate::common::RegisterField<
1445        3,
1446        0x1,
1447        1,
1448        0,
1449        fstatr2::Bcerr,
1450        fstatr2::Bcerr,
1451        Fstatr2_SPEC,
1452        crate::common::R,
1453    > {
1454        crate::common::RegisterField::<
1455            3,
1456            0x1,
1457            1,
1458            0,
1459            fstatr2::Bcerr,
1460            fstatr2::Bcerr,
1461            Fstatr2_SPEC,
1462            crate::common::R,
1463        >::from_register(self, 0)
1464    }
1465
1466    #[doc = "Illegal Command Error Flag"]
1467    #[inline(always)]
1468    pub fn ilglerr(
1469        self,
1470    ) -> crate::common::RegisterField<
1471        4,
1472        0x1,
1473        1,
1474        0,
1475        fstatr2::Ilglerr,
1476        fstatr2::Ilglerr,
1477        Fstatr2_SPEC,
1478        crate::common::R,
1479    > {
1480        crate::common::RegisterField::<
1481            4,
1482            0x1,
1483            1,
1484            0,
1485            fstatr2::Ilglerr,
1486            fstatr2::Ilglerr,
1487            Fstatr2_SPEC,
1488            crate::common::R,
1489        >::from_register(self, 0)
1490    }
1491
1492    #[doc = "Extra Area Illegal Command Error Flag"]
1493    #[inline(always)]
1494    pub fn eilglerr(
1495        self,
1496    ) -> crate::common::RegisterField<
1497        5,
1498        0x1,
1499        1,
1500        0,
1501        fstatr2::Eilglerr,
1502        fstatr2::Eilglerr,
1503        Fstatr2_SPEC,
1504        crate::common::R,
1505    > {
1506        crate::common::RegisterField::<
1507            5,
1508            0x1,
1509            1,
1510            0,
1511            fstatr2::Eilglerr,
1512            fstatr2::Eilglerr,
1513            Fstatr2_SPEC,
1514            crate::common::R,
1515        >::from_register(self, 0)
1516    }
1517}
1518impl ::core::default::Default for Fstatr2 {
1519    #[inline(always)]
1520    fn default() -> Fstatr2 {
1521        <crate::RegValueT<Fstatr2_SPEC> as RegisterValue<_>>::new(0)
1522    }
1523}
1524pub mod fstatr2 {
1525
1526    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1527    pub struct Ererr_SPEC;
1528    pub type Ererr = crate::EnumBitfieldStruct<u8, Ererr_SPEC>;
1529    impl Ererr {
1530        #[doc = "Erasure terminates normally"]
1531        pub const _0: Self = Self::new(0);
1532
1533        #[doc = "An error occurs during erasure"]
1534        pub const _1: Self = Self::new(1);
1535    }
1536    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1537    pub struct Prgerr_SPEC;
1538    pub type Prgerr = crate::EnumBitfieldStruct<u8, Prgerr_SPEC>;
1539    impl Prgerr {
1540        #[doc = "Programming terminates normally"]
1541        pub const _0: Self = Self::new(0);
1542
1543        #[doc = "An error occurs during programming."]
1544        pub const _1: Self = Self::new(1);
1545    }
1546    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1547    pub struct Bcerr_SPEC;
1548    pub type Bcerr = crate::EnumBitfieldStruct<u8, Bcerr_SPEC>;
1549    impl Bcerr {
1550        #[doc = "Blank checking terminates normally"]
1551        pub const _0: Self = Self::new(0);
1552
1553        #[doc = "An error occurs during blank checking."]
1554        pub const _1: Self = Self::new(1);
1555    }
1556    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1557    pub struct Ilglerr_SPEC;
1558    pub type Ilglerr = crate::EnumBitfieldStruct<u8, Ilglerr_SPEC>;
1559    impl Ilglerr {
1560        #[doc = "No illegal software command or illegal access is detected"]
1561        pub const _0: Self = Self::new(0);
1562
1563        #[doc = "An illegal command or illegal access is detected."]
1564        pub const _1: Self = Self::new(1);
1565    }
1566    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1567    pub struct Eilglerr_SPEC;
1568    pub type Eilglerr = crate::EnumBitfieldStruct<u8, Eilglerr_SPEC>;
1569    impl Eilglerr {
1570        #[doc = "No illegal command or illegal access to the extra area is detected"]
1571        pub const _0: Self = Self::new(0);
1572
1573        #[doc = "An illegal command or illegal access to the extra area is detected."]
1574        pub const _1: Self = Self::new(1);
1575    }
1576}
1577#[doc(hidden)]
1578#[derive(Copy, Clone, Eq, PartialEq)]
1579pub struct Hiotrm_SPEC;
1580impl crate::sealed::RegSpec for Hiotrm_SPEC {
1581    type DataType = u8;
1582}
1583
1584#[doc = "High-speed On-chip Oscillator Trimming Register"]
1585pub type Hiotrm = crate::RegValueT<Hiotrm_SPEC>;
1586
1587impl Hiotrm {
1588    #[doc = "HOCO User Trimming"]
1589    #[inline(always)]
1590    pub fn hiotrm(
1591        self,
1592    ) -> crate::common::RegisterField<0, 0x3f, 1, 0, u8, u8, Hiotrm_SPEC, crate::common::RW> {
1593        crate::common::RegisterField::<0,0x3f,1,0,u8,u8,Hiotrm_SPEC,crate::common::RW>::from_register(self,0)
1594    }
1595}
1596impl ::core::default::Default for Hiotrm {
1597    #[inline(always)]
1598    fn default() -> Hiotrm {
1599        <crate::RegValueT<Hiotrm_SPEC> as RegisterValue<_>>::new(0)
1600    }
1601}
1602
1603#[doc(hidden)]
1604#[derive(Copy, Clone, Eq, PartialEq)]
1605pub struct Flmode_SPEC;
1606impl crate::sealed::RegSpec for Flmode_SPEC {
1607    type DataType = u8;
1608}
1609
1610#[doc = "Flash Operating Mode Control Register"]
1611pub type Flmode = crate::RegValueT<Flmode_SPEC>;
1612
1613impl Flmode {
1614    #[doc = "Operating Mode Select"]
1615    #[inline(always)]
1616    pub fn mode(
1617        self,
1618    ) -> crate::common::RegisterField<
1619        6,
1620        0x3,
1621        1,
1622        0,
1623        flmode::Mode,
1624        flmode::Mode,
1625        Flmode_SPEC,
1626        crate::common::RW,
1627    > {
1628        crate::common::RegisterField::<
1629            6,
1630            0x3,
1631            1,
1632            0,
1633            flmode::Mode,
1634            flmode::Mode,
1635            Flmode_SPEC,
1636            crate::common::RW,
1637        >::from_register(self, 0)
1638    }
1639}
1640impl ::core::default::Default for Flmode {
1641    #[inline(always)]
1642    fn default() -> Flmode {
1643        <crate::RegValueT<Flmode_SPEC> as RegisterValue<_>>::new(128)
1644    }
1645}
1646pub mod flmode {
1647
1648    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1649    pub struct Mode_SPEC;
1650    pub type Mode = crate::EnumBitfieldStruct<u8, Mode_SPEC>;
1651    impl Mode {
1652        #[doc = "Setting prohibited"]
1653        pub const _00: Self = Self::new(0);
1654
1655        #[doc = "Low-speed mode"]
1656        pub const _01: Self = Self::new(1);
1657
1658        #[doc = "Middle-speed mode"]
1659        pub const _10: Self = Self::new(2);
1660
1661        #[doc = "High-speed mode"]
1662        pub const _11: Self = Self::new(3);
1663    }
1664}
1665#[doc(hidden)]
1666#[derive(Copy, Clone, Eq, PartialEq)]
1667pub struct Flmwrp_SPEC;
1668impl crate::sealed::RegSpec for Flmwrp_SPEC {
1669    type DataType = u8;
1670}
1671
1672#[doc = "Flash Operating Mode Protect Register"]
1673pub type Flmwrp = crate::RegValueT<Flmwrp_SPEC>;
1674
1675impl Flmwrp {
1676    #[doc = "Control of Flash Operation Mode Select Register"]
1677    #[inline(always)]
1678    pub fn flmwen(
1679        self,
1680    ) -> crate::common::RegisterField<
1681        0,
1682        0x1,
1683        1,
1684        0,
1685        flmwrp::Flmwen,
1686        flmwrp::Flmwen,
1687        Flmwrp_SPEC,
1688        crate::common::RW,
1689    > {
1690        crate::common::RegisterField::<
1691            0,
1692            0x1,
1693            1,
1694            0,
1695            flmwrp::Flmwen,
1696            flmwrp::Flmwen,
1697            Flmwrp_SPEC,
1698            crate::common::RW,
1699        >::from_register(self, 0)
1700    }
1701}
1702impl ::core::default::Default for Flmwrp {
1703    #[inline(always)]
1704    fn default() -> Flmwrp {
1705        <crate::RegValueT<Flmwrp_SPEC> as RegisterValue<_>>::new(0)
1706    }
1707}
1708pub mod flmwrp {
1709
1710    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1711    pub struct Flmwen_SPEC;
1712    pub type Flmwen = crate::EnumBitfieldStruct<u8, Flmwen_SPEC>;
1713    impl Flmwen {
1714        #[doc = "Rewriting the FLMODE register is disabled"]
1715        pub const _0: Self = Self::new(0);
1716
1717        #[doc = "Rewriting the FLMODE register is enabled"]
1718        pub const _1: Self = Self::new(1);
1719    }
1720}
1721#[doc(hidden)]
1722#[derive(Copy, Clone, Eq, PartialEq)]
1723pub struct Fentryr_SPEC;
1724impl crate::sealed::RegSpec for Fentryr_SPEC {
1725    type DataType = u16;
1726}
1727
1728#[doc = "Flash P/E Mode Entry Register"]
1729pub type Fentryr = crate::RegValueT<Fentryr_SPEC>;
1730
1731impl Fentryr {
1732    #[doc = "Code Flash P/E Mode Entry 0"]
1733    #[inline(always)]
1734    pub fn fentry0(
1735        self,
1736    ) -> crate::common::RegisterField<
1737        0,
1738        0x1,
1739        1,
1740        0,
1741        fentryr::Fentry0,
1742        fentryr::Fentry0,
1743        Fentryr_SPEC,
1744        crate::common::RW,
1745    > {
1746        crate::common::RegisterField::<
1747            0,
1748            0x1,
1749            1,
1750            0,
1751            fentryr::Fentry0,
1752            fentryr::Fentry0,
1753            Fentryr_SPEC,
1754            crate::common::RW,
1755        >::from_register(self, 0)
1756    }
1757
1758    #[doc = "Data Flash P/E Mode Entry"]
1759    #[inline(always)]
1760    pub fn fentryd(
1761        self,
1762    ) -> crate::common::RegisterField<
1763        7,
1764        0x1,
1765        1,
1766        0,
1767        fentryr::Fentryd,
1768        fentryr::Fentryd,
1769        Fentryr_SPEC,
1770        crate::common::RW,
1771    > {
1772        crate::common::RegisterField::<
1773            7,
1774            0x1,
1775            1,
1776            0,
1777            fentryr::Fentryd,
1778            fentryr::Fentryd,
1779            Fentryr_SPEC,
1780            crate::common::RW,
1781        >::from_register(self, 0)
1782    }
1783
1784    #[doc = "Key Code"]
1785    #[inline(always)]
1786    pub fn fekey(
1787        self,
1788    ) -> crate::common::RegisterField<8, 0xff, 1, 0, u8, u8, Fentryr_SPEC, crate::common::W> {
1789        crate::common::RegisterField::<8,0xff,1,0,u8,u8,Fentryr_SPEC,crate::common::W>::from_register(self,0)
1790    }
1791}
1792impl ::core::default::Default for Fentryr {
1793    #[inline(always)]
1794    fn default() -> Fentryr {
1795        <crate::RegValueT<Fentryr_SPEC> as RegisterValue<_>>::new(0)
1796    }
1797}
1798pub mod fentryr {
1799
1800    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1801    pub struct Fentry0_SPEC;
1802    pub type Fentry0 = crate::EnumBitfieldStruct<u8, Fentry0_SPEC>;
1803    impl Fentry0 {
1804        #[doc = "The code flash is the read mode"]
1805        pub const _0: Self = Self::new(0);
1806
1807        #[doc = "The code flash is the P/E mode."]
1808        pub const _1: Self = Self::new(1);
1809    }
1810    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1811    pub struct Fentryd_SPEC;
1812    pub type Fentryd = crate::EnumBitfieldStruct<u8, Fentryd_SPEC>;
1813    impl Fentryd {
1814        #[doc = "The data flash is the read mode"]
1815        pub const _0: Self = Self::new(0);
1816
1817        #[doc = "The data flash is the P/E mode."]
1818        pub const _1: Self = Self::new(1);
1819    }
1820}