esp32c3/systimer/
int_st.rs

1#[doc = "Register `INT_ST` reader"]
2pub type R = crate::R<INT_ST_SPEC>;
3#[doc = "Field `TARGET(0-2)` reader - reg_target%s_int_st"]
4pub type TARGET_R = crate::BitReader;
5impl R {
6    #[doc = "reg_target(0-2)_int_st"]
7    #[doc = ""]
8    #[doc = "<div class=\"warning\">`n` is number of field in register. `n == 0` corresponds to `TARGET0` field.</div>"]
9    #[inline(always)]
10    pub fn target(&self, n: u8) -> TARGET_R {
11        #[allow(clippy::no_effect)]
12        [(); 3][n as usize];
13        TARGET_R::new(((self.bits >> n) & 1) != 0)
14    }
15    #[doc = "Iterator for array of:"]
16    #[doc = "reg_target(0-2)_int_st"]
17    #[inline(always)]
18    pub fn target_iter(&self) -> impl Iterator<Item = TARGET_R> + '_ {
19        (0..3).map(move |n| TARGET_R::new(((self.bits >> n) & 1) != 0))
20    }
21    #[doc = "Bit 0 - reg_target0_int_st"]
22    #[inline(always)]
23    pub fn target0(&self) -> TARGET_R {
24        TARGET_R::new((self.bits & 1) != 0)
25    }
26    #[doc = "Bit 1 - reg_target1_int_st"]
27    #[inline(always)]
28    pub fn target1(&self) -> TARGET_R {
29        TARGET_R::new(((self.bits >> 1) & 1) != 0)
30    }
31    #[doc = "Bit 2 - reg_target2_int_st"]
32    #[inline(always)]
33    pub fn target2(&self) -> TARGET_R {
34        TARGET_R::new(((self.bits >> 2) & 1) != 0)
35    }
36}
37#[cfg(feature = "impl-register-debug")]
38impl core::fmt::Debug for R {
39    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
40        f.debug_struct("INT_ST")
41            .field("target0", &self.target0())
42            .field("target1", &self.target1())
43            .field("target2", &self.target2())
44            .finish()
45    }
46}
47#[doc = "SYSTIMER_INT_ST.\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)."]
48pub struct INT_ST_SPEC;
49impl crate::RegisterSpec for INT_ST_SPEC {
50    type Ux = u32;
51}
52#[doc = "`read()` method returns [`int_st::R`](R) reader structure"]
53impl crate::Readable for INT_ST_SPEC {}
54#[doc = "`reset()` method sets INT_ST to value 0"]
55impl crate::Resettable for INT_ST_SPEC {
56    const RESET_VALUE: u32 = 0;
57}