1#![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"Memory Mirror Function"]
28unsafe impl ::core::marker::Send for super::Mmf {}
29unsafe impl ::core::marker::Sync for super::Mmf {}
30impl super::Mmf {
31 #[allow(unused)]
32 #[inline(always)]
33 pub(crate) const fn _svd2pac_as_ptr(&self) -> *mut u8 {
34 self.ptr
35 }
36
37 #[doc = "MemMirror Special Function Register"]
38 #[inline(always)]
39 pub const fn mmsfr(&self) -> &'static crate::common::Reg<self::Mmsfr_SPEC, crate::common::RW> {
40 unsafe {
41 crate::common::Reg::<self::Mmsfr_SPEC, crate::common::RW>::from_ptr(
42 self._svd2pac_as_ptr().add(0usize),
43 )
44 }
45 }
46
47 #[doc = "MemMirror Enable Register"]
48 #[inline(always)]
49 pub const fn mmen(&self) -> &'static crate::common::Reg<self::Mmen_SPEC, crate::common::RW> {
50 unsafe {
51 crate::common::Reg::<self::Mmen_SPEC, crate::common::RW>::from_ptr(
52 self._svd2pac_as_ptr().add(4usize),
53 )
54 }
55 }
56}
57#[doc(hidden)]
58#[derive(Copy, Clone, Eq, PartialEq)]
59pub struct Mmsfr_SPEC;
60impl crate::sealed::RegSpec for Mmsfr_SPEC {
61 type DataType = u32;
62}
63
64#[doc = "MemMirror Special Function Register"]
65pub type Mmsfr = crate::RegValueT<Mmsfr_SPEC>;
66
67impl Mmsfr {
68 #[doc = "Memory Mirror Address"]
69 #[inline(always)]
70 pub fn memmiraddr(
71 self,
72 ) -> crate::common::RegisterField<7, 0xffff, 1, 0, u16, u16, Mmsfr_SPEC, crate::common::RW>
73 {
74 crate::common::RegisterField::<7,0xffff,1,0,u16,u16,Mmsfr_SPEC,crate::common::RW>::from_register(self,0)
75 }
76
77 #[doc = "MMSFR Key Code"]
78 #[inline(always)]
79 pub fn key(
80 self,
81 ) -> crate::common::RegisterField<24, 0xff, 1, 0, u8, u8, Mmsfr_SPEC, crate::common::W> {
82 crate::common::RegisterField::<24,0xff,1,0,u8,u8,Mmsfr_SPEC,crate::common::W>::from_register(self,0)
83 }
84}
85impl ::core::default::Default for Mmsfr {
86 #[inline(always)]
87 fn default() -> Mmsfr {
88 <crate::RegValueT<Mmsfr_SPEC> as RegisterValue<_>>::new(0)
89 }
90}
91
92#[doc(hidden)]
93#[derive(Copy, Clone, Eq, PartialEq)]
94pub struct Mmen_SPEC;
95impl crate::sealed::RegSpec for Mmen_SPEC {
96 type DataType = u32;
97}
98
99#[doc = "MemMirror Enable Register"]
100pub type Mmen = crate::RegValueT<Mmen_SPEC>;
101
102impl Mmen {
103 #[doc = "Memory Mirror Function Enable"]
104 #[inline(always)]
105 pub fn en(
106 self,
107 ) -> crate::common::RegisterField<0, 0x1, 1, 0, mmen::En, mmen::En, Mmen_SPEC, crate::common::RW>
108 {
109 crate::common::RegisterField::<0,0x1,1,0,mmen::En,mmen::En,Mmen_SPEC,crate::common::RW>::from_register(self,0)
110 }
111
112 #[doc = "MMEN Key Code"]
113 #[inline(always)]
114 pub fn key(
115 self,
116 ) -> crate::common::RegisterField<24, 0xff, 1, 0, u8, u8, Mmen_SPEC, crate::common::W> {
117 crate::common::RegisterField::<24,0xff,1,0,u8,u8,Mmen_SPEC,crate::common::W>::from_register(self,0)
118 }
119}
120impl ::core::default::Default for Mmen {
121 #[inline(always)]
122 fn default() -> Mmen {
123 <crate::RegValueT<Mmen_SPEC> as RegisterValue<_>>::new(0)
124 }
125}
126pub mod mmen {
127
128 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
129 pub struct En_SPEC;
130 pub type En = crate::EnumBitfieldStruct<u8, En_SPEC>;
131 impl En {
132 #[doc = "Disable MMF"]
133 pub const _0: Self = Self::new(0);
134
135 #[doc = "Enable MMF"]
136 pub const _1: Self = Self::new(1);
137 }
138}