esp32p4/i3c_mst/
scl_ext_low_time.rs

1#[doc = "Register `SCL_EXT_LOW_TIME` reader"]
2pub type R = crate::R<SCL_EXT_LOW_TIME_SPEC>;
3#[doc = "Register `SCL_EXT_LOW_TIME` writer"]
4pub type W = crate::W<SCL_EXT_LOW_TIME_SPEC>;
5#[doc = "Field `REG_I3C_MST_EXT_LOW_PERIOD1` reader - NA"]
6pub type REG_I3C_MST_EXT_LOW_PERIOD1_R = crate::FieldReader;
7#[doc = "Field `REG_I3C_MST_EXT_LOW_PERIOD1` writer - NA"]
8pub type REG_I3C_MST_EXT_LOW_PERIOD1_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
9#[doc = "Field `REG_I3C_MST_EXT_LOW_PERIOD2` reader - NA"]
10pub type REG_I3C_MST_EXT_LOW_PERIOD2_R = crate::FieldReader;
11#[doc = "Field `REG_I3C_MST_EXT_LOW_PERIOD2` writer - NA"]
12pub type REG_I3C_MST_EXT_LOW_PERIOD2_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
13#[doc = "Field `REG_I3C_MST_EXT_LOW_PERIOD3` reader - NA"]
14pub type REG_I3C_MST_EXT_LOW_PERIOD3_R = crate::FieldReader;
15#[doc = "Field `REG_I3C_MST_EXT_LOW_PERIOD3` writer - NA"]
16pub type REG_I3C_MST_EXT_LOW_PERIOD3_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
17#[doc = "Field `REG_I3C_MST_EXT_LOW_PERIOD4` reader - NA"]
18pub type REG_I3C_MST_EXT_LOW_PERIOD4_R = crate::FieldReader;
19#[doc = "Field `REG_I3C_MST_EXT_LOW_PERIOD4` writer - NA"]
20pub type REG_I3C_MST_EXT_LOW_PERIOD4_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
21impl R {
22    #[doc = "Bits 0:7 - NA"]
23    #[inline(always)]
24    pub fn reg_i3c_mst_ext_low_period1(&self) -> REG_I3C_MST_EXT_LOW_PERIOD1_R {
25        REG_I3C_MST_EXT_LOW_PERIOD1_R::new((self.bits & 0xff) as u8)
26    }
27    #[doc = "Bits 8:15 - NA"]
28    #[inline(always)]
29    pub fn reg_i3c_mst_ext_low_period2(&self) -> REG_I3C_MST_EXT_LOW_PERIOD2_R {
30        REG_I3C_MST_EXT_LOW_PERIOD2_R::new(((self.bits >> 8) & 0xff) as u8)
31    }
32    #[doc = "Bits 16:23 - NA"]
33    #[inline(always)]
34    pub fn reg_i3c_mst_ext_low_period3(&self) -> REG_I3C_MST_EXT_LOW_PERIOD3_R {
35        REG_I3C_MST_EXT_LOW_PERIOD3_R::new(((self.bits >> 16) & 0xff) as u8)
36    }
37    #[doc = "Bits 24:31 - NA"]
38    #[inline(always)]
39    pub fn reg_i3c_mst_ext_low_period4(&self) -> REG_I3C_MST_EXT_LOW_PERIOD4_R {
40        REG_I3C_MST_EXT_LOW_PERIOD4_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("SCL_EXT_LOW_TIME")
47            .field(
48                "reg_i3c_mst_ext_low_period1",
49                &format_args!("{}", self.reg_i3c_mst_ext_low_period1().bits()),
50            )
51            .field(
52                "reg_i3c_mst_ext_low_period2",
53                &format_args!("{}", self.reg_i3c_mst_ext_low_period2().bits()),
54            )
55            .field(
56                "reg_i3c_mst_ext_low_period3",
57                &format_args!("{}", self.reg_i3c_mst_ext_low_period3().bits()),
58            )
59            .field(
60                "reg_i3c_mst_ext_low_period4",
61                &format_args!("{}", self.reg_i3c_mst_ext_low_period4().bits()),
62            )
63            .finish()
64    }
65}
66#[cfg(feature = "impl-register-debug")]
67impl core::fmt::Debug for crate::generic::Reg<SCL_EXT_LOW_TIME_SPEC> {
68    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
69        core::fmt::Debug::fmt(&self.read(), f)
70    }
71}
72impl W {
73    #[doc = "Bits 0:7 - NA"]
74    #[inline(always)]
75    #[must_use]
76    pub fn reg_i3c_mst_ext_low_period1(
77        &mut self,
78    ) -> REG_I3C_MST_EXT_LOW_PERIOD1_W<SCL_EXT_LOW_TIME_SPEC> {
79        REG_I3C_MST_EXT_LOW_PERIOD1_W::new(self, 0)
80    }
81    #[doc = "Bits 8:15 - NA"]
82    #[inline(always)]
83    #[must_use]
84    pub fn reg_i3c_mst_ext_low_period2(
85        &mut self,
86    ) -> REG_I3C_MST_EXT_LOW_PERIOD2_W<SCL_EXT_LOW_TIME_SPEC> {
87        REG_I3C_MST_EXT_LOW_PERIOD2_W::new(self, 8)
88    }
89    #[doc = "Bits 16:23 - NA"]
90    #[inline(always)]
91    #[must_use]
92    pub fn reg_i3c_mst_ext_low_period3(
93        &mut self,
94    ) -> REG_I3C_MST_EXT_LOW_PERIOD3_W<SCL_EXT_LOW_TIME_SPEC> {
95        REG_I3C_MST_EXT_LOW_PERIOD3_W::new(self, 16)
96    }
97    #[doc = "Bits 24:31 - NA"]
98    #[inline(always)]
99    #[must_use]
100    pub fn reg_i3c_mst_ext_low_period4(
101        &mut self,
102    ) -> REG_I3C_MST_EXT_LOW_PERIOD4_W<SCL_EXT_LOW_TIME_SPEC> {
103        REG_I3C_MST_EXT_LOW_PERIOD4_W::new(self, 24)
104    }
105}
106#[doc = "NA\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`scl_ext_low_time::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 [`scl_ext_low_time::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
107pub struct SCL_EXT_LOW_TIME_SPEC;
108impl crate::RegisterSpec for SCL_EXT_LOW_TIME_SPEC {
109    type Ux = u32;
110}
111#[doc = "`read()` method returns [`scl_ext_low_time::R`](R) reader structure"]
112impl crate::Readable for SCL_EXT_LOW_TIME_SPEC {}
113#[doc = "`write(|w| ..)` method takes [`scl_ext_low_time::W`](W) writer structure"]
114impl crate::Writable for SCL_EXT_LOW_TIME_SPEC {
115    type Safety = crate::Unsafe;
116    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
117    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
118}
119#[doc = "`reset()` method sets SCL_EXT_LOW_TIME to value 0"]
120impl crate::Resettable for SCL_EXT_LOW_TIME_SPEC {
121    const RESET_VALUE: u32 = 0;
122}