#[doc = "Reader of register SRS"] pub type R = crate::R; #[doc = "Low-Voltage Detect Reset or High-Voltage Detect Reset\n\nValue on reset: 1"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum LVD_A { #[doc = "0: Reset not caused by LVD trip, HVD trip or POR"] _0 = 0, #[doc = "1: Reset caused by LVD trip, HVD trip or POR"] _1 = 1, } impl From for bool { #[inline(always)] fn from(variant: LVD_A) -> Self { variant as u8 != 0 } } #[doc = "Reader of field `LVD`"] pub type LVD_R = crate::R; impl LVD_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> LVD_A { match self.bits { false => LVD_A::_0, true => LVD_A::_1, } } #[doc = "Checks if the value of the field is `_0`"] #[inline(always)] pub fn is_0(&self) -> bool { *self == LVD_A::_0 } #[doc = "Checks if the value of the field is `_1`"] #[inline(always)] pub fn is_1(&self) -> bool { *self == LVD_A::_1 } } #[doc = "Loss-of-Clock Reset\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum LOC_A { #[doc = "0: Reset not caused by a loss of external clock."] _0 = 0, #[doc = "1: Reset caused by a loss of external clock."] _1 = 1, } impl From for bool { #[inline(always)] fn from(variant: LOC_A) -> Self { variant as u8 != 0 } } #[doc = "Reader of field `LOC`"] pub type LOC_R = crate::R; impl LOC_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> LOC_A { match self.bits { false => LOC_A::_0, true => LOC_A::_1, } } #[doc = "Checks if the value of the field is `_0`"] #[inline(always)] pub fn is_0(&self) -> bool { *self == LOC_A::_0 } #[doc = "Checks if the value of the field is `_1`"] #[inline(always)] pub fn is_1(&self) -> bool { *self == LOC_A::_1 } } #[doc = "Loss-of-Lock Reset\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum LOL_A { #[doc = "0: Reset not caused by a loss of lock in the PLL/FLL"] _0 = 0, #[doc = "1: Reset caused by a loss of lock in the PLL/FLL"] _1 = 1, } impl From for bool { #[inline(always)] fn from(variant: LOL_A) -> Self { variant as u8 != 0 } } #[doc = "Reader of field `LOL`"] pub type LOL_R = crate::R; impl LOL_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> LOL_A { match self.bits { false => LOL_A::_0, true => LOL_A::_1, } } #[doc = "Checks if the value of the field is `_0`"] #[inline(always)] pub fn is_0(&self) -> bool { *self == LOL_A::_0 } #[doc = "Checks if the value of the field is `_1`"] #[inline(always)] pub fn is_1(&self) -> bool { *self == LOL_A::_1 } } #[doc = "CMU Loss-of-Clock Reset\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum CMU_LOC_A { #[doc = "0: Reset not caused by the CMU loss-of-clock circuit."] _0 = 0, #[doc = "1: Reset caused by the CMU loss-of-clock circuit."] _1 = 1, } impl From for bool { #[inline(always)] fn from(variant: CMU_LOC_A) -> Self { variant as u8 != 0 } } #[doc = "Reader of field `CMU_LOC`"] pub type CMU_LOC_R = crate::R; impl CMU_LOC_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> CMU_LOC_A { match self.bits { false => CMU_LOC_A::_0, true => CMU_LOC_A::_1, } } #[doc = "Checks if the value of the field is `_0`"] #[inline(always)] pub fn is_0(&self) -> bool { *self == CMU_LOC_A::_0 } #[doc = "Checks if the value of the field is `_1`"] #[inline(always)] pub fn is_1(&self) -> bool { *self == CMU_LOC_A::_1 } } #[doc = "Watchdog\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum WDOG_A { #[doc = "0: Reset not caused by watchdog timeout"] _0 = 0, #[doc = "1: Reset caused by watchdog timeout"] _1 = 1, } impl From for bool { #[inline(always)] fn from(variant: WDOG_A) -> Self { variant as u8 != 0 } } #[doc = "Reader of field `WDOG`"] pub type WDOG_R = crate::R; impl WDOG_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> WDOG_A { match self.bits { false => WDOG_A::_0, true => WDOG_A::_1, } } #[doc = "Checks if the value of the field is `_0`"] #[inline(always)] pub fn is_0(&self) -> bool { *self == WDOG_A::_0 } #[doc = "Checks if the value of the field is `_1`"] #[inline(always)] pub fn is_1(&self) -> bool { *self == WDOG_A::_1 } } #[doc = "External Reset Pin\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum PIN_A { #[doc = "0: Reset not caused by external reset pin"] _0 = 0, #[doc = "1: Reset caused by external reset pin"] _1 = 1, } impl From for bool { #[inline(always)] fn from(variant: PIN_A) -> Self { variant as u8 != 0 } } #[doc = "Reader of field `PIN`"] pub type PIN_R = crate::R; impl PIN_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> PIN_A { match self.bits { false => PIN_A::_0, true => PIN_A::_1, } } #[doc = "Checks if the value of the field is `_0`"] #[inline(always)] pub fn is_0(&self) -> bool { *self == PIN_A::_0 } #[doc = "Checks if the value of the field is `_1`"] #[inline(always)] pub fn is_1(&self) -> bool { *self == PIN_A::_1 } } #[doc = "Power-On Reset\n\nValue on reset: 1"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum POR_A { #[doc = "0: Reset not caused by POR"] _0 = 0, #[doc = "1: Reset caused by POR"] _1 = 1, } impl From for bool { #[inline(always)] fn from(variant: POR_A) -> Self { variant as u8 != 0 } } #[doc = "Reader of field `POR`"] pub type POR_R = crate::R; impl POR_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> POR_A { match self.bits { false => POR_A::_0, true => POR_A::_1, } } #[doc = "Checks if the value of the field is `_0`"] #[inline(always)] pub fn is_0(&self) -> bool { *self == POR_A::_0 } #[doc = "Checks if the value of the field is `_1`"] #[inline(always)] pub fn is_1(&self) -> bool { *self == POR_A::_1 } } #[doc = "JTAG generated reset\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum JTAG_A { #[doc = "0: Reset not caused by JTAG"] _0 = 0, #[doc = "1: Reset caused by JTAG"] _1 = 1, } impl From for bool { #[inline(always)] fn from(variant: JTAG_A) -> Self { variant as u8 != 0 } } #[doc = "Reader of field `JTAG`"] pub type JTAG_R = crate::R; impl JTAG_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> JTAG_A { match self.bits { false => JTAG_A::_0, true => JTAG_A::_1, } } #[doc = "Checks if the value of the field is `_0`"] #[inline(always)] pub fn is_0(&self) -> bool { *self == JTAG_A::_0 } #[doc = "Checks if the value of the field is `_1`"] #[inline(always)] pub fn is_1(&self) -> bool { *self == JTAG_A::_1 } } #[doc = "Core Lockup\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum LOCKUP_A { #[doc = "0: Reset not caused by core LOCKUP event"] _0 = 0, #[doc = "1: Reset caused by core LOCKUP event"] _1 = 1, } impl From for bool { #[inline(always)] fn from(variant: LOCKUP_A) -> Self { variant as u8 != 0 } } #[doc = "Reader of field `LOCKUP`"] pub type LOCKUP_R = crate::R; impl LOCKUP_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> LOCKUP_A { match self.bits { false => LOCKUP_A::_0, true => LOCKUP_A::_1, } } #[doc = "Checks if the value of the field is `_0`"] #[inline(always)] pub fn is_0(&self) -> bool { *self == LOCKUP_A::_0 } #[doc = "Checks if the value of the field is `_1`"] #[inline(always)] pub fn is_1(&self) -> bool { *self == LOCKUP_A::_1 } } #[doc = "Software\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum SW_A { #[doc = "0: Reset not caused by software setting of SYSRESETREQ bit"] _0 = 0, #[doc = "1: Reset caused by software setting of SYSRESETREQ bit"] _1 = 1, } impl From for bool { #[inline(always)] fn from(variant: SW_A) -> Self { variant as u8 != 0 } } #[doc = "Reader of field `SW`"] pub type SW_R = crate::R; impl SW_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> SW_A { match self.bits { false => SW_A::_0, true => SW_A::_1, } } #[doc = "Checks if the value of the field is `_0`"] #[inline(always)] pub fn is_0(&self) -> bool { *self == SW_A::_0 } #[doc = "Checks if the value of the field is `_1`"] #[inline(always)] pub fn is_1(&self) -> bool { *self == SW_A::_1 } } #[doc = "MDM-AP System Reset Request\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum MDM_AP_A { #[doc = "0: Reset was not caused by host debugger system setting of the System Reset Request bit"] _0 = 0, #[doc = "1: Reset was caused by host debugger system setting of the System Reset Request bit"] _1 = 1, } impl From for bool { #[inline(always)] fn from(variant: MDM_AP_A) -> Self { variant as u8 != 0 } } #[doc = "Reader of field `MDM_AP`"] pub type MDM_AP_R = crate::R; impl MDM_AP_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> MDM_AP_A { match self.bits { false => MDM_AP_A::_0, true => MDM_AP_A::_1, } } #[doc = "Checks if the value of the field is `_0`"] #[inline(always)] pub fn is_0(&self) -> bool { *self == MDM_AP_A::_0 } #[doc = "Checks if the value of the field is `_1`"] #[inline(always)] pub fn is_1(&self) -> bool { *self == MDM_AP_A::_1 } } #[doc = "Stop Acknowledge Error\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum SACKERR_A { #[doc = "0: Reset not caused by peripheral failure to acknowledge attempt to enter stop mode"] _0 = 0, #[doc = "1: Reset caused by peripheral failure to acknowledge attempt to enter stop mode"] _1 = 1, } impl From for bool { #[inline(always)] fn from(variant: SACKERR_A) -> Self { variant as u8 != 0 } } #[doc = "Reader of field `SACKERR`"] pub type SACKERR_R = crate::R; impl SACKERR_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> SACKERR_A { match self.bits { false => SACKERR_A::_0, true => SACKERR_A::_1, } } #[doc = "Checks if the value of the field is `_0`"] #[inline(always)] pub fn is_0(&self) -> bool { *self == SACKERR_A::_0 } #[doc = "Checks if the value of the field is `_1`"] #[inline(always)] pub fn is_1(&self) -> bool { *self == SACKERR_A::_1 } } impl R { #[doc = "Bit 1 - Low-Voltage Detect Reset or High-Voltage Detect Reset"] #[inline(always)] pub fn lvd(&self) -> LVD_R { LVD_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Loss-of-Clock Reset"] #[inline(always)] pub fn loc(&self) -> LOC_R { LOC_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Loss-of-Lock Reset"] #[inline(always)] pub fn lol(&self) -> LOL_R { LOL_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - CMU Loss-of-Clock Reset"] #[inline(always)] pub fn cmu_loc(&self) -> CMU_LOC_R { CMU_LOC_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Watchdog"] #[inline(always)] pub fn wdog(&self) -> WDOG_R { WDOG_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - External Reset Pin"] #[inline(always)] pub fn pin(&self) -> PIN_R { PIN_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Power-On Reset"] #[inline(always)] pub fn por(&self) -> POR_R { POR_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - JTAG generated reset"] #[inline(always)] pub fn jtag(&self) -> JTAG_R { JTAG_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Core Lockup"] #[inline(always)] pub fn lockup(&self) -> LOCKUP_R { LOCKUP_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Software"] #[inline(always)] pub fn sw(&self) -> SW_R { SW_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - MDM-AP System Reset Request"] #[inline(always)] pub fn mdm_ap(&self) -> MDM_AP_R { MDM_AP_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 13 - Stop Acknowledge Error"] #[inline(always)] pub fn sackerr(&self) -> SACKERR_R { SACKERR_R::new(((self.bits >> 13) & 0x01) != 0) } }