esp32p4/pvt/
value_update.rs

1#[doc = "Register `VALUE_UPDATE` reader"]
2pub type R = crate::R<VALUE_UPDATE_SPEC>;
3#[doc = "Register `VALUE_UPDATE` writer"]
4pub type W = crate::W<VALUE_UPDATE_SPEC>;
5#[doc = "Field `VALUE_UPDATE` writer - needs field desc"]
6pub type VALUE_UPDATE_W<'a, REG> = crate::BitWriter<'a, REG>;
7#[doc = "Field `BYPASS` reader - needs field desc"]
8pub type BYPASS_R = crate::BitReader;
9#[doc = "Field `BYPASS` writer - needs field desc"]
10pub type BYPASS_W<'a, REG> = crate::BitWriter<'a, REG>;
11impl R {
12    #[doc = "Bit 1 - needs field desc"]
13    #[inline(always)]
14    pub fn bypass(&self) -> BYPASS_R {
15        BYPASS_R::new(((self.bits >> 1) & 1) != 0)
16    }
17}
18#[cfg(feature = "impl-register-debug")]
19impl core::fmt::Debug for R {
20    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
21        f.debug_struct("VALUE_UPDATE")
22            .field("bypass", &format_args!("{}", self.bypass().bit()))
23            .finish()
24    }
25}
26#[cfg(feature = "impl-register-debug")]
27impl core::fmt::Debug for crate::generic::Reg<VALUE_UPDATE_SPEC> {
28    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
29        core::fmt::Debug::fmt(&self.read(), f)
30    }
31}
32impl W {
33    #[doc = "Bit 0 - needs field desc"]
34    #[inline(always)]
35    #[must_use]
36    pub fn value_update(&mut self) -> VALUE_UPDATE_W<VALUE_UPDATE_SPEC> {
37        VALUE_UPDATE_W::new(self, 0)
38    }
39    #[doc = "Bit 1 - needs field desc"]
40    #[inline(always)]
41    #[must_use]
42    pub fn bypass(&mut self) -> BYPASS_W<VALUE_UPDATE_SPEC> {
43        BYPASS_W::new(self, 1)
44    }
45}
46#[doc = "needs field desc\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`value_update::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 [`value_update::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
47pub struct VALUE_UPDATE_SPEC;
48impl crate::RegisterSpec for VALUE_UPDATE_SPEC {
49    type Ux = u32;
50}
51#[doc = "`read()` method returns [`value_update::R`](R) reader structure"]
52impl crate::Readable for VALUE_UPDATE_SPEC {}
53#[doc = "`write(|w| ..)` method takes [`value_update::W`](W) writer structure"]
54impl crate::Writable for VALUE_UPDATE_SPEC {
55    type Safety = crate::Unsafe;
56    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
57    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
58}
59#[doc = "`reset()` method sets VALUE_UPDATE to value 0"]
60impl crate::Resettable for VALUE_UPDATE_SPEC {
61    const RESET_VALUE: u32 = 0;
62}