cc2650 0.1.1

Device support for TI CC2650 microcontrollers
Documentation
#[doc = r" Value to write to the register"]
pub struct W {
    bits: u32,
}
impl super::IRQCLR {
    #[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" Proxy"]
pub struct _DMA_BUS_ERRW<'a> {
    w: &'a mut W,
}
impl<'a> _DMA_BUS_ERRW<'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 = 31;
        self.w.bits &= !((MASK as u32) << OFFSET);
        self.w.bits |= ((value & MASK) as u32) << OFFSET;
        self.w
    }
}
#[doc = r" Proxy"]
pub struct _KEY_ST_WR_ERRW<'a> {
    w: &'a mut W,
}
impl<'a> _KEY_ST_WR_ERRW<'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 = 30;
        self.w.bits &= !((MASK as u32) << OFFSET);
        self.w.bits |= ((value & MASK) as u32) << OFFSET;
        self.w
    }
}
#[doc = r" Proxy"]
pub struct _KEY_ST_RD_ERRW<'a> {
    w: &'a mut W,
}
impl<'a> _KEY_ST_RD_ERRW<'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 = 29;
        self.w.bits &= !((MASK as u32) << OFFSET);
        self.w.bits |= ((value & MASK) as u32) << OFFSET;
        self.w
    }
}
#[doc = r" Proxy"]
pub struct _RESERVED2W<'a> {
    w: &'a mut W,
}
impl<'a> _RESERVED2W<'a> {
    #[doc = r" Writes raw bits to the field"]
    #[inline]
    pub unsafe fn bits(self, value: u32) -> &'a mut W {
        const MASK: u32 = 134217727;
        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 _DMA_IN_DONEW<'a> {
    w: &'a mut W,
}
impl<'a> _DMA_IN_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 = 1;
        self.w.bits &= !((MASK as u32) << OFFSET);
        self.w.bits |= ((value & MASK) as u32) << OFFSET;
        self.w
    }
}
#[doc = r" Proxy"]
pub struct _RESULT_AVAILW<'a> {
    w: &'a mut W,
}
impl<'a> _RESULT_AVAILW<'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 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 31 - If 1 is written to this bit, IRQSTAT.DMA_BUS_ERR is cleared."]
    #[inline]
    pub fn dma_bus_err(&mut self) -> _DMA_BUS_ERRW {
        _DMA_BUS_ERRW { w: self }
    }
    #[doc = "Bit 30 - If 1 is written to this bit, IRQSTAT.KEY_ST_WR_ERR is cleared."]
    #[inline]
    pub fn key_st_wr_err(&mut self) -> _KEY_ST_WR_ERRW {
        _KEY_ST_WR_ERRW { w: self }
    }
    #[doc = "Bit 29 - If 1 is written to this bit, IRQSTAT.KEY_ST_RD_ERR is cleared."]
    #[inline]
    pub fn key_st_rd_err(&mut self) -> _KEY_ST_RD_ERRW {
        _KEY_ST_RD_ERRW { w: self }
    }
    #[doc = "Bits 2:28 - 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 reserved2(&mut self) -> _RESERVED2W {
        _RESERVED2W { w: self }
    }
    #[doc = "Bit 1 - If 1 is written to this bit, IRQSTAT.DMA_IN_DONE is cleared."]
    #[inline]
    pub fn dma_in_done(&mut self) -> _DMA_IN_DONEW {
        _DMA_IN_DONEW { w: self }
    }
    #[doc = "Bit 0 - If 1 is written to this bit, IRQSTAT.RESULT_AVAIL is cleared."]
    #[inline]
    pub fn result_avail(&mut self) -> _RESULT_AVAILW {
        _RESULT_AVAILW { w: self }
    }
}