esp32p4/lp_i2c_ana_mst/
i2c_burst_status.rs1#[doc = "Register `I2C_BURST_STATUS` reader"]
2pub type R = crate::R<I2C_BURST_STATUS_SPEC>;
3#[doc = "Register `I2C_BURST_STATUS` writer"]
4pub type W = crate::W<I2C_BURST_STATUS_SPEC>;
5#[doc = "Field `I2C_MST_BURST_DONE` reader - need des"]
6pub type I2C_MST_BURST_DONE_R = crate::BitReader;
7#[doc = "Field `I2C_MST0_BURST_ERR_FLAG` reader - need des"]
8pub type I2C_MST0_BURST_ERR_FLAG_R = crate::BitReader;
9#[doc = "Field `I2C_MST1_BURST_ERR_FLAG` reader - need des"]
10pub type I2C_MST1_BURST_ERR_FLAG_R = crate::BitReader;
11#[doc = "Field `I2C_MST_BURST_TIMEOUT_CNT` reader - need des"]
12pub type I2C_MST_BURST_TIMEOUT_CNT_R = crate::FieldReader<u16>;
13#[doc = "Field `I2C_MST_BURST_TIMEOUT_CNT` writer - need des"]
14pub type I2C_MST_BURST_TIMEOUT_CNT_W<'a, REG> = crate::FieldWriter<'a, REG, 12, u16>;
15impl R {
16 #[doc = "Bit 0 - need des"]
17 #[inline(always)]
18 pub fn i2c_mst_burst_done(&self) -> I2C_MST_BURST_DONE_R {
19 I2C_MST_BURST_DONE_R::new((self.bits & 1) != 0)
20 }
21 #[doc = "Bit 1 - need des"]
22 #[inline(always)]
23 pub fn i2c_mst0_burst_err_flag(&self) -> I2C_MST0_BURST_ERR_FLAG_R {
24 I2C_MST0_BURST_ERR_FLAG_R::new(((self.bits >> 1) & 1) != 0)
25 }
26 #[doc = "Bit 2 - need des"]
27 #[inline(always)]
28 pub fn i2c_mst1_burst_err_flag(&self) -> I2C_MST1_BURST_ERR_FLAG_R {
29 I2C_MST1_BURST_ERR_FLAG_R::new(((self.bits >> 2) & 1) != 0)
30 }
31 #[doc = "Bits 20:31 - need des"]
32 #[inline(always)]
33 pub fn i2c_mst_burst_timeout_cnt(&self) -> I2C_MST_BURST_TIMEOUT_CNT_R {
34 I2C_MST_BURST_TIMEOUT_CNT_R::new(((self.bits >> 20) & 0x0fff) as u16)
35 }
36}
37#[cfg(feature = "impl-register-debug")]
38impl core::fmt::Debug for R {
39 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
40 f.debug_struct("I2C_BURST_STATUS")
41 .field(
42 "i2c_mst_burst_done",
43 &format_args!("{}", self.i2c_mst_burst_done().bit()),
44 )
45 .field(
46 "i2c_mst0_burst_err_flag",
47 &format_args!("{}", self.i2c_mst0_burst_err_flag().bit()),
48 )
49 .field(
50 "i2c_mst1_burst_err_flag",
51 &format_args!("{}", self.i2c_mst1_burst_err_flag().bit()),
52 )
53 .field(
54 "i2c_mst_burst_timeout_cnt",
55 &format_args!("{}", self.i2c_mst_burst_timeout_cnt().bits()),
56 )
57 .finish()
58 }
59}
60#[cfg(feature = "impl-register-debug")]
61impl core::fmt::Debug for crate::generic::Reg<I2C_BURST_STATUS_SPEC> {
62 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
63 core::fmt::Debug::fmt(&self.read(), f)
64 }
65}
66impl W {
67 #[doc = "Bits 20:31 - need des"]
68 #[inline(always)]
69 #[must_use]
70 pub fn i2c_mst_burst_timeout_cnt(
71 &mut self,
72 ) -> I2C_MST_BURST_TIMEOUT_CNT_W<I2C_BURST_STATUS_SPEC> {
73 I2C_MST_BURST_TIMEOUT_CNT_W::new(self, 20)
74 }
75}
76#[doc = "need des\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`i2c_burst_status::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 [`i2c_burst_status::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
77pub struct I2C_BURST_STATUS_SPEC;
78impl crate::RegisterSpec for I2C_BURST_STATUS_SPEC {
79 type Ux = u32;
80}
81#[doc = "`read()` method returns [`i2c_burst_status::R`](R) reader structure"]
82impl crate::Readable for I2C_BURST_STATUS_SPEC {}
83#[doc = "`write(|w| ..)` method takes [`i2c_burst_status::W`](W) writer structure"]
84impl crate::Writable for I2C_BURST_STATUS_SPEC {
85 type Safety = crate::Unsafe;
86 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
87 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
88}
89#[doc = "`reset()` method sets I2C_BURST_STATUS to value 0x4000_0000"]
90impl crate::Resettable for I2C_BURST_STATUS_SPEC {
91 const RESET_VALUE: u32 = 0x4000_0000;
92}