esp32c6_lp/lp_peri/
bus_timeout.rs1#[doc = "Register `BUS_TIMEOUT` reader"]
2pub type R = crate::R<BUS_TIMEOUT_SPEC>;
3#[doc = "Register `BUS_TIMEOUT` writer"]
4pub type W = crate::W<BUS_TIMEOUT_SPEC>;
5#[doc = "Field `LP_PERI_TIMEOUT_THRES` reader - need_des"]
6pub type LP_PERI_TIMEOUT_THRES_R = crate::FieldReader<u16>;
7#[doc = "Field `LP_PERI_TIMEOUT_THRES` writer - need_des"]
8pub type LP_PERI_TIMEOUT_THRES_W<'a, REG> = crate::FieldWriter<'a, REG, 16, u16>;
9#[doc = "Field `LP_PERI_TIMEOUT_INT_CLEAR` writer - need_des"]
10pub type LP_PERI_TIMEOUT_INT_CLEAR_W<'a, REG> = crate::BitWriter<'a, REG>;
11#[doc = "Field `LP_PERI_TIMEOUT_PROTECT_EN` reader - need_des"]
12pub type LP_PERI_TIMEOUT_PROTECT_EN_R = crate::BitReader;
13#[doc = "Field `LP_PERI_TIMEOUT_PROTECT_EN` writer - need_des"]
14pub type LP_PERI_TIMEOUT_PROTECT_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
15impl R {
16 #[doc = "Bits 14:29 - need_des"]
17 #[inline(always)]
18 pub fn lp_peri_timeout_thres(&self) -> LP_PERI_TIMEOUT_THRES_R {
19 LP_PERI_TIMEOUT_THRES_R::new(((self.bits >> 14) & 0xffff) as u16)
20 }
21 #[doc = "Bit 31 - need_des"]
22 #[inline(always)]
23 pub fn lp_peri_timeout_protect_en(&self) -> LP_PERI_TIMEOUT_PROTECT_EN_R {
24 LP_PERI_TIMEOUT_PROTECT_EN_R::new(((self.bits >> 31) & 1) != 0)
25 }
26}
27#[cfg(feature = "impl-register-debug")]
28impl core::fmt::Debug for R {
29 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
30 f.debug_struct("BUS_TIMEOUT")
31 .field("lp_peri_timeout_thres", &self.lp_peri_timeout_thres())
32 .field(
33 "lp_peri_timeout_protect_en",
34 &self.lp_peri_timeout_protect_en(),
35 )
36 .finish()
37 }
38}
39impl W {
40 #[doc = "Bits 14:29 - need_des"]
41 #[inline(always)]
42 #[must_use]
43 pub fn lp_peri_timeout_thres(&mut self) -> LP_PERI_TIMEOUT_THRES_W<BUS_TIMEOUT_SPEC> {
44 LP_PERI_TIMEOUT_THRES_W::new(self, 14)
45 }
46 #[doc = "Bit 30 - need_des"]
47 #[inline(always)]
48 #[must_use]
49 pub fn lp_peri_timeout_int_clear(&mut self) -> LP_PERI_TIMEOUT_INT_CLEAR_W<BUS_TIMEOUT_SPEC> {
50 LP_PERI_TIMEOUT_INT_CLEAR_W::new(self, 30)
51 }
52 #[doc = "Bit 31 - need_des"]
53 #[inline(always)]
54 #[must_use]
55 pub fn lp_peri_timeout_protect_en(&mut self) -> LP_PERI_TIMEOUT_PROTECT_EN_W<BUS_TIMEOUT_SPEC> {
56 LP_PERI_TIMEOUT_PROTECT_EN_W::new(self, 31)
57 }
58}
59#[doc = "need_des\n\nYou can [`read`](crate::Reg::read) this register and get [`bus_timeout::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`bus_timeout::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
60pub struct BUS_TIMEOUT_SPEC;
61impl crate::RegisterSpec for BUS_TIMEOUT_SPEC {
62 type Ux = u32;
63}
64#[doc = "`read()` method returns [`bus_timeout::R`](R) reader structure"]
65impl crate::Readable for BUS_TIMEOUT_SPEC {}
66#[doc = "`write(|w| ..)` method takes [`bus_timeout::W`](W) writer structure"]
67impl crate::Writable for BUS_TIMEOUT_SPEC {
68 type Safety = crate::Unsafe;
69 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
70 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
71}
72#[doc = "`reset()` method sets BUS_TIMEOUT to value 0xbfff_c000"]
73impl crate::Resettable for BUS_TIMEOUT_SPEC {
74 const RESET_VALUE: u32 = 0xbfff_c000;
75}