#[doc = r" Value to write to the register"] pub struct W { bits: u32, } impl super::CSSETIFG { #[doc = r" Writes to the register"] #[inline] pub fn write(&self, f: F) where F: FnOnce(&mut W) -> &mut W, { let mut w = W::reset_value(); f(&mut w); self.register.set(w.bits); } } #[doc = "Values that can be written to the field `SET_LFXTIFG`"] pub enum SET_LFXTIFGW { #[doc = "No effect"] SET_LFXTIFG_0, #[doc = "Set pending interrupt flag"] SET_LFXTIFG_1, } impl SET_LFXTIFGW { #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _bits(&self) -> bool { match *self { SET_LFXTIFGW::SET_LFXTIFG_0 => false, SET_LFXTIFGW::SET_LFXTIFG_1 => true, } } } #[doc = r" Proxy"] pub struct _SET_LFXTIFGW<'a> { w: &'a mut W, } impl<'a> _SET_LFXTIFGW<'a> { #[doc = r" Writes `variant` to the field"] #[inline] pub fn variant(self, variant: SET_LFXTIFGW) -> &'a mut W { { self.bit(variant._bits()) } } #[doc = "No effect"] #[inline] pub fn set_lfxtifg_0(self) -> &'a mut W { self.variant(SET_LFXTIFGW::SET_LFXTIFG_0) } #[doc = "Set pending interrupt flag"] #[inline] pub fn set_lfxtifg_1(self) -> &'a mut W { self.variant(SET_LFXTIFGW::SET_LFXTIFG_1) } #[doc = r" Sets the field bit"] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r" Clears the field bit"] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r" Writes raw bits to the field"] #[inline] pub fn bit(self, value: bool) -> &'a mut W { const MASK: bool = true; const OFFSET: u8 = 0; self.w.bits &= !((MASK as u32) << OFFSET); self.w.bits |= ((value & MASK) as u32) << OFFSET; self.w } } #[doc = "Values that can be written to the field `SET_HFXTIFG`"] pub enum SET_HFXTIFGW { #[doc = "No effect"] SET_HFXTIFG_0, #[doc = "Set pending interrupt flag"] SET_HFXTIFG_1, } impl SET_HFXTIFGW { #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _bits(&self) -> bool { match *self { SET_HFXTIFGW::SET_HFXTIFG_0 => false, SET_HFXTIFGW::SET_HFXTIFG_1 => true, } } } #[doc = r" Proxy"] pub struct _SET_HFXTIFGW<'a> { w: &'a mut W, } impl<'a> _SET_HFXTIFGW<'a> { #[doc = r" Writes `variant` to the field"] #[inline] pub fn variant(self, variant: SET_HFXTIFGW) -> &'a mut W { { self.bit(variant._bits()) } } #[doc = "No effect"] #[inline] pub fn set_hfxtifg_0(self) -> &'a mut W { self.variant(SET_HFXTIFGW::SET_HFXTIFG_0) } #[doc = "Set pending interrupt flag"] #[inline] pub fn set_hfxtifg_1(self) -> &'a mut W { self.variant(SET_HFXTIFGW::SET_HFXTIFG_1) } #[doc = r" Sets the field bit"] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r" Clears the field bit"] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r" Writes raw bits to the field"] #[inline] pub fn bit(self, value: bool) -> &'a mut W { const MASK: bool = true; const OFFSET: u8 = 1; self.w.bits &= !((MASK as u32) << OFFSET); self.w.bits |= ((value & MASK) as u32) << OFFSET; self.w } } #[doc = "Values that can be written to the field `SET_HFXT2IFG`"] pub enum SET_HFXT2IFGW { #[doc = "No effect"] SET_HFXT2IFG_0, #[doc = "Set pending interrupt flag"] SET_HFXT2IFG_1, } impl SET_HFXT2IFGW { #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _bits(&self) -> bool { match *self { SET_HFXT2IFGW::SET_HFXT2IFG_0 => false, SET_HFXT2IFGW::SET_HFXT2IFG_1 => true, } } } #[doc = r" Proxy"] pub struct _SET_HFXT2IFGW<'a> { w: &'a mut W, } impl<'a> _SET_HFXT2IFGW<'a> { #[doc = r" Writes `variant` to the field"] #[inline] pub fn variant(self, variant: SET_HFXT2IFGW) -> &'a mut W { { self.bit(variant._bits()) } } #[doc = "No effect"] #[inline] pub fn set_hfxt2ifg_0(self) -> &'a mut W { self.variant(SET_HFXT2IFGW::SET_HFXT2IFG_0) } #[doc = "Set pending interrupt flag"] #[inline] pub fn set_hfxt2ifg_1(self) -> &'a mut W { self.variant(SET_HFXT2IFGW::SET_HFXT2IFG_1) } #[doc = r" Sets the field bit"] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r" Clears the field bit"] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r" Writes raw bits to the field"] #[inline] pub fn bit(self, value: bool) -> &'a mut W { const MASK: bool = true; const OFFSET: u8 = 2; self.w.bits &= !((MASK as u32) << OFFSET); self.w.bits |= ((value & MASK) as u32) << OFFSET; self.w } } #[doc = "Values that can be written to the field `SET_DCOR_OPNIFG`"] pub enum SET_DCOR_OPNIFGW { #[doc = "No effect"] SET_DCOR_OPNIFG_0, #[doc = "Set pending interrupt flag"] SET_DCOR_OPNIFG_1, } impl SET_DCOR_OPNIFGW { #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _bits(&self) -> bool { match *self { SET_DCOR_OPNIFGW::SET_DCOR_OPNIFG_0 => false, SET_DCOR_OPNIFGW::SET_DCOR_OPNIFG_1 => true, } } } #[doc = r" Proxy"] pub struct _SET_DCOR_OPNIFGW<'a> { w: &'a mut W, } impl<'a> _SET_DCOR_OPNIFGW<'a> { #[doc = r" Writes `variant` to the field"] #[inline] pub fn variant(self, variant: SET_DCOR_OPNIFGW) -> &'a mut W { { self.bit(variant._bits()) } } #[doc = "No effect"] #[inline] pub fn set_dcor_opnifg_0(self) -> &'a mut W { self.variant(SET_DCOR_OPNIFGW::SET_DCOR_OPNIFG_0) } #[doc = "Set pending interrupt flag"] #[inline] pub fn set_dcor_opnifg_1(self) -> &'a mut W { self.variant(SET_DCOR_OPNIFGW::SET_DCOR_OPNIFG_1) } #[doc = r" Sets the field bit"] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r" Clears the field bit"] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r" Writes raw bits to the field"] #[inline] pub fn bit(self, value: bool) -> &'a mut W { const MASK: bool = true; const OFFSET: u8 = 6; self.w.bits &= !((MASK as u32) << OFFSET); self.w.bits |= ((value & MASK) as u32) << OFFSET; self.w } } #[doc = "Values that can be written to the field `SET_CALIFG`"] pub enum SET_CALIFGW { #[doc = "No effect"] SET_CALIFG_0, #[doc = "Set pending interrupt flag"] SET_CALIFG_1, } impl SET_CALIFGW { #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _bits(&self) -> bool { match *self { SET_CALIFGW::SET_CALIFG_0 => false, SET_CALIFGW::SET_CALIFG_1 => true, } } } #[doc = r" Proxy"] pub struct _SET_CALIFGW<'a> { w: &'a mut W, } impl<'a> _SET_CALIFGW<'a> { #[doc = r" Writes `variant` to the field"] #[inline] pub fn variant(self, variant: SET_CALIFGW) -> &'a mut W { { self.bit(variant._bits()) } } #[doc = "No effect"] #[inline] pub fn set_califg_0(self) -> &'a mut W { self.variant(SET_CALIFGW::SET_CALIFG_0) } #[doc = "Set pending interrupt flag"] #[inline] pub fn set_califg_1(self) -> &'a mut W { self.variant(SET_CALIFGW::SET_CALIFG_1) } #[doc = r" Sets the field bit"] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r" Clears the field bit"] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r" Writes raw bits to the field"] #[inline] pub fn bit(self, value: bool) -> &'a mut W { const MASK: bool = true; const OFFSET: u8 = 15; self.w.bits &= !((MASK as u32) << OFFSET); self.w.bits |= ((value & MASK) as u32) << OFFSET; self.w } } #[doc = "Values that can be written to the field `SET_FCNTHFIFG`"] pub enum SET_FCNTHFIFGW { #[doc = "No effect"] SET_FCNTHFIFG_0, #[doc = "Set pending interrupt flag"] SET_FCNTHFIFG_1, } impl SET_FCNTHFIFGW { #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _bits(&self) -> bool { match *self { SET_FCNTHFIFGW::SET_FCNTHFIFG_0 => false, SET_FCNTHFIFGW::SET_FCNTHFIFG_1 => true, } } } #[doc = r" Proxy"] pub struct _SET_FCNTHFIFGW<'a> { w: &'a mut W, } impl<'a> _SET_FCNTHFIFGW<'a> { #[doc = r" Writes `variant` to the field"] #[inline] pub fn variant(self, variant: SET_FCNTHFIFGW) -> &'a mut W { { self.bit(variant._bits()) } } #[doc = "No effect"] #[inline] pub fn set_fcnthfifg_0(self) -> &'a mut W { self.variant(SET_FCNTHFIFGW::SET_FCNTHFIFG_0) } #[doc = "Set pending interrupt flag"] #[inline] pub fn set_fcnthfifg_1(self) -> &'a mut W { self.variant(SET_FCNTHFIFGW::SET_FCNTHFIFG_1) } #[doc = r" Sets the field bit"] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r" Clears the field bit"] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r" Writes raw bits to the field"] #[inline] pub fn bit(self, value: bool) -> &'a mut W { const MASK: bool = true; const OFFSET: u8 = 9; self.w.bits &= !((MASK as u32) << OFFSET); self.w.bits |= ((value & MASK) as u32) << OFFSET; self.w } } #[doc = "Values that can be written to the field `SET_FCNTHF2IFG`"] pub enum SET_FCNTHF2IFGW { #[doc = "No effect"] SET_FCNTHF2IFG_0, #[doc = "Set pending interrupt flag"] SET_FCNTHF2IFG_1, } impl SET_FCNTHF2IFGW { #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _bits(&self) -> bool { match *self { SET_FCNTHF2IFGW::SET_FCNTHF2IFG_0 => false, SET_FCNTHF2IFGW::SET_FCNTHF2IFG_1 => true, } } } #[doc = r" Proxy"] pub struct _SET_FCNTHF2IFGW<'a> { w: &'a mut W, } impl<'a> _SET_FCNTHF2IFGW<'a> { #[doc = r" Writes `variant` to the field"] #[inline] pub fn variant(self, variant: SET_FCNTHF2IFGW) -> &'a mut W { { self.bit(variant._bits()) } } #[doc = "No effect"] #[inline] pub fn set_fcnthf2ifg_0(self) -> &'a mut W { self.variant(SET_FCNTHF2IFGW::SET_FCNTHF2IFG_0) } #[doc = "Set pending interrupt flag"] #[inline] pub fn set_fcnthf2ifg_1(self) -> &'a mut W { self.variant(SET_FCNTHF2IFGW::SET_FCNTHF2IFG_1) } #[doc = r" Sets the field bit"] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r" Clears the field bit"] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r" Writes raw bits to the field"] #[inline] pub fn bit(self, value: bool) -> &'a mut W { const MASK: bool = true; const OFFSET: u8 = 10; self.w.bits &= !((MASK as u32) << OFFSET); self.w.bits |= ((value & MASK) as u32) << OFFSET; self.w } } #[doc = "Values that can be written to the field `SET_FCNTLFIFG`"] pub enum SET_FCNTLFIFGW { #[doc = "No effect"] SET_FCNTLFIFG_0, #[doc = "Set pending interrupt flag"] SET_FCNTLFIFG_1, } impl SET_FCNTLFIFGW { #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _bits(&self) -> bool { match *self { SET_FCNTLFIFGW::SET_FCNTLFIFG_0 => false, SET_FCNTLFIFGW::SET_FCNTLFIFG_1 => true, } } } #[doc = r" Proxy"] pub struct _SET_FCNTLFIFGW<'a> { w: &'a mut W, } impl<'a> _SET_FCNTLFIFGW<'a> { #[doc = r" Writes `variant` to the field"] #[inline] pub fn variant(self, variant: SET_FCNTLFIFGW) -> &'a mut W { { self.bit(variant._bits()) } } #[doc = "No effect"] #[inline] pub fn set_fcntlfifg_0(self) -> &'a mut W { self.variant(SET_FCNTLFIFGW::SET_FCNTLFIFG_0) } #[doc = "Set pending interrupt flag"] #[inline] pub fn set_fcntlfifg_1(self) -> &'a mut W { self.variant(SET_FCNTLFIFGW::SET_FCNTLFIFG_1) } #[doc = r" Sets the field bit"] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r" Clears the field bit"] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r" Writes raw bits to the field"] #[inline] pub fn bit(self, value: bool) -> &'a mut W { const MASK: bool = true; const OFFSET: u8 = 8; self.w.bits &= !((MASK as u32) << OFFSET); self.w.bits |= ((value & MASK) as u32) << OFFSET; self.w } } #[doc = "Values that can be written to the field `SET_PLLOOLIFG`"] pub enum SET_PLLOOLIFGW { #[doc = "No effect"] SET_PLLOOLIFG_0, #[doc = "Set pending interrupt flag"] SET_PLLOOLIFG_1, } impl SET_PLLOOLIFGW { #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _bits(&self) -> bool { match *self { SET_PLLOOLIFGW::SET_PLLOOLIFG_0 => false, SET_PLLOOLIFGW::SET_PLLOOLIFG_1 => true, } } } #[doc = r" Proxy"] pub struct _SET_PLLOOLIFGW<'a> { w: &'a mut W, } impl<'a> _SET_PLLOOLIFGW<'a> { #[doc = r" Writes `variant` to the field"] #[inline] pub fn variant(self, variant: SET_PLLOOLIFGW) -> &'a mut W { { self.bit(variant._bits()) } } #[doc = "No effect"] #[inline] pub fn set_plloolifg_0(self) -> &'a mut W { self.variant(SET_PLLOOLIFGW::SET_PLLOOLIFG_0) } #[doc = "Set pending interrupt flag"] #[inline] pub fn set_plloolifg_1(self) -> &'a mut W { self.variant(SET_PLLOOLIFGW::SET_PLLOOLIFG_1) } #[doc = r" Sets the field bit"] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r" Clears the field bit"] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r" Writes raw bits to the field"] #[inline] pub fn bit(self, value: bool) -> &'a mut W { const MASK: bool = true; const OFFSET: u8 = 12; self.w.bits &= !((MASK as u32) << OFFSET); self.w.bits |= ((value & MASK) as u32) << OFFSET; self.w } } #[doc = "Values that can be written to the field `SET_PLLLOSIFG`"] pub enum SET_PLLLOSIFGW { #[doc = "No effect"] SET_PLLLOSIFG_0, #[doc = "Set pending interrupt flag"] SET_PLLLOSIFG_1, } impl SET_PLLLOSIFGW { #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _bits(&self) -> bool { match *self { SET_PLLLOSIFGW::SET_PLLLOSIFG_0 => false, SET_PLLLOSIFGW::SET_PLLLOSIFG_1 => true, } } } #[doc = r" Proxy"] pub struct _SET_PLLLOSIFGW<'a> { w: &'a mut W, } impl<'a> _SET_PLLLOSIFGW<'a> { #[doc = r" Writes `variant` to the field"] #[inline] pub fn variant(self, variant: SET_PLLLOSIFGW) -> &'a mut W { { self.bit(variant._bits()) } } #[doc = "No effect"] #[inline] pub fn set_plllosifg_0(self) -> &'a mut W { self.variant(SET_PLLLOSIFGW::SET_PLLLOSIFG_0) } #[doc = "Set pending interrupt flag"] #[inline] pub fn set_plllosifg_1(self) -> &'a mut W { self.variant(SET_PLLLOSIFGW::SET_PLLLOSIFG_1) } #[doc = r" Sets the field bit"] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r" Clears the field bit"] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r" Writes raw bits to the field"] #[inline] pub fn bit(self, value: bool) -> &'a mut W { const MASK: bool = true; const OFFSET: u8 = 13; self.w.bits &= !((MASK as u32) << OFFSET); self.w.bits |= ((value & MASK) as u32) << OFFSET; self.w } } #[doc = "Values that can be written to the field `SET_PLLOORIFG`"] pub enum SET_PLLOORIFGW { #[doc = "No effect"] SET_PLLOORIFG_0, #[doc = "Set pending interrupt flag"] SET_PLLOORIFG_1, } impl SET_PLLOORIFGW { #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _bits(&self) -> bool { match *self { SET_PLLOORIFGW::SET_PLLOORIFG_0 => false, SET_PLLOORIFGW::SET_PLLOORIFG_1 => true, } } } #[doc = r" Proxy"] pub struct _SET_PLLOORIFGW<'a> { w: &'a mut W, } impl<'a> _SET_PLLOORIFGW<'a> { #[doc = r" Writes `variant` to the field"] #[inline] pub fn variant(self, variant: SET_PLLOORIFGW) -> &'a mut W { { self.bit(variant._bits()) } } #[doc = "No effect"] #[inline] pub fn set_plloorifg_0(self) -> &'a mut W { self.variant(SET_PLLOORIFGW::SET_PLLOORIFG_0) } #[doc = "Set pending interrupt flag"] #[inline] pub fn set_plloorifg_1(self) -> &'a mut W { self.variant(SET_PLLOORIFGW::SET_PLLOORIFG_1) } #[doc = r" Sets the field bit"] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r" Clears the field bit"] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r" Writes raw bits to the field"] #[inline] pub fn bit(self, value: bool) -> &'a mut W { const MASK: bool = true; const OFFSET: u8 = 14; self.w.bits &= !((MASK as u32) << OFFSET); self.w.bits |= ((value & MASK) as u32) << OFFSET; self.w } } impl W { #[doc = r" Reset value of the register"] #[inline] pub fn reset_value() -> W { W { bits: 0 } } #[doc = r" Writes raw bits to the register"] #[inline] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.bits = bits; self } #[doc = "Bit 0 - Set LFXT oscillator fault interrupt flag"] #[inline] pub fn set_lfxtifg(&mut self) -> _SET_LFXTIFGW { _SET_LFXTIFGW { w: self } } #[doc = "Bit 1 - Set HFXT oscillator fault interrupt flag"] #[inline] pub fn set_hfxtifg(&mut self) -> _SET_HFXTIFGW { _SET_HFXTIFGW { w: self } } #[doc = "Bit 2 - Set HFXT2 oscillator fault interrupt flag"] #[inline] pub fn set_hfxt2ifg(&mut self) -> _SET_HFXT2IFGW { _SET_HFXT2IFGW { w: self } } #[doc = "Bit 6 - Set DCO external resistor open circuit fault interrupt flag."] #[inline] pub fn set_dcor_opnifg(&mut self) -> _SET_DCOR_OPNIFGW { _SET_DCOR_OPNIFGW { w: self } } #[doc = "Bit 15 - REFCNT period counter set interrupt flag"] #[inline] pub fn set_califg(&mut self) -> _SET_CALIFGW { _SET_CALIFGW { w: self } } #[doc = "Bit 9 - Start fault counter set interrupt flag HFXT"] #[inline] pub fn set_fcnthfifg(&mut self) -> _SET_FCNTHFIFGW { _SET_FCNTHFIFGW { w: self } } #[doc = "Bit 10 - Start fault counter set interrupt flag HFXT2"] #[inline] pub fn set_fcnthf2ifg(&mut self) -> _SET_FCNTHF2IFGW { _SET_FCNTHF2IFGW { w: self } } #[doc = "Bit 8 - Start fault counter set interrupt flag LFXT"] #[inline] pub fn set_fcntlfifg(&mut self) -> _SET_FCNTLFIFGW { _SET_FCNTLFIFGW { w: self } } #[doc = "Bit 12 - PLL out-of-lock set interrupt flag"] #[inline] pub fn set_plloolifg(&mut self) -> _SET_PLLOOLIFGW { _SET_PLLOOLIFGW { w: self } } #[doc = "Bit 13 - PLL loss-of-signal set interrupt flag"] #[inline] pub fn set_plllosifg(&mut self) -> _SET_PLLLOSIFGW { _SET_PLLLOSIFGW { w: self } } #[doc = "Bit 14 - PLL out-of-range set interrupt flag"] #[inline] pub fn set_plloorifg(&mut self) -> _SET_PLLOORIFGW { _SET_PLLOORIFGW { w: self } } }