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
#[doc = "Reader of register CLKSTAT"] pub type R = crate::R<u32, super::CLKSTAT>; #[doc = "USB Clock Status\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum USBCST_A { #[doc = "0: Clock disabled"] VALUE1 = 0, #[doc = "1: Clock enabled"] VALUE2 = 1, } impl From<USBCST_A> for bool { #[inline(always)] fn from(variant: USBCST_A) -> Self { variant as u8 != 0 } } #[doc = "Reader of field `USBCST`"] pub type USBCST_R = crate::R<bool, USBCST_A>; impl USBCST_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> USBCST_A { match self.bits { false => USBCST_A::VALUE1, true => USBCST_A::VALUE2, } } #[doc = "Checks if the value of the field is `VALUE1`"] #[inline(always)] pub fn is_value1(&self) -> bool { *self == USBCST_A::VALUE1 } #[doc = "Checks if the value of the field is `VALUE2`"] #[inline(always)] pub fn is_value2(&self) -> bool { *self == USBCST_A::VALUE2 } } #[doc = "Ethernet Clock Status\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum ETH0CST_A { #[doc = "0: Clock disabled"] VALUE1 = 0, #[doc = "1: Clock enabled"] VALUE2 = 1, } impl From<ETH0CST_A> for bool { #[inline(always)] fn from(variant: ETH0CST_A) -> Self { variant as u8 != 0 } } #[doc = "Reader of field `ETH0CST`"] pub type ETH0CST_R = crate::R<bool, ETH0CST_A>; impl ETH0CST_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> ETH0CST_A { match self.bits { false => ETH0CST_A::VALUE1, true => ETH0CST_A::VALUE2, } } #[doc = "Checks if the value of the field is `VALUE1`"] #[inline(always)] pub fn is_value1(&self) -> bool { *self == ETH0CST_A::VALUE1 } #[doc = "Checks if the value of the field is `VALUE2`"] #[inline(always)] pub fn is_value2(&self) -> bool { *self == ETH0CST_A::VALUE2 } } #[doc = "CCU Clock Status\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum CCUCST_A { #[doc = "0: Clock disabled"] VALUE1 = 0, #[doc = "1: Clock enabled"] VALUE2 = 1, } impl From<CCUCST_A> for bool { #[inline(always)] fn from(variant: CCUCST_A) -> Self { variant as u8 != 0 } } #[doc = "Reader of field `CCUCST`"] pub type CCUCST_R = crate::R<bool, CCUCST_A>; impl CCUCST_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> CCUCST_A { match self.bits { false => CCUCST_A::VALUE1, true => CCUCST_A::VALUE2, } } #[doc = "Checks if the value of the field is `VALUE1`"] #[inline(always)] pub fn is_value1(&self) -> bool { *self == CCUCST_A::VALUE1 } #[doc = "Checks if the value of the field is `VALUE2`"] #[inline(always)] pub fn is_value2(&self) -> bool { *self == CCUCST_A::VALUE2 } } #[doc = "WDT Clock Status\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum WDTCST_A { #[doc = "0: Clock disabled"] VALUE1 = 0, #[doc = "1: Clock enabled"] VALUE2 = 1, } impl From<WDTCST_A> for bool { #[inline(always)] fn from(variant: WDTCST_A) -> Self { variant as u8 != 0 } } #[doc = "Reader of field `WDTCST`"] pub type WDTCST_R = crate::R<bool, WDTCST_A>; impl WDTCST_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> WDTCST_A { match self.bits { false => WDTCST_A::VALUE1, true => WDTCST_A::VALUE2, } } #[doc = "Checks if the value of the field is `VALUE1`"] #[inline(always)] pub fn is_value1(&self) -> bool { *self == WDTCST_A::VALUE1 } #[doc = "Checks if the value of the field is `VALUE2`"] #[inline(always)] pub fn is_value2(&self) -> bool { *self == WDTCST_A::VALUE2 } } impl R { #[doc = "Bit 0 - USB Clock Status"] #[inline(always)] pub fn usbcst(&self) -> USBCST_R { USBCST_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 2 - Ethernet Clock Status"] #[inline(always)] pub fn eth0cst(&self) -> ETH0CST_R { ETH0CST_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 4 - CCU Clock Status"] #[inline(always)] pub fn ccucst(&self) -> CCUCST_R { CCUCST_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - WDT Clock Status"] #[inline(always)] pub fn wdtcst(&self) -> WDTCST_R { WDTCST_R::new(((self.bits >> 5) & 0x01) != 0) } }