esp32s2/rtc_cntl/
int_raw.rs1#[doc = "Register `INT_RAW` reader"]
2pub type R = crate::R<INT_RAW_SPEC>;
3#[doc = "Field `SLP_WAKEUP` reader - Stores the raw interrupt triggered when the chip wakes up from sleep."]
4pub type SLP_WAKEUP_R = crate::BitReader;
5#[doc = "Field `SLP_REJECT` reader - Stores the raw interrupt triggered when the chip rejects to go to sleep."]
6pub type SLP_REJECT_R = crate::BitReader;
7#[doc = "Field `SDIO_IDLE` reader - Stores the raw interrupt triggered when the SDIO idles."]
8pub type SDIO_IDLE_R = crate::BitReader;
9#[doc = "Field `WDT` reader - Stores the raw RTC watchdog interrupt."]
10pub type WDT_R = crate::BitReader;
11#[doc = "Field `TOUCH_SCAN_DONE` reader - Stores the raw interrupt triggered upon the completion of a touch scanning."]
12pub type TOUCH_SCAN_DONE_R = crate::BitReader;
13#[doc = "Field `ULP_CP` reader - Stores the raw ULP co-processor interrupt."]
14pub type ULP_CP_R = crate::BitReader;
15#[doc = "Field `TOUCH_DONE` reader - Stores the raw interrupt triggered upon the completion of a single touch."]
16pub type TOUCH_DONE_R = crate::BitReader;
17#[doc = "Field `TOUCH_ACTIVE` reader - Stores the raw interrupt triggered when a touch is detected."]
18pub type TOUCH_ACTIVE_R = crate::BitReader;
19#[doc = "Field `TOUCH_INACTIVE` reader - Stores the raw interrupt triggered when a touch is released."]
20pub type TOUCH_INACTIVE_R = crate::BitReader;
21#[doc = "Field `BROWN_OUT` reader - Stores the raw brown out interrupt."]
22pub type BROWN_OUT_R = crate::BitReader;
23#[doc = "Field `MAIN_TIMER` reader - Stores the raw RTC main timer interrupt."]
24pub type MAIN_TIMER_R = crate::BitReader;
25#[doc = "Field `SARADC1` reader - Stores the raw SAR ADC 1 interrupt."]
26pub type SARADC1_R = crate::BitReader;
27#[doc = "Field `TSENS` reader - Stores the raw touch sensor interrupt."]
28pub type TSENS_R = crate::BitReader;
29#[doc = "Field `COCPU` reader - Stores the raw ULP-RISCV interrupt."]
30pub type COCPU_R = crate::BitReader;
31#[doc = "Field `SARADC2` reader - Stores the raw SAR ADC 2 interrupt."]
32pub type SARADC2_R = crate::BitReader;
33#[doc = "Field `SWD` reader - Stores the raw super watchdog interrupt."]
34pub type SWD_R = crate::BitReader;
35#[doc = "Field `XTAL32K_DEAD` reader - Stores the raw interrupt triggered when the 32 kHz crystal is dead."]
36pub type XTAL32K_DEAD_R = crate::BitReader;
37#[doc = "Field `COCPU_TRAP` reader - Stores the raw interrupt triggered when the ULP-RISCV is trapped."]
38pub type COCPU_TRAP_R = crate::BitReader;
39#[doc = "Field `TOUCH_TIMEOUT` reader - Stores the raw interrupt triggered when touch sensor times out."]
40pub type TOUCH_TIMEOUT_R = crate::BitReader;
41#[doc = "Field `GLITCH_DET` reader - Stores the raw interrupt triggered when a glitch is detected."]
42pub type GLITCH_DET_R = crate::BitReader;
43impl R {
44 #[doc = "Bit 0 - Stores the raw interrupt triggered when the chip wakes up from sleep."]
45 #[inline(always)]
46 pub fn slp_wakeup(&self) -> SLP_WAKEUP_R {
47 SLP_WAKEUP_R::new((self.bits & 1) != 0)
48 }
49 #[doc = "Bit 1 - Stores the raw interrupt triggered when the chip rejects to go to sleep."]
50 #[inline(always)]
51 pub fn slp_reject(&self) -> SLP_REJECT_R {
52 SLP_REJECT_R::new(((self.bits >> 1) & 1) != 0)
53 }
54 #[doc = "Bit 2 - Stores the raw interrupt triggered when the SDIO idles."]
55 #[inline(always)]
56 pub fn sdio_idle(&self) -> SDIO_IDLE_R {
57 SDIO_IDLE_R::new(((self.bits >> 2) & 1) != 0)
58 }
59 #[doc = "Bit 3 - Stores the raw RTC watchdog interrupt."]
60 #[inline(always)]
61 pub fn wdt(&self) -> WDT_R {
62 WDT_R::new(((self.bits >> 3) & 1) != 0)
63 }
64 #[doc = "Bit 4 - Stores the raw interrupt triggered upon the completion of a touch scanning."]
65 #[inline(always)]
66 pub fn touch_scan_done(&self) -> TOUCH_SCAN_DONE_R {
67 TOUCH_SCAN_DONE_R::new(((self.bits >> 4) & 1) != 0)
68 }
69 #[doc = "Bit 5 - Stores the raw ULP co-processor interrupt."]
70 #[inline(always)]
71 pub fn ulp_cp(&self) -> ULP_CP_R {
72 ULP_CP_R::new(((self.bits >> 5) & 1) != 0)
73 }
74 #[doc = "Bit 6 - Stores the raw interrupt triggered upon the completion of a single touch."]
75 #[inline(always)]
76 pub fn touch_done(&self) -> TOUCH_DONE_R {
77 TOUCH_DONE_R::new(((self.bits >> 6) & 1) != 0)
78 }
79 #[doc = "Bit 7 - Stores the raw interrupt triggered when a touch is detected."]
80 #[inline(always)]
81 pub fn touch_active(&self) -> TOUCH_ACTIVE_R {
82 TOUCH_ACTIVE_R::new(((self.bits >> 7) & 1) != 0)
83 }
84 #[doc = "Bit 8 - Stores the raw interrupt triggered when a touch is released."]
85 #[inline(always)]
86 pub fn touch_inactive(&self) -> TOUCH_INACTIVE_R {
87 TOUCH_INACTIVE_R::new(((self.bits >> 8) & 1) != 0)
88 }
89 #[doc = "Bit 9 - Stores the raw brown out interrupt."]
90 #[inline(always)]
91 pub fn brown_out(&self) -> BROWN_OUT_R {
92 BROWN_OUT_R::new(((self.bits >> 9) & 1) != 0)
93 }
94 #[doc = "Bit 10 - Stores the raw RTC main timer interrupt."]
95 #[inline(always)]
96 pub fn main_timer(&self) -> MAIN_TIMER_R {
97 MAIN_TIMER_R::new(((self.bits >> 10) & 1) != 0)
98 }
99 #[doc = "Bit 11 - Stores the raw SAR ADC 1 interrupt."]
100 #[inline(always)]
101 pub fn saradc1(&self) -> SARADC1_R {
102 SARADC1_R::new(((self.bits >> 11) & 1) != 0)
103 }
104 #[doc = "Bit 12 - Stores the raw touch sensor interrupt."]
105 #[inline(always)]
106 pub fn tsens(&self) -> TSENS_R {
107 TSENS_R::new(((self.bits >> 12) & 1) != 0)
108 }
109 #[doc = "Bit 13 - Stores the raw ULP-RISCV interrupt."]
110 #[inline(always)]
111 pub fn cocpu(&self) -> COCPU_R {
112 COCPU_R::new(((self.bits >> 13) & 1) != 0)
113 }
114 #[doc = "Bit 14 - Stores the raw SAR ADC 2 interrupt."]
115 #[inline(always)]
116 pub fn saradc2(&self) -> SARADC2_R {
117 SARADC2_R::new(((self.bits >> 14) & 1) != 0)
118 }
119 #[doc = "Bit 15 - Stores the raw super watchdog interrupt."]
120 #[inline(always)]
121 pub fn swd(&self) -> SWD_R {
122 SWD_R::new(((self.bits >> 15) & 1) != 0)
123 }
124 #[doc = "Bit 16 - Stores the raw interrupt triggered when the 32 kHz crystal is dead."]
125 #[inline(always)]
126 pub fn xtal32k_dead(&self) -> XTAL32K_DEAD_R {
127 XTAL32K_DEAD_R::new(((self.bits >> 16) & 1) != 0)
128 }
129 #[doc = "Bit 17 - Stores the raw interrupt triggered when the ULP-RISCV is trapped."]
130 #[inline(always)]
131 pub fn cocpu_trap(&self) -> COCPU_TRAP_R {
132 COCPU_TRAP_R::new(((self.bits >> 17) & 1) != 0)
133 }
134 #[doc = "Bit 18 - Stores the raw interrupt triggered when touch sensor times out."]
135 #[inline(always)]
136 pub fn touch_timeout(&self) -> TOUCH_TIMEOUT_R {
137 TOUCH_TIMEOUT_R::new(((self.bits >> 18) & 1) != 0)
138 }
139 #[doc = "Bit 19 - Stores the raw interrupt triggered when a glitch is detected."]
140 #[inline(always)]
141 pub fn glitch_det(&self) -> GLITCH_DET_R {
142 GLITCH_DET_R::new(((self.bits >> 19) & 1) != 0)
143 }
144}
145#[cfg(feature = "impl-register-debug")]
146impl core::fmt::Debug for R {
147 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
148 f.debug_struct("INT_RAW")
149 .field("slp_wakeup", &self.slp_wakeup())
150 .field("slp_reject", &self.slp_reject())
151 .field("sdio_idle", &self.sdio_idle())
152 .field("wdt", &self.wdt())
153 .field("touch_scan_done", &self.touch_scan_done())
154 .field("ulp_cp", &self.ulp_cp())
155 .field("touch_done", &self.touch_done())
156 .field("touch_active", &self.touch_active())
157 .field("touch_inactive", &self.touch_inactive())
158 .field("brown_out", &self.brown_out())
159 .field("main_timer", &self.main_timer())
160 .field("saradc1", &self.saradc1())
161 .field("tsens", &self.tsens())
162 .field("cocpu", &self.cocpu())
163 .field("saradc2", &self.saradc2())
164 .field("swd", &self.swd())
165 .field("xtal32k_dead", &self.xtal32k_dead())
166 .field("cocpu_trap", &self.cocpu_trap())
167 .field("touch_timeout", &self.touch_timeout())
168 .field("glitch_det", &self.glitch_det())
169 .finish()
170 }
171}
172#[doc = "RTC interrupt raw register\n\nYou can [`read`](crate::Reg::read) this register and get [`int_raw::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
173pub struct INT_RAW_SPEC;
174impl crate::RegisterSpec for INT_RAW_SPEC {
175 type Ux = u32;
176}
177#[doc = "`read()` method returns [`int_raw::R`](R) reader structure"]
178impl crate::Readable for INT_RAW_SPEC {}
179#[doc = "`reset()` method sets INT_RAW to value 0"]
180impl crate::Resettable for INT_RAW_SPEC {
181 const RESET_VALUE: u32 = 0;
182}