esp32c2/timg0/
int_st.rs

1#[doc = "Register `INT_ST` reader"]
2pub type R = crate::R<INT_ST_SPEC>;
3#[doc = "Field `T(0-0)` reader - The masked interrupt status bit for the TIMG_T%s_INT interrupt."]
4pub type T_R = crate::BitReader;
5#[doc = "Field `WDT` reader - The masked interrupt status bit for the TIMG_WDT_INT interrupt."]
6pub type WDT_R = crate::BitReader;
7impl R {
8    #[doc = "The masked interrupt status bit for the TIMG_T(0-0)_INT interrupt."]
9    #[doc = ""]
10    #[doc = "<div class=\"warning\">`n` is number of field in register. `n == 0` corresponds to `T0` field.</div>"]
11    #[inline(always)]
12    pub fn t(&self, n: u8) -> T_R {
13        #[allow(clippy::no_effect)]
14        [(); 1][n as usize];
15        T_R::new(((self.bits >> (n * 0)) & 1) != 0)
16    }
17    #[doc = "Iterator for array of:"]
18    #[doc = "The masked interrupt status bit for the TIMG_T(0-0)_INT interrupt."]
19    #[inline(always)]
20    pub fn t_iter(&self) -> impl Iterator<Item = T_R> + '_ {
21        (0..1).map(move |n| T_R::new(((self.bits >> (n * 0)) & 1) != 0))
22    }
23    #[doc = "Bit 0 - The masked interrupt status bit for the TIMG_T0_INT interrupt."]
24    #[inline(always)]
25    pub fn t0(&self) -> T_R {
26        T_R::new((self.bits & 1) != 0)
27    }
28    #[doc = "Bit 1 - The masked interrupt status bit for the TIMG_WDT_INT interrupt."]
29    #[inline(always)]
30    pub fn wdt(&self) -> WDT_R {
31        WDT_R::new(((self.bits >> 1) & 1) != 0)
32    }
33}
34#[cfg(feature = "impl-register-debug")]
35impl core::fmt::Debug for R {
36    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
37        f.debug_struct("INT_ST")
38            .field("t0", &self.t0())
39            .field("wdt", &self.wdt())
40            .finish()
41    }
42}
43#[doc = "Masked interrupt status\n\nYou can [`read`](crate::Reg::read) this register and get [`int_st::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
44pub struct INT_ST_SPEC;
45impl crate::RegisterSpec for INT_ST_SPEC {
46    type Ux = u32;
47}
48#[doc = "`read()` method returns [`int_st::R`](R) reader structure"]
49impl crate::Readable for INT_ST_SPEC {}
50#[doc = "`reset()` method sets INT_ST to value 0"]
51impl crate::Resettable for INT_ST_SPEC {
52    const RESET_VALUE: u32 = 0;
53}