esp32p4/lp_sys/
lp_rst_ctrl.rs1#[doc = "Register `LP_RST_CTRL` reader"]
2pub type R = crate::R<LP_RST_CTRL_SPEC>;
3#[doc = "Register `LP_RST_CTRL` writer"]
4pub type W = crate::W<LP_RST_CTRL_SPEC>;
5#[doc = "Field `ANA_RST_BYPASS` reader - analog source reset bypass : wdt,brown out,super wdt,glitch"]
6pub type ANA_RST_BYPASS_R = crate::BitReader;
7#[doc = "Field `ANA_RST_BYPASS` writer - analog source reset bypass : wdt,brown out,super wdt,glitch"]
8pub type ANA_RST_BYPASS_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `SYS_RST_BYPASS` reader - system source reset bypass : software reset,hp wdt,lp wdt,efuse"]
10pub type SYS_RST_BYPASS_R = crate::BitReader;
11#[doc = "Field `SYS_RST_BYPASS` writer - system source reset bypass : software reset,hp wdt,lp wdt,efuse"]
12pub type SYS_RST_BYPASS_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `EFUSE_FORCE_NORST` reader - efuse force no reset control"]
14pub type EFUSE_FORCE_NORST_R = crate::BitReader;
15#[doc = "Field `EFUSE_FORCE_NORST` writer - efuse force no reset control"]
16pub type EFUSE_FORCE_NORST_W<'a, REG> = crate::BitWriter<'a, REG>;
17impl R {
18 #[doc = "Bit 0 - analog source reset bypass : wdt,brown out,super wdt,glitch"]
19 #[inline(always)]
20 pub fn ana_rst_bypass(&self) -> ANA_RST_BYPASS_R {
21 ANA_RST_BYPASS_R::new((self.bits & 1) != 0)
22 }
23 #[doc = "Bit 1 - system source reset bypass : software reset,hp wdt,lp wdt,efuse"]
24 #[inline(always)]
25 pub fn sys_rst_bypass(&self) -> SYS_RST_BYPASS_R {
26 SYS_RST_BYPASS_R::new(((self.bits >> 1) & 1) != 0)
27 }
28 #[doc = "Bit 2 - efuse force no reset control"]
29 #[inline(always)]
30 pub fn efuse_force_norst(&self) -> EFUSE_FORCE_NORST_R {
31 EFUSE_FORCE_NORST_R::new(((self.bits >> 2) & 1) != 0)
32 }
33}
34#[cfg(feature = "impl-register-debug")]
35impl core::fmt::Debug for R {
36 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
37 f.debug_struct("LP_RST_CTRL")
38 .field(
39 "ana_rst_bypass",
40 &format_args!("{}", self.ana_rst_bypass().bit()),
41 )
42 .field(
43 "sys_rst_bypass",
44 &format_args!("{}", self.sys_rst_bypass().bit()),
45 )
46 .field(
47 "efuse_force_norst",
48 &format_args!("{}", self.efuse_force_norst().bit()),
49 )
50 .finish()
51 }
52}
53#[cfg(feature = "impl-register-debug")]
54impl core::fmt::Debug for crate::generic::Reg<LP_RST_CTRL_SPEC> {
55 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
56 core::fmt::Debug::fmt(&self.read(), f)
57 }
58}
59impl W {
60 #[doc = "Bit 0 - analog source reset bypass : wdt,brown out,super wdt,glitch"]
61 #[inline(always)]
62 #[must_use]
63 pub fn ana_rst_bypass(&mut self) -> ANA_RST_BYPASS_W<LP_RST_CTRL_SPEC> {
64 ANA_RST_BYPASS_W::new(self, 0)
65 }
66 #[doc = "Bit 1 - system source reset bypass : software reset,hp wdt,lp wdt,efuse"]
67 #[inline(always)]
68 #[must_use]
69 pub fn sys_rst_bypass(&mut self) -> SYS_RST_BYPASS_W<LP_RST_CTRL_SPEC> {
70 SYS_RST_BYPASS_W::new(self, 1)
71 }
72 #[doc = "Bit 2 - efuse force no reset control"]
73 #[inline(always)]
74 #[must_use]
75 pub fn efuse_force_norst(&mut self) -> EFUSE_FORCE_NORST_W<LP_RST_CTRL_SPEC> {
76 EFUSE_FORCE_NORST_W::new(self, 2)
77 }
78}
79#[doc = "need_des\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`lp_rst_ctrl::R`](R). You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`lp_rst_ctrl::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
80pub struct LP_RST_CTRL_SPEC;
81impl crate::RegisterSpec for LP_RST_CTRL_SPEC {
82 type Ux = u32;
83}
84#[doc = "`read()` method returns [`lp_rst_ctrl::R`](R) reader structure"]
85impl crate::Readable for LP_RST_CTRL_SPEC {}
86#[doc = "`write(|w| ..)` method takes [`lp_rst_ctrl::W`](W) writer structure"]
87impl crate::Writable for LP_RST_CTRL_SPEC {
88 type Safety = crate::Unsafe;
89 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
90 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
91}
92#[doc = "`reset()` method sets LP_RST_CTRL to value 0x03"]
93impl crate::Resettable for LP_RST_CTRL_SPEC {
94 const RESET_VALUE: u32 = 0x03;
95}