1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180
#[doc = "Reader of register FSEC"] pub type R = crate::R<u8, super::FSEC>; #[doc = "Flash Security\n\nValue on reset: 3"] #[derive(Clone, Copy, Debug, PartialEq)] #[repr(u8)] pub enum SEC_A { #[doc = "2: MCU security status is unsecure"] _10 = 2, #[doc = "3: MCU security status is secure"] _11 = 3, } impl From<SEC_A> for u8 { #[inline(always)] fn from(variant: SEC_A) -> Self { variant as _ } } #[doc = "Reader of field `SEC`"] pub type SEC_R = crate::R<u8, SEC_A>; impl SEC_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> crate::Variant<u8, SEC_A> { use crate::Variant::*; match self.bits { 2 => Val(SEC_A::_10), 3 => Val(SEC_A::_11), i => Res(i), } } #[doc = "Checks if the value of the field is `_10`"] #[inline(always)] pub fn is_10(&self) -> bool { *self == SEC_A::_10 } #[doc = "Checks if the value of the field is `_11`"] #[inline(always)] pub fn is_11(&self) -> bool { *self == SEC_A::_11 } } #[doc = "Freescale Failure Analysis Access Code\n\nValue on reset: 3"] #[derive(Clone, Copy, Debug, PartialEq)] #[repr(u8)] pub enum FSLACC_A { #[doc = "2: Freescale factory access denied"] _10 = 2, #[doc = "3: Freescale factory access granted"] _11 = 3, } impl From<FSLACC_A> for u8 { #[inline(always)] fn from(variant: FSLACC_A) -> Self { variant as _ } } #[doc = "Reader of field `FSLACC`"] pub type FSLACC_R = crate::R<u8, FSLACC_A>; impl FSLACC_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> crate::Variant<u8, FSLACC_A> { use crate::Variant::*; match self.bits { 2 => Val(FSLACC_A::_10), 3 => Val(FSLACC_A::_11), i => Res(i), } } #[doc = "Checks if the value of the field is `_10`"] #[inline(always)] pub fn is_10(&self) -> bool { *self == FSLACC_A::_10 } #[doc = "Checks if the value of the field is `_11`"] #[inline(always)] pub fn is_11(&self) -> bool { *self == FSLACC_A::_11 } } #[doc = "no description available\n\nValue on reset: 3"] #[derive(Clone, Copy, Debug, PartialEq)] #[repr(u8)] pub enum MEEN_A { #[doc = "2: Mass erase is disabled"] _10 = 2, #[doc = "3: Mass erase is enabled"] _11 = 3, } impl From<MEEN_A> for u8 { #[inline(always)] fn from(variant: MEEN_A) -> Self { variant as _ } } #[doc = "Reader of field `MEEN`"] pub type MEEN_R = crate::R<u8, MEEN_A>; impl MEEN_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> crate::Variant<u8, MEEN_A> { use crate::Variant::*; match self.bits { 2 => Val(MEEN_A::_10), 3 => Val(MEEN_A::_11), i => Res(i), } } #[doc = "Checks if the value of the field is `_10`"] #[inline(always)] pub fn is_10(&self) -> bool { *self == MEEN_A::_10 } #[doc = "Checks if the value of the field is `_11`"] #[inline(always)] pub fn is_11(&self) -> bool { *self == MEEN_A::_11 } } #[doc = "Backdoor Key Security Enable\n\nValue on reset: 3"] #[derive(Clone, Copy, Debug, PartialEq)] #[repr(u8)] pub enum KEYEN_A { #[doc = "2: Backdoor key access enabled"] _10 = 2, #[doc = "3: Backdoor key access disabled"] _11 = 3, } impl From<KEYEN_A> for u8 { #[inline(always)] fn from(variant: KEYEN_A) -> Self { variant as _ } } #[doc = "Reader of field `KEYEN`"] pub type KEYEN_R = crate::R<u8, KEYEN_A>; impl KEYEN_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> crate::Variant<u8, KEYEN_A> { use crate::Variant::*; match self.bits { 2 => Val(KEYEN_A::_10), 3 => Val(KEYEN_A::_11), i => Res(i), } } #[doc = "Checks if the value of the field is `_10`"] #[inline(always)] pub fn is_10(&self) -> bool { *self == KEYEN_A::_10 } #[doc = "Checks if the value of the field is `_11`"] #[inline(always)] pub fn is_11(&self) -> bool { *self == KEYEN_A::_11 } } impl R { #[doc = "Bits 0:1 - Flash Security"] #[inline(always)] pub fn sec(&self) -> SEC_R { SEC_R::new((self.bits & 0x03) as u8) } #[doc = "Bits 2:3 - Freescale Failure Analysis Access Code"] #[inline(always)] pub fn fslacc(&self) -> FSLACC_R { FSLACC_R::new(((self.bits >> 2) & 0x03) as u8) } #[doc = "Bits 4:5 - no description available"] #[inline(always)] pub fn meen(&self) -> MEEN_R { MEEN_R::new(((self.bits >> 4) & 0x03) as u8) } #[doc = "Bits 6:7 - Backdoor Key Security Enable"] #[inline(always)] pub fn keyen(&self) -> KEYEN_R { KEYEN_R::new(((self.bits >> 6) & 0x03) as u8) } }