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
#[doc = "Reader of register DTEMPALARM"] pub type R = crate::R<u32, super::DTEMPALARM>; #[doc = "Lower Limit Underflow\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum UNDERFL_A { #[doc = "0: No temperature underflow was detected"] VALUE1 = 0, #[doc = "1: A temperature underflow was detected"] VALUE2 = 1, } impl From<UNDERFL_A> for bool { #[inline(always)] fn from(variant: UNDERFL_A) -> Self { variant as u8 != 0 } } #[doc = "Reader of field `UNDERFL`"] pub type UNDERFL_R = crate::R<bool, UNDERFL_A>; impl UNDERFL_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> UNDERFL_A { match self.bits { false => UNDERFL_A::VALUE1, true => UNDERFL_A::VALUE2, } } #[doc = "Checks if the value of the field is `VALUE1`"] #[inline(always)] pub fn is_value1(&self) -> bool { *self == UNDERFL_A::VALUE1 } #[doc = "Checks if the value of the field is `VALUE2`"] #[inline(always)] pub fn is_value2(&self) -> bool { *self == UNDERFL_A::VALUE2 } } #[doc = "Upper Limit Overflow\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum OVERFL_A { #[doc = "0: No temperature overflow was detected"] VALUE1 = 0, #[doc = "1: A temperature overflow was detected"] VALUE2 = 1, } impl From<OVERFL_A> for bool { #[inline(always)] fn from(variant: OVERFL_A) -> Self { variant as u8 != 0 } } #[doc = "Reader of field `OVERFL`"] pub type OVERFL_R = crate::R<bool, OVERFL_A>; impl OVERFL_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> OVERFL_A { match self.bits { false => OVERFL_A::VALUE1, true => OVERFL_A::VALUE2, } } #[doc = "Checks if the value of the field is `VALUE1`"] #[inline(always)] pub fn is_value1(&self) -> bool { *self == OVERFL_A::VALUE1 } #[doc = "Checks if the value of the field is `VALUE2`"] #[inline(always)] pub fn is_value2(&self) -> bool { *self == OVERFL_A::VALUE2 } } impl R { #[doc = "Bit 0 - Lower Limit Underflow"] #[inline(always)] pub fn underfl(&self) -> UNDERFL_R { UNDERFL_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 16 - Upper Limit Overflow"] #[inline(always)] pub fn overfl(&self) -> OVERFL_R { OVERFL_R::new(((self.bits >> 16) & 0x01) != 0) } }