esp32s3_ulp/sens/
sar_cocpu_int_raw.rs

1#[doc = "Register `SAR_COCPU_INT_RAW` reader"]
2pub type R = crate::R<SAR_COCPU_INT_RAW_SPEC>;
3#[doc = "Field `SAR_COCPU_TOUCH_DONE_INT_RAW` reader - int from touch done"]
4pub type SAR_COCPU_TOUCH_DONE_INT_RAW_R = crate::BitReader;
5#[doc = "Field `SAR_COCPU_TOUCH_INACTIVE_INT_RAW` reader - int from touch inactive"]
6pub type SAR_COCPU_TOUCH_INACTIVE_INT_RAW_R = crate::BitReader;
7#[doc = "Field `SAR_COCPU_TOUCH_ACTIVE_INT_RAW` reader - int from touch active"]
8pub type SAR_COCPU_TOUCH_ACTIVE_INT_RAW_R = crate::BitReader;
9#[doc = "Field `SAR_COCPU_SARADC1_INT_RAW` reader - int from saradc1"]
10pub type SAR_COCPU_SARADC1_INT_RAW_R = crate::BitReader;
11#[doc = "Field `SAR_COCPU_SARADC2_INT_RAW` reader - int from saradc2"]
12pub type SAR_COCPU_SARADC2_INT_RAW_R = crate::BitReader;
13#[doc = "Field `SAR_COCPU_TSENS_INT_RAW` reader - int from tsens"]
14pub type SAR_COCPU_TSENS_INT_RAW_R = crate::BitReader;
15#[doc = "Field `SAR_COCPU_START_INT_RAW` reader - int from start"]
16pub type SAR_COCPU_START_INT_RAW_R = crate::BitReader;
17#[doc = "Field `SAR_COCPU_SW_INT_RAW` reader - int from software"]
18pub type SAR_COCPU_SW_INT_RAW_R = crate::BitReader;
19#[doc = "Field `SAR_COCPU_SWD_INT_RAW` reader - int from super watch dog"]
20pub type SAR_COCPU_SWD_INT_RAW_R = crate::BitReader;
21#[doc = "Field `SAR_COCPU_TOUCH_TIMEOUT_INT_RAW` reader - int from timeout done"]
22pub type SAR_COCPU_TOUCH_TIMEOUT_INT_RAW_R = crate::BitReader;
23#[doc = "Field `SAR_COCPU_TOUCH_APPROACH_LOOP_DONE_INT_RAW` reader - int from approach loop done"]
24pub type SAR_COCPU_TOUCH_APPROACH_LOOP_DONE_INT_RAW_R = crate::BitReader;
25#[doc = "Field `SAR_COCPU_TOUCH_SCAN_DONE_INT_RAW` reader - int from touch scan done"]
26pub type SAR_COCPU_TOUCH_SCAN_DONE_INT_RAW_R = crate::BitReader;
27impl R {
28    #[doc = "Bit 0 - int from touch done"]
29    #[inline(always)]
30    pub fn sar_cocpu_touch_done_int_raw(&self) -> SAR_COCPU_TOUCH_DONE_INT_RAW_R {
31        SAR_COCPU_TOUCH_DONE_INT_RAW_R::new((self.bits & 1) != 0)
32    }
33    #[doc = "Bit 1 - int from touch inactive"]
34    #[inline(always)]
35    pub fn sar_cocpu_touch_inactive_int_raw(&self) -> SAR_COCPU_TOUCH_INACTIVE_INT_RAW_R {
36        SAR_COCPU_TOUCH_INACTIVE_INT_RAW_R::new(((self.bits >> 1) & 1) != 0)
37    }
38    #[doc = "Bit 2 - int from touch active"]
39    #[inline(always)]
40    pub fn sar_cocpu_touch_active_int_raw(&self) -> SAR_COCPU_TOUCH_ACTIVE_INT_RAW_R {
41        SAR_COCPU_TOUCH_ACTIVE_INT_RAW_R::new(((self.bits >> 2) & 1) != 0)
42    }
43    #[doc = "Bit 3 - int from saradc1"]
44    #[inline(always)]
45    pub fn sar_cocpu_saradc1_int_raw(&self) -> SAR_COCPU_SARADC1_INT_RAW_R {
46        SAR_COCPU_SARADC1_INT_RAW_R::new(((self.bits >> 3) & 1) != 0)
47    }
48    #[doc = "Bit 4 - int from saradc2"]
49    #[inline(always)]
50    pub fn sar_cocpu_saradc2_int_raw(&self) -> SAR_COCPU_SARADC2_INT_RAW_R {
51        SAR_COCPU_SARADC2_INT_RAW_R::new(((self.bits >> 4) & 1) != 0)
52    }
53    #[doc = "Bit 5 - int from tsens"]
54    #[inline(always)]
55    pub fn sar_cocpu_tsens_int_raw(&self) -> SAR_COCPU_TSENS_INT_RAW_R {
56        SAR_COCPU_TSENS_INT_RAW_R::new(((self.bits >> 5) & 1) != 0)
57    }
58    #[doc = "Bit 6 - int from start"]
59    #[inline(always)]
60    pub fn sar_cocpu_start_int_raw(&self) -> SAR_COCPU_START_INT_RAW_R {
61        SAR_COCPU_START_INT_RAW_R::new(((self.bits >> 6) & 1) != 0)
62    }
63    #[doc = "Bit 7 - int from software"]
64    #[inline(always)]
65    pub fn sar_cocpu_sw_int_raw(&self) -> SAR_COCPU_SW_INT_RAW_R {
66        SAR_COCPU_SW_INT_RAW_R::new(((self.bits >> 7) & 1) != 0)
67    }
68    #[doc = "Bit 8 - int from super watch dog"]
69    #[inline(always)]
70    pub fn sar_cocpu_swd_int_raw(&self) -> SAR_COCPU_SWD_INT_RAW_R {
71        SAR_COCPU_SWD_INT_RAW_R::new(((self.bits >> 8) & 1) != 0)
72    }
73    #[doc = "Bit 9 - int from timeout done"]
74    #[inline(always)]
75    pub fn sar_cocpu_touch_timeout_int_raw(&self) -> SAR_COCPU_TOUCH_TIMEOUT_INT_RAW_R {
76        SAR_COCPU_TOUCH_TIMEOUT_INT_RAW_R::new(((self.bits >> 9) & 1) != 0)
77    }
78    #[doc = "Bit 10 - int from approach loop done"]
79    #[inline(always)]
80    pub fn sar_cocpu_touch_approach_loop_done_int_raw(
81        &self,
82    ) -> SAR_COCPU_TOUCH_APPROACH_LOOP_DONE_INT_RAW_R {
83        SAR_COCPU_TOUCH_APPROACH_LOOP_DONE_INT_RAW_R::new(((self.bits >> 10) & 1) != 0)
84    }
85    #[doc = "Bit 11 - int from touch scan done"]
86    #[inline(always)]
87    pub fn sar_cocpu_touch_scan_done_int_raw(&self) -> SAR_COCPU_TOUCH_SCAN_DONE_INT_RAW_R {
88        SAR_COCPU_TOUCH_SCAN_DONE_INT_RAW_R::new(((self.bits >> 11) & 1) != 0)
89    }
90}
91#[cfg(feature = "impl-register-debug")]
92impl core::fmt::Debug for R {
93    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
94        f.debug_struct("SAR_COCPU_INT_RAW")
95            .field(
96                "sar_cocpu_touch_done_int_raw",
97                &self.sar_cocpu_touch_done_int_raw(),
98            )
99            .field(
100                "sar_cocpu_touch_inactive_int_raw",
101                &self.sar_cocpu_touch_inactive_int_raw(),
102            )
103            .field(
104                "sar_cocpu_touch_active_int_raw",
105                &self.sar_cocpu_touch_active_int_raw(),
106            )
107            .field(
108                "sar_cocpu_saradc1_int_raw",
109                &self.sar_cocpu_saradc1_int_raw(),
110            )
111            .field(
112                "sar_cocpu_saradc2_int_raw",
113                &self.sar_cocpu_saradc2_int_raw(),
114            )
115            .field("sar_cocpu_tsens_int_raw", &self.sar_cocpu_tsens_int_raw())
116            .field("sar_cocpu_start_int_raw", &self.sar_cocpu_start_int_raw())
117            .field("sar_cocpu_sw_int_raw", &self.sar_cocpu_sw_int_raw())
118            .field("sar_cocpu_swd_int_raw", &self.sar_cocpu_swd_int_raw())
119            .field(
120                "sar_cocpu_touch_timeout_int_raw",
121                &self.sar_cocpu_touch_timeout_int_raw(),
122            )
123            .field(
124                "sar_cocpu_touch_approach_loop_done_int_raw",
125                &self.sar_cocpu_touch_approach_loop_done_int_raw(),
126            )
127            .field(
128                "sar_cocpu_touch_scan_done_int_raw",
129                &self.sar_cocpu_touch_scan_done_int_raw(),
130            )
131            .finish()
132    }
133}
134#[doc = "the interrupt raw of ulp\n\nYou can [`read`](crate::Reg::read) this register and get [`sar_cocpu_int_raw::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
135pub struct SAR_COCPU_INT_RAW_SPEC;
136impl crate::RegisterSpec for SAR_COCPU_INT_RAW_SPEC {
137    type Ux = u32;
138}
139#[doc = "`read()` method returns [`sar_cocpu_int_raw::R`](R) reader structure"]
140impl crate::Readable for SAR_COCPU_INT_RAW_SPEC {}
141#[doc = "`reset()` method sets SAR_COCPU_INT_RAW to value 0"]
142impl crate::Resettable for SAR_COCPU_INT_RAW_SPEC {
143    const RESET_VALUE: u32 = 0;
144}