# [doc = "Register `ICLR` writer"] pub type W = crate :: W < ICLR_SPEC > ; # [doc = "Zero event CLEAR\n\nValue on reset: 0"] # [derive (Clone , Copy , Debug , PartialEq , Eq)] pub enum ICLR_Z_AW { # [doc = "0: NO_EFFECT"] ICLR_Z_NO_EFFECT = 0 , # [doc = "1: CLR"] ICLR_Z_CLR = 1 , } impl From < ICLR_Z_AW > for bool { # [inline (always)] fn from (variant : ICLR_Z_AW) -> Self { variant as u8 != 0 } } # [doc = "Field `ICLR_Z` writer - Zero event CLEAR"] pub type ICLR_Z_W < 'a , REG , const O : u8 > = crate :: BitWriter < 'a , REG , O , ICLR_Z_AW > ; impl < 'a , REG , const O : u8 > ICLR_Z_W < 'a , REG , O > where REG : crate :: Writable + crate :: RegisterSpec , { # [doc = "NO_EFFECT"] # [inline (always)] pub fn iclr_z_no_effect (self) -> & 'a mut crate :: W < REG > { self . variant (ICLR_Z_AW :: ICLR_Z_NO_EFFECT) } # [doc = "CLR"] # [inline (always)] pub fn iclr_z_clr (self) -> & 'a mut crate :: W < REG > { self . variant (ICLR_Z_AW :: ICLR_Z_CLR) } } # [doc = "Load event CLEAR\n\nValue on reset: 0"] # [derive (Clone , Copy , Debug , PartialEq , Eq)] pub enum ICLR_L_AW { # [doc = "0: NO_EFFECT"] ICLR_L_NO_EFFECT = 0 , # [doc = "1: CLR"] ICLR_L_CLR = 1 , } impl From < ICLR_L_AW > for bool { # [inline (always)] fn from (variant : ICLR_L_AW) -> Self { variant as u8 != 0 } } # [doc = "Field `ICLR_L` writer - Load event CLEAR"] pub type ICLR_L_W < 'a , REG , const O : u8 > = crate :: BitWriter < 'a , REG , O , ICLR_L_AW > ; impl < 'a , REG , const O : u8 > ICLR_L_W < 'a , REG , O > where REG : crate :: Writable + crate :: RegisterSpec , { # [doc = "NO_EFFECT"] # [inline (always)] pub fn iclr_l_no_effect (self) -> & 'a mut crate :: W < REG > { self . variant (ICLR_L_AW :: ICLR_L_NO_EFFECT) } # [doc = "CLR"] # [inline (always)] pub fn iclr_l_clr (self) -> & 'a mut crate :: W < REG > { self . variant (ICLR_L_AW :: ICLR_L_CLR) } } # [doc = "Capture or compare down event CLEAR\n\nValue on reset: 0"] # [derive (Clone , Copy , Debug , PartialEq , Eq)] pub enum ICLR_CCD0_AW { # [doc = "0: NO_EFFECT"] ICLR_CCD0_NO_EFFECT = 0 , # [doc = "1: CLR"] ICLR_CCD0_CLR = 1 , } impl From < ICLR_CCD0_AW > for bool { # [inline (always)] fn from (variant : ICLR_CCD0_AW) -> Self { variant as u8 != 0 } } # [doc = "Field `ICLR_CCD0` writer - Capture or compare down event CLEAR"] pub type ICLR_CCD0_W < 'a , REG , const O : u8 > = crate :: BitWriter < 'a , REG , O , ICLR_CCD0_AW > ; impl < 'a , REG , const O : u8 > ICLR_CCD0_W < 'a , REG , O > where REG : crate :: Writable + crate :: RegisterSpec , { # [doc = "NO_EFFECT"] # [inline (always)] pub fn iclr_ccd0_no_effect (self) -> & 'a mut crate :: W < REG > { self . variant (ICLR_CCD0_AW :: ICLR_CCD0_NO_EFFECT) } # [doc = "CLR"] # [inline (always)] pub fn iclr_ccd0_clr (self) -> & 'a mut crate :: W < REG > { self . variant (ICLR_CCD0_AW :: ICLR_CCD0_CLR) } } # [doc = "Capture or compare down event CLEAR\n\nValue on reset: 0"] # [derive (Clone , Copy , Debug , PartialEq , Eq)] pub enum ICLR_CCD1_AW { # [doc = "0: NO_EFFECT"] ICLR_CCD1_NO_EFFECT = 0 , # [doc = "1: CLR"] ICLR_CCD1_CLR = 1 , } impl From < ICLR_CCD1_AW > for bool { # [inline (always)] fn from (variant : ICLR_CCD1_AW) -> Self { variant as u8 != 0 } } # [doc = "Field `ICLR_CCD1` writer - Capture or compare down event CLEAR"] pub type ICLR_CCD1_W < 'a , REG , const O : u8 > = crate :: BitWriter < 'a , REG , O , ICLR_CCD1_AW > ; impl < 'a , REG , const O : u8 > ICLR_CCD1_W < 'a , REG , O > where REG : crate :: Writable + crate :: RegisterSpec , { # [doc = "NO_EFFECT"] # [inline (always)] pub fn iclr_ccd1_no_effect (self) -> & 'a mut crate :: W < REG > { self . variant (ICLR_CCD1_AW :: ICLR_CCD1_NO_EFFECT) } # [doc = "CLR"] # [inline (always)] pub fn iclr_ccd1_clr (self) -> & 'a mut crate :: W < REG > { self . variant (ICLR_CCD1_AW :: ICLR_CCD1_CLR) } } # [doc = "Capture or compare up event CLEAR\n\nValue on reset: 0"] # [derive (Clone , Copy , Debug , PartialEq , Eq)] pub enum ICLR_CCU0_AW { # [doc = "0: NO_EFFECT"] ICLR_CCU0_NO_EFFECT = 0 , # [doc = "1: CLR"] ICLR_CCU0_CLR = 1 , } impl From < ICLR_CCU0_AW > for bool { # [inline (always)] fn from (variant : ICLR_CCU0_AW) -> Self { variant as u8 != 0 } } # [doc = "Field `ICLR_CCU0` writer - Capture or compare up event CLEAR"] pub type ICLR_CCU0_W < 'a , REG , const O : u8 > = crate :: BitWriter < 'a , REG , O , ICLR_CCU0_AW > ; impl < 'a , REG , const O : u8 > ICLR_CCU0_W < 'a , REG , O > where REG : crate :: Writable + crate :: RegisterSpec , { # [doc = "NO_EFFECT"] # [inline (always)] pub fn iclr_ccu0_no_effect (self) -> & 'a mut crate :: W < REG > { self . variant (ICLR_CCU0_AW :: ICLR_CCU0_NO_EFFECT) } # [doc = "CLR"] # [inline (always)] pub fn iclr_ccu0_clr (self) -> & 'a mut crate :: W < REG > { self . variant (ICLR_CCU0_AW :: ICLR_CCU0_CLR) } } # [doc = "Capture or compare up event CLEAR\n\nValue on reset: 0"] # [derive (Clone , Copy , Debug , PartialEq , Eq)] pub enum ICLR_CCU1_AW { # [doc = "0: NO_EFFECT"] ICLR_CCU1_NO_EFFECT = 0 , # [doc = "1: CLR"] ICLR_CCU1_CLR = 1 , } impl From < ICLR_CCU1_AW > for bool { # [inline (always)] fn from (variant : ICLR_CCU1_AW) -> Self { variant as u8 != 0 } } # [doc = "Field `ICLR_CCU1` writer - Capture or compare up event CLEAR"] pub type ICLR_CCU1_W < 'a , REG , const O : u8 > = crate :: BitWriter < 'a , REG , O , ICLR_CCU1_AW > ; impl < 'a , REG , const O : u8 > ICLR_CCU1_W < 'a , REG , O > where REG : crate :: Writable + crate :: RegisterSpec , { # [doc = "NO_EFFECT"] # [inline (always)] pub fn iclr_ccu1_no_effect (self) -> & 'a mut crate :: W < REG > { self . variant (ICLR_CCU1_AW :: ICLR_CCU1_NO_EFFECT) } # [doc = "CLR"] # [inline (always)] pub fn iclr_ccu1_clr (self) -> & 'a mut crate :: W < REG > { self . variant (ICLR_CCU1_AW :: ICLR_CCU1_CLR) } } # [doc = "Trigger Overflow event CLEAR\n\nValue on reset: 0"] # [derive (Clone , Copy , Debug , PartialEq , Eq)] pub enum ICLR_TOV_AW { # [doc = "0: NO_EFFECT"] ICLR_TOV_NO_EFFECT = 0 , # [doc = "1: CLR"] ICLR_TOV_CLR = 1 , } impl From < ICLR_TOV_AW > for bool { # [inline (always)] fn from (variant : ICLR_TOV_AW) -> Self { variant as u8 != 0 } } # [doc = "Field `ICLR_TOV` writer - Trigger Overflow event CLEAR"] pub type ICLR_TOV_W < 'a , REG , const O : u8 > = crate :: BitWriter < 'a , REG , O , ICLR_TOV_AW > ; impl < 'a , REG , const O : u8 > ICLR_TOV_W < 'a , REG , O > where REG : crate :: Writable + crate :: RegisterSpec , { # [doc = "NO_EFFECT"] # [inline (always)] pub fn iclr_tov_no_effect (self) -> & 'a mut crate :: W < REG > { self . variant (ICLR_TOV_AW :: ICLR_TOV_NO_EFFECT) } # [doc = "CLR"] # [inline (always)] pub fn iclr_tov_clr (self) -> & 'a mut crate :: W < REG > { self . variant (ICLR_TOV_AW :: ICLR_TOV_CLR) } } impl W { # [doc = "Bit 0 - Zero event CLEAR"] # [inline (always)] # [must_use] pub fn iclr_z (& mut self) -> ICLR_Z_W < ICLR_SPEC , 0 > { ICLR_Z_W :: new (self) } # [doc = "Bit 1 - Load event CLEAR"] # [inline (always)] # [must_use] pub fn iclr_l (& mut self) -> ICLR_L_W < ICLR_SPEC , 1 > { ICLR_L_W :: new (self) } # [doc = "Bit 4 - Capture or compare down event CLEAR"] # [inline (always)] # [must_use] pub fn iclr_ccd0 (& mut self) -> ICLR_CCD0_W < ICLR_SPEC , 4 > { ICLR_CCD0_W :: new (self) } # [doc = "Bit 5 - Capture or compare down event CLEAR"] # [inline (always)] # [must_use] pub fn iclr_ccd1 (& mut self) -> ICLR_CCD1_W < ICLR_SPEC , 5 > { ICLR_CCD1_W :: new (self) } # [doc = "Bit 8 - Capture or compare up event CLEAR"] # [inline (always)] # [must_use] pub fn iclr_ccu0 (& mut self) -> ICLR_CCU0_W < ICLR_SPEC , 8 > { ICLR_CCU0_W :: new (self) } # [doc = "Bit 9 - Capture or compare up event CLEAR"] # [inline (always)] # [must_use] pub fn iclr_ccu1 (& mut self) -> ICLR_CCU1_W < ICLR_SPEC , 9 > { ICLR_CCU1_W :: new (self) } # [doc = "Bit 25 - Trigger Overflow event CLEAR"] # [inline (always)] # [must_use] pub fn iclr_tov (& mut self) -> ICLR_TOV_W < ICLR_SPEC , 25 > { ICLR_TOV_W :: new (self) } # [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 = "Interrupt clear\n\nYou can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`iclr::W`](W). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."] pub struct ICLR_SPEC ; impl crate :: RegisterSpec for ICLR_SPEC { type Ux = u32 ; } # [doc = "`write(|w| ..)` method takes [`iclr::W`](W) writer structure"] impl crate :: Writable for ICLR_SPEC { const ZERO_TO_MODIFY_FIELDS_BITMAP : Self :: Ux = 0 ; const ONE_TO_MODIFY_FIELDS_BITMAP : Self :: Ux = 0 ; } # [doc = "`reset()` method sets ICLR to value 0"] impl crate :: Resettable for ICLR_SPEC { const RESET_VALUE : Self :: Ux = 0 ; }