esp32c6_lp/lp_uart/
sleep_conf0.rs1#[doc = "Register `SLEEP_CONF0` reader"]
2pub type R = crate::R<SLEEP_CONF0_SPEC>;
3#[doc = "Register `SLEEP_CONF0` writer"]
4pub type W = crate::W<SLEEP_CONF0_SPEC>;
5#[doc = "Field `WK_CHAR1` reader - This register restores the specified wake up char1 to wake up"]
6pub type WK_CHAR1_R = crate::FieldReader;
7#[doc = "Field `WK_CHAR1` writer - This register restores the specified wake up char1 to wake up"]
8pub type WK_CHAR1_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
9#[doc = "Field `WK_CHAR2` reader - This register restores the specified wake up char2 to wake up"]
10pub type WK_CHAR2_R = crate::FieldReader;
11#[doc = "Field `WK_CHAR2` writer - This register restores the specified wake up char2 to wake up"]
12pub type WK_CHAR2_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
13#[doc = "Field `WK_CHAR3` reader - This register restores the specified wake up char3 to wake up"]
14pub type WK_CHAR3_R = crate::FieldReader;
15#[doc = "Field `WK_CHAR3` writer - This register restores the specified wake up char3 to wake up"]
16pub type WK_CHAR3_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
17#[doc = "Field `WK_CHAR4` reader - This register restores the specified wake up char4 to wake up"]
18pub type WK_CHAR4_R = crate::FieldReader;
19#[doc = "Field `WK_CHAR4` writer - This register restores the specified wake up char4 to wake up"]
20pub type WK_CHAR4_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
21impl R {
22 #[doc = "Bits 0:7 - This register restores the specified wake up char1 to wake up"]
23 #[inline(always)]
24 pub fn wk_char1(&self) -> WK_CHAR1_R {
25 WK_CHAR1_R::new((self.bits & 0xff) as u8)
26 }
27 #[doc = "Bits 8:15 - This register restores the specified wake up char2 to wake up"]
28 #[inline(always)]
29 pub fn wk_char2(&self) -> WK_CHAR2_R {
30 WK_CHAR2_R::new(((self.bits >> 8) & 0xff) as u8)
31 }
32 #[doc = "Bits 16:23 - This register restores the specified wake up char3 to wake up"]
33 #[inline(always)]
34 pub fn wk_char3(&self) -> WK_CHAR3_R {
35 WK_CHAR3_R::new(((self.bits >> 16) & 0xff) as u8)
36 }
37 #[doc = "Bits 24:31 - This register restores the specified wake up char4 to wake up"]
38 #[inline(always)]
39 pub fn wk_char4(&self) -> WK_CHAR4_R {
40 WK_CHAR4_R::new(((self.bits >> 24) & 0xff) as u8)
41 }
42}
43#[cfg(feature = "impl-register-debug")]
44impl core::fmt::Debug for R {
45 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
46 f.debug_struct("SLEEP_CONF0")
47 .field("wk_char1", &self.wk_char1())
48 .field("wk_char2", &self.wk_char2())
49 .field("wk_char3", &self.wk_char3())
50 .field("wk_char4", &self.wk_char4())
51 .finish()
52 }
53}
54impl W {
55 #[doc = "Bits 0:7 - This register restores the specified wake up char1 to wake up"]
56 #[inline(always)]
57 #[must_use]
58 pub fn wk_char1(&mut self) -> WK_CHAR1_W<SLEEP_CONF0_SPEC> {
59 WK_CHAR1_W::new(self, 0)
60 }
61 #[doc = "Bits 8:15 - This register restores the specified wake up char2 to wake up"]
62 #[inline(always)]
63 #[must_use]
64 pub fn wk_char2(&mut self) -> WK_CHAR2_W<SLEEP_CONF0_SPEC> {
65 WK_CHAR2_W::new(self, 8)
66 }
67 #[doc = "Bits 16:23 - This register restores the specified wake up char3 to wake up"]
68 #[inline(always)]
69 #[must_use]
70 pub fn wk_char3(&mut self) -> WK_CHAR3_W<SLEEP_CONF0_SPEC> {
71 WK_CHAR3_W::new(self, 16)
72 }
73 #[doc = "Bits 24:31 - This register restores the specified wake up char4 to wake up"]
74 #[inline(always)]
75 #[must_use]
76 pub fn wk_char4(&mut self) -> WK_CHAR4_W<SLEEP_CONF0_SPEC> {
77 WK_CHAR4_W::new(self, 24)
78 }
79}
80#[doc = "UART sleep configure register 0\n\nYou can [`read`](crate::Reg::read) this register and get [`sleep_conf0::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`sleep_conf0::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
81pub struct SLEEP_CONF0_SPEC;
82impl crate::RegisterSpec for SLEEP_CONF0_SPEC {
83 type Ux = u32;
84}
85#[doc = "`read()` method returns [`sleep_conf0::R`](R) reader structure"]
86impl crate::Readable for SLEEP_CONF0_SPEC {}
87#[doc = "`write(|w| ..)` method takes [`sleep_conf0::W`](W) writer structure"]
88impl crate::Writable for SLEEP_CONF0_SPEC {
89 type Safety = crate::Unsafe;
90 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
91 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
92}
93#[doc = "`reset()` method sets SLEEP_CONF0 to value 0"]
94impl crate::Resettable for SLEEP_CONF0_SPEC {
95 const RESET_VALUE: u32 = 0;
96}