esp32/slc/
sdio_crc_st1.rs1#[doc = "Register `SDIO_CRC_ST1` reader"]
2pub type R = crate::R<SDIO_CRC_ST1_SPEC>;
3#[doc = "Register `SDIO_CRC_ST1` writer"]
4pub type W = crate::W<SDIO_CRC_ST1_SPEC>;
5#[doc = "Field `CMD_CRC_ERR_CNT` reader - "]
6pub type CMD_CRC_ERR_CNT_R = crate::FieldReader;
7#[doc = "Field `ERR_CNT_CLR` reader - "]
8pub type ERR_CNT_CLR_R = crate::BitReader;
9#[doc = "Field `ERR_CNT_CLR` writer - "]
10pub type ERR_CNT_CLR_W<'a, REG> = crate::BitWriter<'a, REG>;
11impl R {
12 #[doc = "Bits 0:7"]
13 #[inline(always)]
14 pub fn cmd_crc_err_cnt(&self) -> CMD_CRC_ERR_CNT_R {
15 CMD_CRC_ERR_CNT_R::new((self.bits & 0xff) as u8)
16 }
17 #[doc = "Bit 31"]
18 #[inline(always)]
19 pub fn err_cnt_clr(&self) -> ERR_CNT_CLR_R {
20 ERR_CNT_CLR_R::new(((self.bits >> 31) & 1) != 0)
21 }
22}
23#[cfg(feature = "impl-register-debug")]
24impl core::fmt::Debug for R {
25 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
26 f.debug_struct("SDIO_CRC_ST1")
27 .field("cmd_crc_err_cnt", &self.cmd_crc_err_cnt())
28 .field("err_cnt_clr", &self.err_cnt_clr())
29 .finish()
30 }
31}
32impl W {
33 #[doc = "Bit 31"]
34 #[inline(always)]
35 pub fn err_cnt_clr(&mut self) -> ERR_CNT_CLR_W<SDIO_CRC_ST1_SPEC> {
36 ERR_CNT_CLR_W::new(self, 31)
37 }
38}
39#[doc = "\n\nYou can [`read`](crate::Reg::read) this register and get [`sdio_crc_st1::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`sdio_crc_st1::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
40pub struct SDIO_CRC_ST1_SPEC;
41impl crate::RegisterSpec for SDIO_CRC_ST1_SPEC {
42 type Ux = u32;
43}
44#[doc = "`read()` method returns [`sdio_crc_st1::R`](R) reader structure"]
45impl crate::Readable for SDIO_CRC_ST1_SPEC {}
46#[doc = "`write(|w| ..)` method takes [`sdio_crc_st1::W`](W) writer structure"]
47impl crate::Writable for SDIO_CRC_ST1_SPEC {
48 type Safety = crate::Unsafe;
49 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
50 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
51}
52#[doc = "`reset()` method sets SDIO_CRC_ST1 to value 0"]
53impl crate::Resettable for SDIO_CRC_ST1_SPEC {
54 const RESET_VALUE: u32 = 0;
55}