esp32h2/pmu/
lp_int_raw.rs1#[doc = "Register `LP_INT_RAW` reader"]
2pub type R = crate::R<LP_INT_RAW_SPEC>;
3#[doc = "Register `LP_INT_RAW` writer"]
4pub type W = crate::W<LP_INT_RAW_SPEC>;
5#[doc = "Field `LP_CPU_WAKEUP` reader - need_des"]
6pub type LP_CPU_WAKEUP_R = crate::BitReader;
7#[doc = "Field `LP_CPU_WAKEUP` writer - need_des"]
8pub type LP_CPU_WAKEUP_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `MODEM_SWITCH_ACTIVE_END` reader - need_des"]
10pub type MODEM_SWITCH_ACTIVE_END_R = crate::BitReader;
11#[doc = "Field `MODEM_SWITCH_ACTIVE_END` writer - need_des"]
12pub type MODEM_SWITCH_ACTIVE_END_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `SLEEP_SWITCH_ACTIVE_END` reader - need_des"]
14pub type SLEEP_SWITCH_ACTIVE_END_R = crate::BitReader;
15#[doc = "Field `SLEEP_SWITCH_ACTIVE_END` writer - need_des"]
16pub type SLEEP_SWITCH_ACTIVE_END_W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `SLEEP_SWITCH_MODEM_END` reader - need_des"]
18pub type SLEEP_SWITCH_MODEM_END_R = crate::BitReader;
19#[doc = "Field `SLEEP_SWITCH_MODEM_END` writer - need_des"]
20pub type SLEEP_SWITCH_MODEM_END_W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `MODEM_SWITCH_SLEEP_END` reader - need_des"]
22pub type MODEM_SWITCH_SLEEP_END_R = crate::BitReader;
23#[doc = "Field `MODEM_SWITCH_SLEEP_END` writer - need_des"]
24pub type MODEM_SWITCH_SLEEP_END_W<'a, REG> = crate::BitWriter<'a, REG>;
25#[doc = "Field `ACTIVE_SWITCH_SLEEP_END` reader - need_des"]
26pub type ACTIVE_SWITCH_SLEEP_END_R = crate::BitReader;
27#[doc = "Field `ACTIVE_SWITCH_SLEEP_END` writer - need_des"]
28pub type ACTIVE_SWITCH_SLEEP_END_W<'a, REG> = crate::BitWriter<'a, REG>;
29#[doc = "Field `MODEM_SWITCH_ACTIVE_START` reader - need_des"]
30pub type MODEM_SWITCH_ACTIVE_START_R = crate::BitReader;
31#[doc = "Field `MODEM_SWITCH_ACTIVE_START` writer - need_des"]
32pub type MODEM_SWITCH_ACTIVE_START_W<'a, REG> = crate::BitWriter<'a, REG>;
33#[doc = "Field `SLEEP_SWITCH_ACTIVE_START` reader - need_des"]
34pub type SLEEP_SWITCH_ACTIVE_START_R = crate::BitReader;
35#[doc = "Field `SLEEP_SWITCH_ACTIVE_START` writer - need_des"]
36pub type SLEEP_SWITCH_ACTIVE_START_W<'a, REG> = crate::BitWriter<'a, REG>;
37#[doc = "Field `SLEEP_SWITCH_MODEM_START` reader - need_des"]
38pub type SLEEP_SWITCH_MODEM_START_R = crate::BitReader;
39#[doc = "Field `SLEEP_SWITCH_MODEM_START` writer - need_des"]
40pub type SLEEP_SWITCH_MODEM_START_W<'a, REG> = crate::BitWriter<'a, REG>;
41#[doc = "Field `MODEM_SWITCH_SLEEP_START` reader - need_des"]
42pub type MODEM_SWITCH_SLEEP_START_R = crate::BitReader;
43#[doc = "Field `MODEM_SWITCH_SLEEP_START` writer - need_des"]
44pub type MODEM_SWITCH_SLEEP_START_W<'a, REG> = crate::BitWriter<'a, REG>;
45#[doc = "Field `ACTIVE_SWITCH_SLEEP_START` reader - need_des"]
46pub type ACTIVE_SWITCH_SLEEP_START_R = crate::BitReader;
47#[doc = "Field `ACTIVE_SWITCH_SLEEP_START` writer - need_des"]
48pub type ACTIVE_SWITCH_SLEEP_START_W<'a, REG> = crate::BitWriter<'a, REG>;
49#[doc = "Field `HP_SW_TRIGGER` reader - need_des"]
50pub type HP_SW_TRIGGER_R = crate::BitReader;
51#[doc = "Field `HP_SW_TRIGGER` writer - need_des"]
52pub type HP_SW_TRIGGER_W<'a, REG> = crate::BitWriter<'a, REG>;
53impl R {
54 #[doc = "Bit 20 - need_des"]
55 #[inline(always)]
56 pub fn lp_cpu_wakeup(&self) -> LP_CPU_WAKEUP_R {
57 LP_CPU_WAKEUP_R::new(((self.bits >> 20) & 1) != 0)
58 }
59 #[doc = "Bit 21 - need_des"]
60 #[inline(always)]
61 pub fn modem_switch_active_end(&self) -> MODEM_SWITCH_ACTIVE_END_R {
62 MODEM_SWITCH_ACTIVE_END_R::new(((self.bits >> 21) & 1) != 0)
63 }
64 #[doc = "Bit 22 - need_des"]
65 #[inline(always)]
66 pub fn sleep_switch_active_end(&self) -> SLEEP_SWITCH_ACTIVE_END_R {
67 SLEEP_SWITCH_ACTIVE_END_R::new(((self.bits >> 22) & 1) != 0)
68 }
69 #[doc = "Bit 23 - need_des"]
70 #[inline(always)]
71 pub fn sleep_switch_modem_end(&self) -> SLEEP_SWITCH_MODEM_END_R {
72 SLEEP_SWITCH_MODEM_END_R::new(((self.bits >> 23) & 1) != 0)
73 }
74 #[doc = "Bit 24 - need_des"]
75 #[inline(always)]
76 pub fn modem_switch_sleep_end(&self) -> MODEM_SWITCH_SLEEP_END_R {
77 MODEM_SWITCH_SLEEP_END_R::new(((self.bits >> 24) & 1) != 0)
78 }
79 #[doc = "Bit 25 - need_des"]
80 #[inline(always)]
81 pub fn active_switch_sleep_end(&self) -> ACTIVE_SWITCH_SLEEP_END_R {
82 ACTIVE_SWITCH_SLEEP_END_R::new(((self.bits >> 25) & 1) != 0)
83 }
84 #[doc = "Bit 26 - need_des"]
85 #[inline(always)]
86 pub fn modem_switch_active_start(&self) -> MODEM_SWITCH_ACTIVE_START_R {
87 MODEM_SWITCH_ACTIVE_START_R::new(((self.bits >> 26) & 1) != 0)
88 }
89 #[doc = "Bit 27 - need_des"]
90 #[inline(always)]
91 pub fn sleep_switch_active_start(&self) -> SLEEP_SWITCH_ACTIVE_START_R {
92 SLEEP_SWITCH_ACTIVE_START_R::new(((self.bits >> 27) & 1) != 0)
93 }
94 #[doc = "Bit 28 - need_des"]
95 #[inline(always)]
96 pub fn sleep_switch_modem_start(&self) -> SLEEP_SWITCH_MODEM_START_R {
97 SLEEP_SWITCH_MODEM_START_R::new(((self.bits >> 28) & 1) != 0)
98 }
99 #[doc = "Bit 29 - need_des"]
100 #[inline(always)]
101 pub fn modem_switch_sleep_start(&self) -> MODEM_SWITCH_SLEEP_START_R {
102 MODEM_SWITCH_SLEEP_START_R::new(((self.bits >> 29) & 1) != 0)
103 }
104 #[doc = "Bit 30 - need_des"]
105 #[inline(always)]
106 pub fn active_switch_sleep_start(&self) -> ACTIVE_SWITCH_SLEEP_START_R {
107 ACTIVE_SWITCH_SLEEP_START_R::new(((self.bits >> 30) & 1) != 0)
108 }
109 #[doc = "Bit 31 - need_des"]
110 #[inline(always)]
111 pub fn hp_sw_trigger(&self) -> HP_SW_TRIGGER_R {
112 HP_SW_TRIGGER_R::new(((self.bits >> 31) & 1) != 0)
113 }
114}
115#[cfg(feature = "impl-register-debug")]
116impl core::fmt::Debug for R {
117 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
118 f.debug_struct("LP_INT_RAW")
119 .field("lp_cpu_wakeup", &self.lp_cpu_wakeup())
120 .field("modem_switch_active_end", &self.modem_switch_active_end())
121 .field("sleep_switch_active_end", &self.sleep_switch_active_end())
122 .field("sleep_switch_modem_end", &self.sleep_switch_modem_end())
123 .field("modem_switch_sleep_end", &self.modem_switch_sleep_end())
124 .field("active_switch_sleep_end", &self.active_switch_sleep_end())
125 .field(
126 "modem_switch_active_start",
127 &self.modem_switch_active_start(),
128 )
129 .field(
130 "sleep_switch_active_start",
131 &self.sleep_switch_active_start(),
132 )
133 .field("sleep_switch_modem_start", &self.sleep_switch_modem_start())
134 .field("modem_switch_sleep_start", &self.modem_switch_sleep_start())
135 .field(
136 "active_switch_sleep_start",
137 &self.active_switch_sleep_start(),
138 )
139 .field("hp_sw_trigger", &self.hp_sw_trigger())
140 .finish()
141 }
142}
143impl W {
144 #[doc = "Bit 20 - need_des"]
145 #[inline(always)]
146 pub fn lp_cpu_wakeup(&mut self) -> LP_CPU_WAKEUP_W<LP_INT_RAW_SPEC> {
147 LP_CPU_WAKEUP_W::new(self, 20)
148 }
149 #[doc = "Bit 21 - need_des"]
150 #[inline(always)]
151 pub fn modem_switch_active_end(&mut self) -> MODEM_SWITCH_ACTIVE_END_W<LP_INT_RAW_SPEC> {
152 MODEM_SWITCH_ACTIVE_END_W::new(self, 21)
153 }
154 #[doc = "Bit 22 - need_des"]
155 #[inline(always)]
156 pub fn sleep_switch_active_end(&mut self) -> SLEEP_SWITCH_ACTIVE_END_W<LP_INT_RAW_SPEC> {
157 SLEEP_SWITCH_ACTIVE_END_W::new(self, 22)
158 }
159 #[doc = "Bit 23 - need_des"]
160 #[inline(always)]
161 pub fn sleep_switch_modem_end(&mut self) -> SLEEP_SWITCH_MODEM_END_W<LP_INT_RAW_SPEC> {
162 SLEEP_SWITCH_MODEM_END_W::new(self, 23)
163 }
164 #[doc = "Bit 24 - need_des"]
165 #[inline(always)]
166 pub fn modem_switch_sleep_end(&mut self) -> MODEM_SWITCH_SLEEP_END_W<LP_INT_RAW_SPEC> {
167 MODEM_SWITCH_SLEEP_END_W::new(self, 24)
168 }
169 #[doc = "Bit 25 - need_des"]
170 #[inline(always)]
171 pub fn active_switch_sleep_end(&mut self) -> ACTIVE_SWITCH_SLEEP_END_W<LP_INT_RAW_SPEC> {
172 ACTIVE_SWITCH_SLEEP_END_W::new(self, 25)
173 }
174 #[doc = "Bit 26 - need_des"]
175 #[inline(always)]
176 pub fn modem_switch_active_start(&mut self) -> MODEM_SWITCH_ACTIVE_START_W<LP_INT_RAW_SPEC> {
177 MODEM_SWITCH_ACTIVE_START_W::new(self, 26)
178 }
179 #[doc = "Bit 27 - need_des"]
180 #[inline(always)]
181 pub fn sleep_switch_active_start(&mut self) -> SLEEP_SWITCH_ACTIVE_START_W<LP_INT_RAW_SPEC> {
182 SLEEP_SWITCH_ACTIVE_START_W::new(self, 27)
183 }
184 #[doc = "Bit 28 - need_des"]
185 #[inline(always)]
186 pub fn sleep_switch_modem_start(&mut self) -> SLEEP_SWITCH_MODEM_START_W<LP_INT_RAW_SPEC> {
187 SLEEP_SWITCH_MODEM_START_W::new(self, 28)
188 }
189 #[doc = "Bit 29 - need_des"]
190 #[inline(always)]
191 pub fn modem_switch_sleep_start(&mut self) -> MODEM_SWITCH_SLEEP_START_W<LP_INT_RAW_SPEC> {
192 MODEM_SWITCH_SLEEP_START_W::new(self, 29)
193 }
194 #[doc = "Bit 30 - need_des"]
195 #[inline(always)]
196 pub fn active_switch_sleep_start(&mut self) -> ACTIVE_SWITCH_SLEEP_START_W<LP_INT_RAW_SPEC> {
197 ACTIVE_SWITCH_SLEEP_START_W::new(self, 30)
198 }
199 #[doc = "Bit 31 - need_des"]
200 #[inline(always)]
201 pub fn hp_sw_trigger(&mut self) -> HP_SW_TRIGGER_W<LP_INT_RAW_SPEC> {
202 HP_SW_TRIGGER_W::new(self, 31)
203 }
204}
205#[doc = "need_des\n\nYou can [`read`](crate::Reg::read) this register and get [`lp_int_raw::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`lp_int_raw::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
206pub struct LP_INT_RAW_SPEC;
207impl crate::RegisterSpec for LP_INT_RAW_SPEC {
208 type Ux = u32;
209}
210#[doc = "`read()` method returns [`lp_int_raw::R`](R) reader structure"]
211impl crate::Readable for LP_INT_RAW_SPEC {}
212#[doc = "`write(|w| ..)` method takes [`lp_int_raw::W`](W) writer structure"]
213impl crate::Writable for LP_INT_RAW_SPEC {
214 type Safety = crate::Unsafe;
215 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
216 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
217}
218#[doc = "`reset()` method sets LP_INT_RAW to value 0"]
219impl crate::Resettable for LP_INT_RAW_SPEC {
220 const RESET_VALUE: u32 = 0;
221}