esp32h2/i2c_ana_mst/
burst_status.rs

1#[doc = "Register `BURST_STATUS` reader"]
2pub type R = crate::R<BURST_STATUS_SPEC>;
3#[doc = "Register `BURST_STATUS` writer"]
4pub type W = crate::W<BURST_STATUS_SPEC>;
5#[doc = "Field `MST_BURST_DONE` reader - ?"]
6pub type MST_BURST_DONE_R = crate::BitReader;
7#[doc = "Field `MST0_BURST_ERR` reader - ?"]
8pub type MST0_BURST_ERR_R = crate::BitReader;
9#[doc = "Field `MST1_BURST_ERR` reader - ?"]
10pub type MST1_BURST_ERR_R = crate::BitReader;
11#[doc = "Field `TIMEOUT_CNT` reader - ?"]
12pub type TIMEOUT_CNT_R = crate::FieldReader<u32>;
13impl R {
14    #[doc = "Bit 0 - ?"]
15    #[inline(always)]
16    pub fn mst_burst_done(&self) -> MST_BURST_DONE_R {
17        MST_BURST_DONE_R::new((self.bits & 1) != 0)
18    }
19    #[doc = "Bit 1 - ?"]
20    #[inline(always)]
21    pub fn mst0_burst_err(&self) -> MST0_BURST_ERR_R {
22        MST0_BURST_ERR_R::new(((self.bits >> 1) & 1) != 0)
23    }
24    #[doc = "Bit 2 - ?"]
25    #[inline(always)]
26    pub fn mst1_burst_err(&self) -> MST1_BURST_ERR_R {
27        MST1_BURST_ERR_R::new(((self.bits >> 2) & 1) != 0)
28    }
29    #[doc = "Bits 3:19 - ?"]
30    #[inline(always)]
31    pub fn timeout_cnt(&self) -> TIMEOUT_CNT_R {
32        TIMEOUT_CNT_R::new((self.bits >> 3) & 0x0001_ffff)
33    }
34}
35#[cfg(feature = "impl-register-debug")]
36impl core::fmt::Debug for R {
37    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
38        f.debug_struct("BURST_STATUS")
39            .field("mst_burst_done", &self.mst_burst_done())
40            .field("mst0_burst_err", &self.mst0_burst_err())
41            .field("mst1_burst_err", &self.mst1_burst_err())
42            .field("timeout_cnt", &self.timeout_cnt())
43            .finish()
44    }
45}
46impl W {}
47#[doc = "BURST_STATUS register\n\nYou can [`read`](crate::Reg::read) this register and get [`burst_status::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`burst_status::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
48pub struct BURST_STATUS_SPEC;
49impl crate::RegisterSpec for BURST_STATUS_SPEC {
50    type Ux = u32;
51}
52#[doc = "`read()` method returns [`burst_status::R`](R) reader structure"]
53impl crate::Readable for BURST_STATUS_SPEC {}
54#[doc = "`write(|w| ..)` method takes [`burst_status::W`](W) writer structure"]
55impl crate::Writable for BURST_STATUS_SPEC {
56    type Safety = crate::Unsafe;
57    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
58    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
59}
60#[doc = "`reset()` method sets BURST_STATUS to value 0"]
61impl crate::Resettable for BURST_STATUS_SPEC {
62    const RESET_VALUE: u32 = 0;
63}