esp32p4/pvt/
comb_pd_site2_unit2_vt1_conf2.rs

1#[doc = "Register `COMB_PD_SITE2_UNIT2_VT1_CONF2` reader"]
2pub type R = crate::R<COMB_PD_SITE2_UNIT2_VT1_CONF2_SPEC>;
3#[doc = "Register `COMB_PD_SITE2_UNIT2_VT1_CONF2` writer"]
4pub type W = crate::W<COMB_PD_SITE2_UNIT2_VT1_CONF2_SPEC>;
5#[doc = "Field `MONITOR_EDG_MOD_VT1_PD_SITE2_UNIT2` reader - needs field desc"]
6pub type MONITOR_EDG_MOD_VT1_PD_SITE2_UNIT2_R = crate::FieldReader;
7#[doc = "Field `MONITOR_EDG_MOD_VT1_PD_SITE2_UNIT2` writer - needs field desc"]
8pub type MONITOR_EDG_MOD_VT1_PD_SITE2_UNIT2_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
9#[doc = "Field `DELAY_OVF_VT1_PD_SITE2_UNIT2` reader - needs field desc"]
10pub type DELAY_OVF_VT1_PD_SITE2_UNIT2_R = crate::BitReader;
11#[doc = "Field `TIMING_ERR_CNT_O_VT1_PD_SITE2_UNIT2` reader - needs field desc"]
12pub type TIMING_ERR_CNT_O_VT1_PD_SITE2_UNIT2_R = crate::FieldReader<u16>;
13impl R {
14    #[doc = "Bits 0:1 - needs field desc"]
15    #[inline(always)]
16    pub fn monitor_edg_mod_vt1_pd_site2_unit2(&self) -> MONITOR_EDG_MOD_VT1_PD_SITE2_UNIT2_R {
17        MONITOR_EDG_MOD_VT1_PD_SITE2_UNIT2_R::new((self.bits & 3) as u8)
18    }
19    #[doc = "Bit 15 - needs field desc"]
20    #[inline(always)]
21    pub fn delay_ovf_vt1_pd_site2_unit2(&self) -> DELAY_OVF_VT1_PD_SITE2_UNIT2_R {
22        DELAY_OVF_VT1_PD_SITE2_UNIT2_R::new(((self.bits >> 15) & 1) != 0)
23    }
24    #[doc = "Bits 16:31 - needs field desc"]
25    #[inline(always)]
26    pub fn timing_err_cnt_o_vt1_pd_site2_unit2(&self) -> TIMING_ERR_CNT_O_VT1_PD_SITE2_UNIT2_R {
27        TIMING_ERR_CNT_O_VT1_PD_SITE2_UNIT2_R::new(((self.bits >> 16) & 0xffff) as u16)
28    }
29}
30#[cfg(feature = "impl-register-debug")]
31impl core::fmt::Debug for R {
32    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
33        f.debug_struct("COMB_PD_SITE2_UNIT2_VT1_CONF2")
34            .field(
35                "monitor_edg_mod_vt1_pd_site2_unit2",
36                &format_args!("{}", self.monitor_edg_mod_vt1_pd_site2_unit2().bits()),
37            )
38            .field(
39                "delay_ovf_vt1_pd_site2_unit2",
40                &format_args!("{}", self.delay_ovf_vt1_pd_site2_unit2().bit()),
41            )
42            .field(
43                "timing_err_cnt_o_vt1_pd_site2_unit2",
44                &format_args!("{}", self.timing_err_cnt_o_vt1_pd_site2_unit2().bits()),
45            )
46            .finish()
47    }
48}
49#[cfg(feature = "impl-register-debug")]
50impl core::fmt::Debug for crate::generic::Reg<COMB_PD_SITE2_UNIT2_VT1_CONF2_SPEC> {
51    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
52        core::fmt::Debug::fmt(&self.read(), f)
53    }
54}
55impl W {
56    #[doc = "Bits 0:1 - needs field desc"]
57    #[inline(always)]
58    #[must_use]
59    pub fn monitor_edg_mod_vt1_pd_site2_unit2(
60        &mut self,
61    ) -> MONITOR_EDG_MOD_VT1_PD_SITE2_UNIT2_W<COMB_PD_SITE2_UNIT2_VT1_CONF2_SPEC> {
62        MONITOR_EDG_MOD_VT1_PD_SITE2_UNIT2_W::new(self, 0)
63    }
64}
65#[doc = "needs desc\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`comb_pd_site2_unit2_vt1_conf2::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 [`comb_pd_site2_unit2_vt1_conf2::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
66pub struct COMB_PD_SITE2_UNIT2_VT1_CONF2_SPEC;
67impl crate::RegisterSpec for COMB_PD_SITE2_UNIT2_VT1_CONF2_SPEC {
68    type Ux = u32;
69}
70#[doc = "`read()` method returns [`comb_pd_site2_unit2_vt1_conf2::R`](R) reader structure"]
71impl crate::Readable for COMB_PD_SITE2_UNIT2_VT1_CONF2_SPEC {}
72#[doc = "`write(|w| ..)` method takes [`comb_pd_site2_unit2_vt1_conf2::W`](W) writer structure"]
73impl crate::Writable for COMB_PD_SITE2_UNIT2_VT1_CONF2_SPEC {
74    type Safety = crate::Unsafe;
75    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
76    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
77}
78#[doc = "`reset()` method sets COMB_PD_SITE2_UNIT2_VT1_CONF2 to value 0"]
79impl crate::Resettable for COMB_PD_SITE2_UNIT2_VT1_CONF2_SPEC {
80    const RESET_VALUE: u32 = 0;
81}