mspm0l130x/uart1/
evt_mode.rs1# [doc = "Register `EVT_MODE` reader"] pub type R = crate :: R < EVT_MODE_SPEC > ; # [doc = "Register `EVT_MODE` writer"] pub type W = crate :: W < EVT_MODE_SPEC > ; # [doc = "Field `EVT_MODE_INT0_CFG` reader - Event line mode select for event corresponding to \\[IPSTANDARD.INT_EVENT0\\]"] pub type EVT_MODE_INT0_CFG_R = crate :: FieldReader < EVT_MODE_INT0_CFG_A > ; # [doc = "Event line mode select for event corresponding to \\[IPSTANDARD.INT_EVENT0\\]\n\nValue on reset: 0"] # [derive (Clone , Copy , Debug , PartialEq , Eq)] # [repr (u8)] pub enum EVT_MODE_INT0_CFG_A { # [doc = "0: DISABLE"] EVT_MODE_INT0_CFG_DISABLE = 0 , # [doc = "1: SOFTWARE"] EVT_MODE_INT0_CFG_SOFTWARE = 1 , # [doc = "2: HARDWARE"] EVT_MODE_INT0_CFG_HARDWARE = 2 , } impl From < EVT_MODE_INT0_CFG_A > for u8 { # [inline (always)] fn from (variant : EVT_MODE_INT0_CFG_A) -> Self { variant as _ } } impl crate :: FieldSpec for EVT_MODE_INT0_CFG_A { type Ux = u8 ; } impl EVT_MODE_INT0_CFG_R { # [doc = "Get enumerated values variant"] # [inline (always)] pub const fn variant (& self) -> Option < EVT_MODE_INT0_CFG_A > { match self . bits { 0 => Some (EVT_MODE_INT0_CFG_A :: EVT_MODE_INT0_CFG_DISABLE) , 1 => Some (EVT_MODE_INT0_CFG_A :: EVT_MODE_INT0_CFG_SOFTWARE) , 2 => Some (EVT_MODE_INT0_CFG_A :: EVT_MODE_INT0_CFG_HARDWARE) , _ => None , } } # [doc = "DISABLE"] # [inline (always)] pub fn is_evt_mode_int0_cfg_disable (& self) -> bool { * self == EVT_MODE_INT0_CFG_A :: EVT_MODE_INT0_CFG_DISABLE } # [doc = "SOFTWARE"] # [inline (always)] pub fn is_evt_mode_int0_cfg_software (& self) -> bool { * self == EVT_MODE_INT0_CFG_A :: EVT_MODE_INT0_CFG_SOFTWARE } # [doc = "HARDWARE"] # [inline (always)] pub fn is_evt_mode_int0_cfg_hardware (& self) -> bool { * self == EVT_MODE_INT0_CFG_A :: EVT_MODE_INT0_CFG_HARDWARE } } # [doc = "Field `EVT_MODE_EVT1_CFG` reader - Event line mode select for event corresponding to \\[IPSTANDARD.INT_EVENT1\\]"] pub type EVT_MODE_EVT1_CFG_R = crate :: FieldReader < EVT_MODE_EVT1_CFG_A > ; # [doc = "Event line mode select for event corresponding to \\[IPSTANDARD.INT_EVENT1\\]\n\nValue on reset: 0"] # [derive (Clone , Copy , Debug , PartialEq , Eq)] # [repr (u8)] pub enum EVT_MODE_EVT1_CFG_A { # [doc = "0: DISABLE"] EVT_MODE_EVT1_CFG_DISABLE = 0 , # [doc = "1: SOFTWARE"] EVT_MODE_EVT1_CFG_SOFTWARE = 1 , # [doc = "2: HARDWARE"] EVT_MODE_EVT1_CFG_HARDWARE = 2 , } impl From < EVT_MODE_EVT1_CFG_A > for u8 { # [inline (always)] fn from (variant : EVT_MODE_EVT1_CFG_A) -> Self { variant as _ } } impl crate :: FieldSpec for EVT_MODE_EVT1_CFG_A { type Ux = u8 ; } impl EVT_MODE_EVT1_CFG_R { # [doc = "Get enumerated values variant"] # [inline (always)] pub const fn variant (& self) -> Option < EVT_MODE_EVT1_CFG_A > { match self . bits { 0 => Some (EVT_MODE_EVT1_CFG_A :: EVT_MODE_EVT1_CFG_DISABLE) , 1 => Some (EVT_MODE_EVT1_CFG_A :: EVT_MODE_EVT1_CFG_SOFTWARE) , 2 => Some (EVT_MODE_EVT1_CFG_A :: EVT_MODE_EVT1_CFG_HARDWARE) , _ => None , } } # [doc = "DISABLE"] # [inline (always)] pub fn is_evt_mode_evt1_cfg_disable (& self) -> bool { * self == EVT_MODE_EVT1_CFG_A :: EVT_MODE_EVT1_CFG_DISABLE } # [doc = "SOFTWARE"] # [inline (always)] pub fn is_evt_mode_evt1_cfg_software (& self) -> bool { * self == EVT_MODE_EVT1_CFG_A :: EVT_MODE_EVT1_CFG_SOFTWARE } # [doc = "HARDWARE"] # [inline (always)] pub fn is_evt_mode_evt1_cfg_hardware (& self) -> bool { * self == EVT_MODE_EVT1_CFG_A :: EVT_MODE_EVT1_CFG_HARDWARE } } # [doc = "Field `EVT_MODE_EVT2_CFG` reader - Event line mode select for event corresponding to \\[IPSTANDARD.INT_EVENT2\\]"] pub type EVT_MODE_EVT2_CFG_R = crate :: FieldReader < EVT_MODE_EVT2_CFG_A > ; # [doc = "Event line mode select for event corresponding to \\[IPSTANDARD.INT_EVENT2\\]\n\nValue on reset: 0"] # [derive (Clone , Copy , Debug , PartialEq , Eq)] # [repr (u8)] pub enum EVT_MODE_EVT2_CFG_A { # [doc = "0: DISABLE"] EVT_MODE_EVT2_CFG_DISABLE = 0 , # [doc = "1: SOFTWARE"] EVT_MODE_EVT2_CFG_SOFTWARE = 1 , # [doc = "2: HARDWARE"] EVT_MODE_EVT2_CFG_HARDWARE = 2 , } impl From < EVT_MODE_EVT2_CFG_A > for u8 { # [inline (always)] fn from (variant : EVT_MODE_EVT2_CFG_A) -> Self { variant as _ } } impl crate :: FieldSpec for EVT_MODE_EVT2_CFG_A { type Ux = u8 ; } impl EVT_MODE_EVT2_CFG_R { # [doc = "Get enumerated values variant"] # [inline (always)] pub const fn variant (& self) -> Option < EVT_MODE_EVT2_CFG_A > { match self . bits { 0 => Some (EVT_MODE_EVT2_CFG_A :: EVT_MODE_EVT2_CFG_DISABLE) , 1 => Some (EVT_MODE_EVT2_CFG_A :: EVT_MODE_EVT2_CFG_SOFTWARE) , 2 => Some (EVT_MODE_EVT2_CFG_A :: EVT_MODE_EVT2_CFG_HARDWARE) , _ => None , } } # [doc = "DISABLE"] # [inline (always)] pub fn is_evt_mode_evt2_cfg_disable (& self) -> bool { * self == EVT_MODE_EVT2_CFG_A :: EVT_MODE_EVT2_CFG_DISABLE } # [doc = "SOFTWARE"] # [inline (always)] pub fn is_evt_mode_evt2_cfg_software (& self) -> bool { * self == EVT_MODE_EVT2_CFG_A :: EVT_MODE_EVT2_CFG_SOFTWARE } # [doc = "HARDWARE"] # [inline (always)] pub fn is_evt_mode_evt2_cfg_hardware (& self) -> bool { * self == EVT_MODE_EVT2_CFG_A :: EVT_MODE_EVT2_CFG_HARDWARE } } impl R { # [doc = "Bits 0:1 - Event line mode select for event corresponding to \\[IPSTANDARD.INT_EVENT0\\]"] # [inline (always)] pub fn evt_mode_int0_cfg (& self) -> EVT_MODE_INT0_CFG_R { EVT_MODE_INT0_CFG_R :: new ((self . bits & 3) as u8) } # [doc = "Bits 2:3 - Event line mode select for event corresponding to \\[IPSTANDARD.INT_EVENT1\\]"] # [inline (always)] pub fn evt_mode_evt1_cfg (& self) -> EVT_MODE_EVT1_CFG_R { EVT_MODE_EVT1_CFG_R :: new (((self . bits >> 2) & 3) as u8) } # [doc = "Bits 4:5 - Event line mode select for event corresponding to \\[IPSTANDARD.INT_EVENT2\\]"] # [inline (always)] pub fn evt_mode_evt2_cfg (& self) -> EVT_MODE_EVT2_CFG_R { EVT_MODE_EVT2_CFG_R :: new (((self . bits >> 4) & 3) as u8) } } impl W { # [doc = r" Writes raw bits to the register."] # [doc = r""] # [doc = r" # Safety"] # [doc = r""] # [doc = r" Passing incorrect value can cause undefined behaviour. See reference manual"] # [inline (always)] pub unsafe fn bits (& mut self , bits : u32) -> & mut Self { self . bits = bits ; self } } # [doc = "Event Mode\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`evt_mode::R`](R). You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`evt_mode::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."] pub struct EVT_MODE_SPEC ; impl crate :: RegisterSpec for EVT_MODE_SPEC { type Ux = u32 ; } # [doc = "`read()` method returns [`evt_mode::R`](R) reader structure"] impl crate :: Readable for EVT_MODE_SPEC { } # [doc = "`write(|w| ..)` method takes [`evt_mode::W`](W) writer structure"] impl crate :: Writable for EVT_MODE_SPEC { const ZERO_TO_MODIFY_FIELDS_BITMAP : Self :: Ux = 0 ; const ONE_TO_MODIFY_FIELDS_BITMAP : Self :: Ux = 0 ; } # [doc = "`reset()` method sets EVT_MODE to value 0"] impl crate :: Resettable for EVT_MODE_SPEC { const RESET_VALUE : Self :: Ux = 0 ; }