esp32/slc/
sdio_crc_st0.rs

1#[doc = "Register `SDIO_CRC_ST0` reader"]
2pub type R = crate::R<SDIO_CRC_ST0_SPEC>;
3#[doc = "Field `DAT0_CRC_ERR_CNT` reader - "]
4pub type DAT0_CRC_ERR_CNT_R = crate::FieldReader;
5#[doc = "Field `DAT1_CRC_ERR_CNT` reader - "]
6pub type DAT1_CRC_ERR_CNT_R = crate::FieldReader;
7#[doc = "Field `DAT2_CRC_ERR_CNT` reader - "]
8pub type DAT2_CRC_ERR_CNT_R = crate::FieldReader;
9#[doc = "Field `DAT3_CRC_ERR_CNT` reader - "]
10pub type DAT3_CRC_ERR_CNT_R = crate::FieldReader;
11impl R {
12    #[doc = "Bits 0:7"]
13    #[inline(always)]
14    pub fn dat0_crc_err_cnt(&self) -> DAT0_CRC_ERR_CNT_R {
15        DAT0_CRC_ERR_CNT_R::new((self.bits & 0xff) as u8)
16    }
17    #[doc = "Bits 8:15"]
18    #[inline(always)]
19    pub fn dat1_crc_err_cnt(&self) -> DAT1_CRC_ERR_CNT_R {
20        DAT1_CRC_ERR_CNT_R::new(((self.bits >> 8) & 0xff) as u8)
21    }
22    #[doc = "Bits 16:23"]
23    #[inline(always)]
24    pub fn dat2_crc_err_cnt(&self) -> DAT2_CRC_ERR_CNT_R {
25        DAT2_CRC_ERR_CNT_R::new(((self.bits >> 16) & 0xff) as u8)
26    }
27    #[doc = "Bits 24:31"]
28    #[inline(always)]
29    pub fn dat3_crc_err_cnt(&self) -> DAT3_CRC_ERR_CNT_R {
30        DAT3_CRC_ERR_CNT_R::new(((self.bits >> 24) & 0xff) as u8)
31    }
32}
33#[cfg(feature = "impl-register-debug")]
34impl core::fmt::Debug for R {
35    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
36        f.debug_struct("SDIO_CRC_ST0")
37            .field("dat0_crc_err_cnt", &self.dat0_crc_err_cnt())
38            .field("dat1_crc_err_cnt", &self.dat1_crc_err_cnt())
39            .field("dat2_crc_err_cnt", &self.dat2_crc_err_cnt())
40            .field("dat3_crc_err_cnt", &self.dat3_crc_err_cnt())
41            .finish()
42    }
43}
44#[doc = "\n\nYou can [`read`](crate::Reg::read) this register and get [`sdio_crc_st0::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
45pub struct SDIO_CRC_ST0_SPEC;
46impl crate::RegisterSpec for SDIO_CRC_ST0_SPEC {
47    type Ux = u32;
48}
49#[doc = "`read()` method returns [`sdio_crc_st0::R`](R) reader structure"]
50impl crate::Readable for SDIO_CRC_ST0_SPEC {}
51#[doc = "`reset()` method sets SDIO_CRC_ST0 to value 0"]
52impl crate::Resettable for SDIO_CRC_ST0_SPEC {
53    const RESET_VALUE: u32 = 0;
54}