esp32c6_lp/pmu/
lp_int_raw.rs

1#[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    #[must_use]
147    pub fn lp_cpu_wakeup(&mut self) -> LP_CPU_WAKEUP_W<LP_INT_RAW_SPEC> {
148        LP_CPU_WAKEUP_W::new(self, 20)
149    }
150    #[doc = "Bit 21 - need_des"]
151    #[inline(always)]
152    #[must_use]
153    pub fn modem_switch_active_end(&mut self) -> MODEM_SWITCH_ACTIVE_END_W<LP_INT_RAW_SPEC> {
154        MODEM_SWITCH_ACTIVE_END_W::new(self, 21)
155    }
156    #[doc = "Bit 22 - need_des"]
157    #[inline(always)]
158    #[must_use]
159    pub fn sleep_switch_active_end(&mut self) -> SLEEP_SWITCH_ACTIVE_END_W<LP_INT_RAW_SPEC> {
160        SLEEP_SWITCH_ACTIVE_END_W::new(self, 22)
161    }
162    #[doc = "Bit 23 - need_des"]
163    #[inline(always)]
164    #[must_use]
165    pub fn sleep_switch_modem_end(&mut self) -> SLEEP_SWITCH_MODEM_END_W<LP_INT_RAW_SPEC> {
166        SLEEP_SWITCH_MODEM_END_W::new(self, 23)
167    }
168    #[doc = "Bit 24 - need_des"]
169    #[inline(always)]
170    #[must_use]
171    pub fn modem_switch_sleep_end(&mut self) -> MODEM_SWITCH_SLEEP_END_W<LP_INT_RAW_SPEC> {
172        MODEM_SWITCH_SLEEP_END_W::new(self, 24)
173    }
174    #[doc = "Bit 25 - need_des"]
175    #[inline(always)]
176    #[must_use]
177    pub fn active_switch_sleep_end(&mut self) -> ACTIVE_SWITCH_SLEEP_END_W<LP_INT_RAW_SPEC> {
178        ACTIVE_SWITCH_SLEEP_END_W::new(self, 25)
179    }
180    #[doc = "Bit 26 - need_des"]
181    #[inline(always)]
182    #[must_use]
183    pub fn modem_switch_active_start(&mut self) -> MODEM_SWITCH_ACTIVE_START_W<LP_INT_RAW_SPEC> {
184        MODEM_SWITCH_ACTIVE_START_W::new(self, 26)
185    }
186    #[doc = "Bit 27 - need_des"]
187    #[inline(always)]
188    #[must_use]
189    pub fn sleep_switch_active_start(&mut self) -> SLEEP_SWITCH_ACTIVE_START_W<LP_INT_RAW_SPEC> {
190        SLEEP_SWITCH_ACTIVE_START_W::new(self, 27)
191    }
192    #[doc = "Bit 28 - need_des"]
193    #[inline(always)]
194    #[must_use]
195    pub fn sleep_switch_modem_start(&mut self) -> SLEEP_SWITCH_MODEM_START_W<LP_INT_RAW_SPEC> {
196        SLEEP_SWITCH_MODEM_START_W::new(self, 28)
197    }
198    #[doc = "Bit 29 - need_des"]
199    #[inline(always)]
200    #[must_use]
201    pub fn modem_switch_sleep_start(&mut self) -> MODEM_SWITCH_SLEEP_START_W<LP_INT_RAW_SPEC> {
202        MODEM_SWITCH_SLEEP_START_W::new(self, 29)
203    }
204    #[doc = "Bit 30 - need_des"]
205    #[inline(always)]
206    #[must_use]
207    pub fn active_switch_sleep_start(&mut self) -> ACTIVE_SWITCH_SLEEP_START_W<LP_INT_RAW_SPEC> {
208        ACTIVE_SWITCH_SLEEP_START_W::new(self, 30)
209    }
210    #[doc = "Bit 31 - need_des"]
211    #[inline(always)]
212    #[must_use]
213    pub fn hp_sw_trigger(&mut self) -> HP_SW_TRIGGER_W<LP_INT_RAW_SPEC> {
214        HP_SW_TRIGGER_W::new(self, 31)
215    }
216}
217#[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)."]
218pub struct LP_INT_RAW_SPEC;
219impl crate::RegisterSpec for LP_INT_RAW_SPEC {
220    type Ux = u32;
221}
222#[doc = "`read()` method returns [`lp_int_raw::R`](R) reader structure"]
223impl crate::Readable for LP_INT_RAW_SPEC {}
224#[doc = "`write(|w| ..)` method takes [`lp_int_raw::W`](W) writer structure"]
225impl crate::Writable for LP_INT_RAW_SPEC {
226    type Safety = crate::Unsafe;
227    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
228    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
229}
230#[doc = "`reset()` method sets LP_INT_RAW to value 0"]
231impl crate::Resettable for LP_INT_RAW_SPEC {
232    const RESET_VALUE: u32 = 0;
233}