#[doc = r" Value read from the register"]
pub struct R {
bits: u32,
}
#[doc = r" Value to write to the register"]
pub struct W {
bits: u32,
}
impl super::EVTOMCUFLAGSCLR {
#[doc = r" Modifies the contents of the register"]
#[inline]
pub fn modify<F>(&self, f: F)
where
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
{
let bits = self.register.get();
let r = R { bits: bits };
let mut w = W { bits: bits };
f(&r, &mut w);
self.register.set(w.bits);
}
#[doc = r" Reads the contents of the register"]
#[inline]
pub fn read(&self) -> R {
R { bits: self.register.get() }
}
#[doc = r" Writes to the register"]
#[inline]
pub fn write<F>(&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 = r" Writes the reset value to the register"]
#[inline]
pub fn reset(&self) {
self.write(|w| w)
}
}
#[doc = r" Value of the field"]
pub struct RESERVED11R {
bits: u32,
}
impl RESERVED11R {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u32 {
self.bits
}
}
#[doc = r" Proxy"]
pub struct _ADC_IRQW<'a> {
w: &'a mut W,
}
impl<'a> _ADC_IRQW<'a> {
#[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 = r" Proxy"]
pub struct _OBSMUX0W<'a> {
w: &'a mut W,
}
impl<'a> _OBSMUX0W<'a> {
#[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 = r" Proxy"]
pub struct _ADC_FIFO_ALMOST_FULLW<'a> {
w: &'a mut W,
}
impl<'a> _ADC_FIFO_ALMOST_FULLW<'a> {
#[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 = r" Proxy"]
pub struct _ADC_DONEW<'a> {
w: &'a mut W,
}
impl<'a> _ADC_DONEW<'a> {
#[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 = 7;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = r" Proxy"]
pub struct _SMPH_AUTOTAKE_DONEW<'a> {
w: &'a mut W,
}
impl<'a> _SMPH_AUTOTAKE_DONEW<'a> {
#[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 = r" Proxy"]
pub struct _TIMER1_EVW<'a> {
w: &'a mut W,
}
impl<'a> _TIMER1_EVW<'a> {
#[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 = 5;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = r" Proxy"]
pub struct _TIMER0_EVW<'a> {
w: &'a mut W,
}
impl<'a> _TIMER0_EVW<'a> {
#[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 = 4;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = r" Proxy"]
pub struct _TDC_DONEW<'a> {
w: &'a mut W,
}
impl<'a> _TDC_DONEW<'a> {
#[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 = 3;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = r" Proxy"]
pub struct _AUX_COMPBW<'a> {
w: &'a mut W,
}
impl<'a> _AUX_COMPBW<'a> {
#[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 = r" Proxy"]
pub struct _AUX_COMPAW<'a> {
w: &'a mut W,
}
impl<'a> _AUX_COMPAW<'a> {
#[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 = r" Proxy"]
pub struct _AON_WU_EVW<'a> {
w: &'a mut W,
}
impl<'a> _AON_WU_EVW<'a> {
#[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
}
}
impl R {
#[doc = r" Value of the register as raw bits"]
#[inline]
pub fn bits(&self) -> u32 {
self.bits
}
#[doc = "Bits 11:31 - Software should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior."]
#[inline]
pub fn reserved11(&self) -> RESERVED11R {
let bits = {
const MASK: u32 = 2097151;
const OFFSET: u8 = 11;
((self.bits >> OFFSET) & MASK as u32) as u32
};
RESERVED11R { bits }
}
}
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 10 - Write 1 to clear EVTOMCUFLAGS.ADC_IRQ. Read value is 0."]
#[inline]
pub fn adc_irq(&mut self) -> _ADC_IRQW {
_ADC_IRQW { w: self }
}
#[doc = "Bit 9 - Write 1 to clear EVTOMCUFLAGS.MCU_OBSMUX0. Read value is 0."]
#[inline]
pub fn obsmux0(&mut self) -> _OBSMUX0W {
_OBSMUX0W { w: self }
}
#[doc = "Bit 8 - Write 1 to clear EVTOMCUFLAGS.ADC_FIFO_ALMOST_FULL. Read value is 0."]
#[inline]
pub fn adc_fifo_almost_full(&mut self) -> _ADC_FIFO_ALMOST_FULLW {
_ADC_FIFO_ALMOST_FULLW { w: self }
}
#[doc = "Bit 7 - Write 1 to clear EVTOMCUFLAGS.ADC_DONE. Read value is 0."]
#[inline]
pub fn adc_done(&mut self) -> _ADC_DONEW {
_ADC_DONEW { w: self }
}
#[doc = "Bit 6 - Write 1 to clear EVTOMCUFLAGS.SMPH_AUTOTAKE_DONE. Read value is 0."]
#[inline]
pub fn smph_autotake_done(&mut self) -> _SMPH_AUTOTAKE_DONEW {
_SMPH_AUTOTAKE_DONEW { w: self }
}
#[doc = "Bit 5 - Write 1 to clear EVTOMCUFLAGS.TIMER1_EV. Read value is 0."]
#[inline]
pub fn timer1_ev(&mut self) -> _TIMER1_EVW {
_TIMER1_EVW { w: self }
}
#[doc = "Bit 4 - Write 1 to clear EVTOMCUFLAGS.TIMER0_EV. Read value is 0."]
#[inline]
pub fn timer0_ev(&mut self) -> _TIMER0_EVW {
_TIMER0_EVW { w: self }
}
#[doc = "Bit 3 - Write 1 to clear EVTOMCUFLAGS.TDC_DONE. Read value is 0."]
#[inline]
pub fn tdc_done(&mut self) -> _TDC_DONEW {
_TDC_DONEW { w: self }
}
#[doc = "Bit 2 - Write 1 to clear EVTOMCUFLAGS.AUX_COMPB. Read value is 0."]
#[inline]
pub fn aux_compb(&mut self) -> _AUX_COMPBW {
_AUX_COMPBW { w: self }
}
#[doc = "Bit 1 - Write 1 to clear EVTOMCUFLAGS.AUX_COMPA. Read value is 0."]
#[inline]
pub fn aux_compa(&mut self) -> _AUX_COMPAW {
_AUX_COMPAW { w: self }
}
#[doc = "Bit 0 - Write 1 to clear EVTOMCUFLAGS.AON_WU_EV. Read value is 0."]
#[inline]
pub fn aon_wu_ev(&mut self) -> _AON_WU_EVW {
_AON_WU_EVW { w: self }
}
}