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
#[doc = "Reader of register VID2"] pub type R = crate::R<u32, super::VID2>; #[doc = "Shows the IP's Configuaration options for the TRNG.\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] #[repr(u8)] pub enum CONFIG_OPT_A { #[doc = "0: TRNG_CONFIG_OPT for TRNG."] CONFIG_OPT_0 = 0, } impl From<CONFIG_OPT_A> for u8 { #[inline(always)] fn from(variant: CONFIG_OPT_A) -> Self { variant as _ } } #[doc = "Reader of field `CONFIG_OPT`"] pub type CONFIG_OPT_R = crate::R<u8, CONFIG_OPT_A>; impl CONFIG_OPT_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> crate::Variant<u8, CONFIG_OPT_A> { use crate::Variant::*; match self.bits { 0 => Val(CONFIG_OPT_A::CONFIG_OPT_0), i => Res(i), } } #[doc = "Checks if the value of the field is `CONFIG_OPT_0`"] #[inline(always)] pub fn is_config_opt_0(&self) -> bool { *self == CONFIG_OPT_A::CONFIG_OPT_0 } } #[doc = "Shows the IP's ECO revision of the TRNG.\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] #[repr(u8)] pub enum ECO_REV_A { #[doc = "0: TRNG_ECO_REV for TRNG."] ECO_REV_0 = 0, } impl From<ECO_REV_A> for u8 { #[inline(always)] fn from(variant: ECO_REV_A) -> Self { variant as _ } } #[doc = "Reader of field `ECO_REV`"] pub type ECO_REV_R = crate::R<u8, ECO_REV_A>; impl ECO_REV_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> crate::Variant<u8, ECO_REV_A> { use crate::Variant::*; match self.bits { 0 => Val(ECO_REV_A::ECO_REV_0), i => Res(i), } } #[doc = "Checks if the value of the field is `ECO_REV_0`"] #[inline(always)] pub fn is_eco_rev_0(&self) -> bool { *self == ECO_REV_A::ECO_REV_0 } } #[doc = "Shows the integration options for the TRNG.\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] #[repr(u8)] pub enum INTG_OPT_A { #[doc = "0: INTG_OPT for TRNG."] INTG_OPT_0 = 0, } impl From<INTG_OPT_A> for u8 { #[inline(always)] fn from(variant: INTG_OPT_A) -> Self { variant as _ } } #[doc = "Reader of field `INTG_OPT`"] pub type INTG_OPT_R = crate::R<u8, INTG_OPT_A>; impl INTG_OPT_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> crate::Variant<u8, INTG_OPT_A> { use crate::Variant::*; match self.bits { 0 => Val(INTG_OPT_A::INTG_OPT_0), i => Res(i), } } #[doc = "Checks if the value of the field is `INTG_OPT_0`"] #[inline(always)] pub fn is_intg_opt_0(&self) -> bool { *self == INTG_OPT_A::INTG_OPT_0 } } #[doc = "Shows the compile options for the TRNG.\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] #[repr(u8)] pub enum ERA_A { #[doc = "0: COMPILE_OPT for TRNG."] ERA_0 = 0, } impl From<ERA_A> for u8 { #[inline(always)] fn from(variant: ERA_A) -> Self { variant as _ } } #[doc = "Reader of field `ERA`"] pub type ERA_R = crate::R<u8, ERA_A>; impl ERA_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> crate::Variant<u8, ERA_A> { use crate::Variant::*; match self.bits { 0 => Val(ERA_A::ERA_0), i => Res(i), } } #[doc = "Checks if the value of the field is `ERA_0`"] #[inline(always)] pub fn is_era_0(&self) -> bool { *self == ERA_A::ERA_0 } } impl R { #[doc = "Bits 0:7 - Shows the IP's Configuaration options for the TRNG."] #[inline(always)] pub fn config_opt(&self) -> CONFIG_OPT_R { CONFIG_OPT_R::new((self.bits & 0xff) as u8) } #[doc = "Bits 8:15 - Shows the IP's ECO revision of the TRNG."] #[inline(always)] pub fn eco_rev(&self) -> ECO_REV_R { ECO_REV_R::new(((self.bits >> 8) & 0xff) as u8) } #[doc = "Bits 16:23 - Shows the integration options for the TRNG."] #[inline(always)] pub fn intg_opt(&self) -> INTG_OPT_R { INTG_OPT_R::new(((self.bits >> 16) & 0xff) as u8) } #[doc = "Bits 24:31 - Shows the compile options for the TRNG."] #[inline(always)] pub fn era(&self) -> ERA_R { ERA_R::new(((self.bits >> 24) & 0xff) as u8) } }