#[doc = "Register `INT_CLR` reader"]
pub struct R(crate::R<INT_CLR_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<INT_CLR_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::convert::From<crate::R<INT_CLR_SPEC>> for R {
fn from(reader: crate::R<INT_CLR_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `INT_CLR` writer"]
pub struct W(crate::W<INT_CLR_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<INT_CLR_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl core::convert::From<crate::W<INT_CLR_SPEC>> for W {
fn from(writer: crate::W<INT_CLR_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `MAIN_TIMER_INT_CLR` reader - "]
pub struct MAIN_TIMER_INT_CLR_R(crate::FieldReader<bool, bool>);
impl MAIN_TIMER_INT_CLR_R {
pub(crate) fn new(bits: bool) -> Self {
MAIN_TIMER_INT_CLR_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for MAIN_TIMER_INT_CLR_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `MAIN_TIMER_INT_CLR` writer - "]
pub struct MAIN_TIMER_INT_CLR_W<'a> {
w: &'a mut W,
}
impl<'a> MAIN_TIMER_INT_CLR_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8);
self.w
}
}
#[doc = "Field `BROWN_OUT_INT_CLR` reader - "]
pub struct BROWN_OUT_INT_CLR_R(crate::FieldReader<bool, bool>);
impl BROWN_OUT_INT_CLR_R {
pub(crate) fn new(bits: bool) -> Self {
BROWN_OUT_INT_CLR_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BROWN_OUT_INT_CLR_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BROWN_OUT_INT_CLR` writer - "]
pub struct BROWN_OUT_INT_CLR_W<'a> {
w: &'a mut W,
}
impl<'a> BROWN_OUT_INT_CLR_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7);
self.w
}
}
#[doc = "Field `TOUCH_INT_CLR` reader - "]
pub struct TOUCH_INT_CLR_R(crate::FieldReader<bool, bool>);
impl TOUCH_INT_CLR_R {
pub(crate) fn new(bits: bool) -> Self {
TOUCH_INT_CLR_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for TOUCH_INT_CLR_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `TOUCH_INT_CLR` writer - "]
pub struct TOUCH_INT_CLR_W<'a> {
w: &'a mut W,
}
impl<'a> TOUCH_INT_CLR_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6);
self.w
}
}
#[doc = "Field `SAR_INT_CLR` reader - "]
pub struct SAR_INT_CLR_R(crate::FieldReader<bool, bool>);
impl SAR_INT_CLR_R {
pub(crate) fn new(bits: bool) -> Self {
SAR_INT_CLR_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for SAR_INT_CLR_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `SAR_INT_CLR` writer - "]
pub struct SAR_INT_CLR_W<'a> {
w: &'a mut W,
}
impl<'a> SAR_INT_CLR_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5);
self.w
}
}
#[doc = "Field `TIME_VALID_INT_CLR` reader - "]
pub struct TIME_VALID_INT_CLR_R(crate::FieldReader<bool, bool>);
impl TIME_VALID_INT_CLR_R {
pub(crate) fn new(bits: bool) -> Self {
TIME_VALID_INT_CLR_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for TIME_VALID_INT_CLR_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `TIME_VALID_INT_CLR` writer - "]
pub struct TIME_VALID_INT_CLR_W<'a> {
w: &'a mut W,
}
impl<'a> TIME_VALID_INT_CLR_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4);
self.w
}
}
#[doc = "Field `WDT_INT_CLR` reader - "]
pub struct WDT_INT_CLR_R(crate::FieldReader<bool, bool>);
impl WDT_INT_CLR_R {
pub(crate) fn new(bits: bool) -> Self {
WDT_INT_CLR_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for WDT_INT_CLR_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `WDT_INT_CLR` writer - "]
pub struct WDT_INT_CLR_W<'a> {
w: &'a mut W,
}
impl<'a> WDT_INT_CLR_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3);
self.w
}
}
#[doc = "Field `SDIO_IDLE_INT_CLR` reader - "]
pub struct SDIO_IDLE_INT_CLR_R(crate::FieldReader<bool, bool>);
impl SDIO_IDLE_INT_CLR_R {
pub(crate) fn new(bits: bool) -> Self {
SDIO_IDLE_INT_CLR_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for SDIO_IDLE_INT_CLR_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `SDIO_IDLE_INT_CLR` writer - "]
pub struct SDIO_IDLE_INT_CLR_W<'a> {
w: &'a mut W,
}
impl<'a> SDIO_IDLE_INT_CLR_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2);
self.w
}
}
#[doc = "Field `SLP_REJECT_INT_CLR` reader - "]
pub struct SLP_REJECT_INT_CLR_R(crate::FieldReader<bool, bool>);
impl SLP_REJECT_INT_CLR_R {
pub(crate) fn new(bits: bool) -> Self {
SLP_REJECT_INT_CLR_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for SLP_REJECT_INT_CLR_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `SLP_REJECT_INT_CLR` writer - "]
pub struct SLP_REJECT_INT_CLR_W<'a> {
w: &'a mut W,
}
impl<'a> SLP_REJECT_INT_CLR_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1);
self.w
}
}
#[doc = "Field `SLP_WAKEUP_INT_CLR` reader - "]
pub struct SLP_WAKEUP_INT_CLR_R(crate::FieldReader<bool, bool>);
impl SLP_WAKEUP_INT_CLR_R {
pub(crate) fn new(bits: bool) -> Self {
SLP_WAKEUP_INT_CLR_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for SLP_WAKEUP_INT_CLR_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `SLP_WAKEUP_INT_CLR` writer - "]
pub struct SLP_WAKEUP_INT_CLR_W<'a> {
w: &'a mut W,
}
impl<'a> SLP_WAKEUP_INT_CLR_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01);
self.w
}
}
impl R {
#[doc = "Bit 8"]
#[inline(always)]
pub fn main_timer_int_clr(&self) -> MAIN_TIMER_INT_CLR_R {
MAIN_TIMER_INT_CLR_R::new(((self.bits >> 8) & 0x01) != 0)
}
#[doc = "Bit 7"]
#[inline(always)]
pub fn brown_out_int_clr(&self) -> BROWN_OUT_INT_CLR_R {
BROWN_OUT_INT_CLR_R::new(((self.bits >> 7) & 0x01) != 0)
}
#[doc = "Bit 6"]
#[inline(always)]
pub fn touch_int_clr(&self) -> TOUCH_INT_CLR_R {
TOUCH_INT_CLR_R::new(((self.bits >> 6) & 0x01) != 0)
}
#[doc = "Bit 5"]
#[inline(always)]
pub fn sar_int_clr(&self) -> SAR_INT_CLR_R {
SAR_INT_CLR_R::new(((self.bits >> 5) & 0x01) != 0)
}
#[doc = "Bit 4"]
#[inline(always)]
pub fn time_valid_int_clr(&self) -> TIME_VALID_INT_CLR_R {
TIME_VALID_INT_CLR_R::new(((self.bits >> 4) & 0x01) != 0)
}
#[doc = "Bit 3"]
#[inline(always)]
pub fn wdt_int_clr(&self) -> WDT_INT_CLR_R {
WDT_INT_CLR_R::new(((self.bits >> 3) & 0x01) != 0)
}
#[doc = "Bit 2"]
#[inline(always)]
pub fn sdio_idle_int_clr(&self) -> SDIO_IDLE_INT_CLR_R {
SDIO_IDLE_INT_CLR_R::new(((self.bits >> 2) & 0x01) != 0)
}
#[doc = "Bit 1"]
#[inline(always)]
pub fn slp_reject_int_clr(&self) -> SLP_REJECT_INT_CLR_R {
SLP_REJECT_INT_CLR_R::new(((self.bits >> 1) & 0x01) != 0)
}
#[doc = "Bit 0"]
#[inline(always)]
pub fn slp_wakeup_int_clr(&self) -> SLP_WAKEUP_INT_CLR_R {
SLP_WAKEUP_INT_CLR_R::new((self.bits & 0x01) != 0)
}
}
impl W {
#[doc = "Bit 8"]
#[inline(always)]
pub fn main_timer_int_clr(&mut self) -> MAIN_TIMER_INT_CLR_W {
MAIN_TIMER_INT_CLR_W { w: self }
}
#[doc = "Bit 7"]
#[inline(always)]
pub fn brown_out_int_clr(&mut self) -> BROWN_OUT_INT_CLR_W {
BROWN_OUT_INT_CLR_W { w: self }
}
#[doc = "Bit 6"]
#[inline(always)]
pub fn touch_int_clr(&mut self) -> TOUCH_INT_CLR_W {
TOUCH_INT_CLR_W { w: self }
}
#[doc = "Bit 5"]
#[inline(always)]
pub fn sar_int_clr(&mut self) -> SAR_INT_CLR_W {
SAR_INT_CLR_W { w: self }
}
#[doc = "Bit 4"]
#[inline(always)]
pub fn time_valid_int_clr(&mut self) -> TIME_VALID_INT_CLR_W {
TIME_VALID_INT_CLR_W { w: self }
}
#[doc = "Bit 3"]
#[inline(always)]
pub fn wdt_int_clr(&mut self) -> WDT_INT_CLR_W {
WDT_INT_CLR_W { w: self }
}
#[doc = "Bit 2"]
#[inline(always)]
pub fn sdio_idle_int_clr(&mut self) -> SDIO_IDLE_INT_CLR_W {
SDIO_IDLE_INT_CLR_W { w: self }
}
#[doc = "Bit 1"]
#[inline(always)]
pub fn slp_reject_int_clr(&mut self) -> SLP_REJECT_INT_CLR_W {
SLP_REJECT_INT_CLR_W { w: self }
}
#[doc = "Bit 0"]
#[inline(always)]
pub fn slp_wakeup_int_clr(&mut self) -> SLP_WAKEUP_INT_CLR_W {
SLP_WAKEUP_INT_CLR_W { w: self }
}
#[doc = "Writes raw bits to the register."]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "RTC_CNTL_INT_CLR\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [int_clr](index.html) module"]
pub struct INT_CLR_SPEC;
impl crate::RegisterSpec for INT_CLR_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [int_clr::R](R) reader structure"]
impl crate::Readable for INT_CLR_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [int_clr::W](W) writer structure"]
impl crate::Writable for INT_CLR_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets INT_CLR to value 0"]
impl crate::Resettable for INT_CLR_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}