mspm0l130x/timg2/
mis.rs

1# [doc = "Register `MIS` reader"] pub type R = crate :: R < MIS_SPEC > ; # [doc = "Field `MIS_Z` reader - Zero event generated an interrupt."] pub type MIS_Z_R = crate :: BitReader < MIS_Z_A > ; # [doc = "Zero event generated an interrupt.\n\nValue on reset: 0"] # [derive (Clone , Copy , Debug , PartialEq , Eq)] pub enum MIS_Z_A { # [doc = "0: CLR"] MIS_Z_CLR = 0 , # [doc = "1: SET"] MIS_Z_SET = 1 , } impl From < MIS_Z_A > for bool { # [inline (always)] fn from (variant : MIS_Z_A) -> Self { variant as u8 != 0 } } impl MIS_Z_R { # [doc = "Get enumerated values variant"] # [inline (always)] pub const fn variant (& self) -> MIS_Z_A { match self . bits { false => MIS_Z_A :: MIS_Z_CLR , true => MIS_Z_A :: MIS_Z_SET , } } # [doc = "CLR"] # [inline (always)] pub fn is_mis_z_clr (& self) -> bool { * self == MIS_Z_A :: MIS_Z_CLR } # [doc = "SET"] # [inline (always)] pub fn is_mis_z_set (& self) -> bool { * self == MIS_Z_A :: MIS_Z_SET } } # [doc = "Field `MIS_L` reader - Load event generated an interrupt."] pub type MIS_L_R = crate :: BitReader < MIS_L_A > ; # [doc = "Load event generated an interrupt.\n\nValue on reset: 0"] # [derive (Clone , Copy , Debug , PartialEq , Eq)] pub enum MIS_L_A { # [doc = "0: CLR"] MIS_L_CLR = 0 , # [doc = "1: SET"] MIS_L_SET = 1 , } impl From < MIS_L_A > for bool { # [inline (always)] fn from (variant : MIS_L_A) -> Self { variant as u8 != 0 } } impl MIS_L_R { # [doc = "Get enumerated values variant"] # [inline (always)] pub const fn variant (& self) -> MIS_L_A { match self . bits { false => MIS_L_A :: MIS_L_CLR , true => MIS_L_A :: MIS_L_SET , } } # [doc = "CLR"] # [inline (always)] pub fn is_mis_l_clr (& self) -> bool { * self == MIS_L_A :: MIS_L_CLR } # [doc = "SET"] # [inline (always)] pub fn is_mis_l_set (& self) -> bool { * self == MIS_L_A :: MIS_L_SET } } # [doc = "Field `MIS_CCD0` reader - Capture or compare down event generated an interrupt CCP0"] pub type MIS_CCD0_R = crate :: BitReader < MIS_CCD0_A > ; # [doc = "Capture or compare down event generated an interrupt CCP0\n\nValue on reset: 0"] # [derive (Clone , Copy , Debug , PartialEq , Eq)] pub enum MIS_CCD0_A { # [doc = "0: CLR"] MIS_CCD0_CLR = 0 , # [doc = "1: SET"] MIS_CCD0_SET = 1 , } impl From < MIS_CCD0_A > for bool { # [inline (always)] fn from (variant : MIS_CCD0_A) -> Self { variant as u8 != 0 } } impl MIS_CCD0_R { # [doc = "Get enumerated values variant"] # [inline (always)] pub const fn variant (& self) -> MIS_CCD0_A { match self . bits { false => MIS_CCD0_A :: MIS_CCD0_CLR , true => MIS_CCD0_A :: MIS_CCD0_SET , } } # [doc = "CLR"] # [inline (always)] pub fn is_mis_ccd0_clr (& self) -> bool { * self == MIS_CCD0_A :: MIS_CCD0_CLR } # [doc = "SET"] # [inline (always)] pub fn is_mis_ccd0_set (& self) -> bool { * self == MIS_CCD0_A :: MIS_CCD0_SET } } # [doc = "Field `MIS_CCD1` reader - Capture or compare down event generated an interrupt CCP1"] pub type MIS_CCD1_R = crate :: BitReader < MIS_CCD1_A > ; # [doc = "Capture or compare down event generated an interrupt CCP1\n\nValue on reset: 0"] # [derive (Clone , Copy , Debug , PartialEq , Eq)] pub enum MIS_CCD1_A { # [doc = "0: CLR"] MIS_CCD1_CLR = 0 , # [doc = "1: SET"] MIS_CCD1_SET = 1 , } impl From < MIS_CCD1_A > for bool { # [inline (always)] fn from (variant : MIS_CCD1_A) -> Self { variant as u8 != 0 } } impl MIS_CCD1_R { # [doc = "Get enumerated values variant"] # [inline (always)] pub const fn variant (& self) -> MIS_CCD1_A { match self . bits { false => MIS_CCD1_A :: MIS_CCD1_CLR , true => MIS_CCD1_A :: MIS_CCD1_SET , } } # [doc = "CLR"] # [inline (always)] pub fn is_mis_ccd1_clr (& self) -> bool { * self == MIS_CCD1_A :: MIS_CCD1_CLR } # [doc = "SET"] # [inline (always)] pub fn is_mis_ccd1_set (& self) -> bool { * self == MIS_CCD1_A :: MIS_CCD1_SET } } # [doc = "Field `MIS_CCU0` reader - Capture or compare up event generated an interrupt CCP0"] pub type MIS_CCU0_R = crate :: BitReader < MIS_CCU0_A > ; # [doc = "Capture or compare up event generated an interrupt CCP0\n\nValue on reset: 0"] # [derive (Clone , Copy , Debug , PartialEq , Eq)] pub enum MIS_CCU0_A { # [doc = "0: CLR"] MIS_CCU0_CLR = 0 , # [doc = "1: SET"] MIS_CCU0_SET = 1 , } impl From < MIS_CCU0_A > for bool { # [inline (always)] fn from (variant : MIS_CCU0_A) -> Self { variant as u8 != 0 } } impl MIS_CCU0_R { # [doc = "Get enumerated values variant"] # [inline (always)] pub const fn variant (& self) -> MIS_CCU0_A { match self . bits { false => MIS_CCU0_A :: MIS_CCU0_CLR , true => MIS_CCU0_A :: MIS_CCU0_SET , } } # [doc = "CLR"] # [inline (always)] pub fn is_mis_ccu0_clr (& self) -> bool { * self == MIS_CCU0_A :: MIS_CCU0_CLR } # [doc = "SET"] # [inline (always)] pub fn is_mis_ccu0_set (& self) -> bool { * self == MIS_CCU0_A :: MIS_CCU0_SET } } # [doc = "Field `MIS_CCU1` reader - Capture or compare up event generated an interrupt CCP1"] pub type MIS_CCU1_R = crate :: BitReader < MIS_CCU1_A > ; # [doc = "Capture or compare up event generated an interrupt CCP1\n\nValue on reset: 0"] # [derive (Clone , Copy , Debug , PartialEq , Eq)] pub enum MIS_CCU1_A { # [doc = "0: CLR"] MIS_CCU1_CLR = 0 , # [doc = "1: SET"] MIS_CCU1_SET = 1 , } impl From < MIS_CCU1_A > for bool { # [inline (always)] fn from (variant : MIS_CCU1_A) -> Self { variant as u8 != 0 } } impl MIS_CCU1_R { # [doc = "Get enumerated values variant"] # [inline (always)] pub const fn variant (& self) -> MIS_CCU1_A { match self . bits { false => MIS_CCU1_A :: MIS_CCU1_CLR , true => MIS_CCU1_A :: MIS_CCU1_SET , } } # [doc = "CLR"] # [inline (always)] pub fn is_mis_ccu1_clr (& self) -> bool { * self == MIS_CCU1_A :: MIS_CCU1_CLR } # [doc = "SET"] # [inline (always)] pub fn is_mis_ccu1_set (& self) -> bool { * self == MIS_CCU1_A :: MIS_CCU1_SET } } # [doc = "Field `MIS_TOV` reader - Trigger overflow"] pub type MIS_TOV_R = crate :: BitReader < MIS_TOV_A > ; # [doc = "Trigger overflow\n\nValue on reset: 0"] # [derive (Clone , Copy , Debug , PartialEq , Eq)] pub enum MIS_TOV_A { # [doc = "0: CLR"] MIS_TOV_CLR = 0 , # [doc = "1: SET"] MIS_TOV_SET = 1 , } impl From < MIS_TOV_A > for bool { # [inline (always)] fn from (variant : MIS_TOV_A) -> Self { variant as u8 != 0 } } impl MIS_TOV_R { # [doc = "Get enumerated values variant"] # [inline (always)] pub const fn variant (& self) -> MIS_TOV_A { match self . bits { false => MIS_TOV_A :: MIS_TOV_CLR , true => MIS_TOV_A :: MIS_TOV_SET , } } # [doc = "CLR"] # [inline (always)] pub fn is_mis_tov_clr (& self) -> bool { * self == MIS_TOV_A :: MIS_TOV_CLR } # [doc = "SET"] # [inline (always)] pub fn is_mis_tov_set (& self) -> bool { * self == MIS_TOV_A :: MIS_TOV_SET } } impl R { # [doc = "Bit 0 - Zero event generated an interrupt."] # [inline (always)] pub fn mis_z (& self) -> MIS_Z_R { MIS_Z_R :: new ((self . bits & 1) != 0) } # [doc = "Bit 1 - Load event generated an interrupt."] # [inline (always)] pub fn mis_l (& self) -> MIS_L_R { MIS_L_R :: new (((self . bits >> 1) & 1) != 0) } # [doc = "Bit 4 - Capture or compare down event generated an interrupt CCP0"] # [inline (always)] pub fn mis_ccd0 (& self) -> MIS_CCD0_R { MIS_CCD0_R :: new (((self . bits >> 4) & 1) != 0) } # [doc = "Bit 5 - Capture or compare down event generated an interrupt CCP1"] # [inline (always)] pub fn mis_ccd1 (& self) -> MIS_CCD1_R { MIS_CCD1_R :: new (((self . bits >> 5) & 1) != 0) } # [doc = "Bit 8 - Capture or compare up event generated an interrupt CCP0"] # [inline (always)] pub fn mis_ccu0 (& self) -> MIS_CCU0_R { MIS_CCU0_R :: new (((self . bits >> 8) & 1) != 0) } # [doc = "Bit 9 - Capture or compare up event generated an interrupt CCP1"] # [inline (always)] pub fn mis_ccu1 (& self) -> MIS_CCU1_R { MIS_CCU1_R :: new (((self . bits >> 9) & 1) != 0) } # [doc = "Bit 25 - Trigger overflow"] # [inline (always)] pub fn mis_tov (& self) -> MIS_TOV_R { MIS_TOV_R :: new (((self . bits >> 25) & 1) != 0) } } # [doc = "Masked interrupt status\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`mis::R`](R).  See [API](https://docs.rs/svd2rust/#read--modify--write-api)."] pub struct MIS_SPEC ; impl crate :: RegisterSpec for MIS_SPEC { type Ux = u32 ; } # [doc = "`read()` method returns [`mis::R`](R) reader structure"] impl crate :: Readable for MIS_SPEC { } # [doc = "`reset()` method sets MIS to value 0"] impl crate :: Resettable for MIS_SPEC { const RESET_VALUE : Self :: Ux = 0 ; }