esp32/slchost/
host_slchost_conf.rs1#[doc = "Register `HOST_SLCHOST_CONF` reader"]
2pub type R = crate::R<HOST_SLCHOST_CONF_SPEC>;
3#[doc = "Register `HOST_SLCHOST_CONF` writer"]
4pub type W = crate::W<HOST_SLCHOST_CONF_SPEC>;
5#[doc = "Field `HOST_FRC_SDIO11` reader - "]
6pub type HOST_FRC_SDIO11_R = crate::FieldReader;
7#[doc = "Field `HOST_FRC_SDIO11` writer - "]
8pub type HOST_FRC_SDIO11_W<'a, REG> = crate::FieldWriter<'a, REG, 5>;
9#[doc = "Field `HOST_FRC_SDIO20` reader - "]
10pub type HOST_FRC_SDIO20_R = crate::FieldReader;
11#[doc = "Field `HOST_FRC_SDIO20` writer - "]
12pub type HOST_FRC_SDIO20_W<'a, REG> = crate::FieldWriter<'a, REG, 5>;
13#[doc = "Field `HOST_FRC_NEG_SAMP` reader - "]
14pub type HOST_FRC_NEG_SAMP_R = crate::FieldReader;
15#[doc = "Field `HOST_FRC_NEG_SAMP` writer - "]
16pub type HOST_FRC_NEG_SAMP_W<'a, REG> = crate::FieldWriter<'a, REG, 5>;
17#[doc = "Field `HOST_FRC_POS_SAMP` reader - "]
18pub type HOST_FRC_POS_SAMP_R = crate::FieldReader;
19#[doc = "Field `HOST_FRC_POS_SAMP` writer - "]
20pub type HOST_FRC_POS_SAMP_W<'a, REG> = crate::FieldWriter<'a, REG, 5>;
21#[doc = "Field `HOST_FRC_QUICK_IN` reader - "]
22pub type HOST_FRC_QUICK_IN_R = crate::FieldReader;
23#[doc = "Field `HOST_FRC_QUICK_IN` writer - "]
24pub type HOST_FRC_QUICK_IN_W<'a, REG> = crate::FieldWriter<'a, REG, 5>;
25#[doc = "Field `HOST_SDIO20_INT_DELAY` reader - "]
26pub type HOST_SDIO20_INT_DELAY_R = crate::BitReader;
27#[doc = "Field `HOST_SDIO20_INT_DELAY` writer - "]
28pub type HOST_SDIO20_INT_DELAY_W<'a, REG> = crate::BitWriter<'a, REG>;
29#[doc = "Field `HOST_SDIO_PAD_PULLUP` reader - "]
30pub type HOST_SDIO_PAD_PULLUP_R = crate::BitReader;
31#[doc = "Field `HOST_SDIO_PAD_PULLUP` writer - "]
32pub type HOST_SDIO_PAD_PULLUP_W<'a, REG> = crate::BitWriter<'a, REG>;
33#[doc = "Field `HOST_HSPEED_CON_EN` reader - "]
34pub type HOST_HSPEED_CON_EN_R = crate::BitReader;
35#[doc = "Field `HOST_HSPEED_CON_EN` writer - "]
36pub type HOST_HSPEED_CON_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
37impl R {
38 #[doc = "Bits 0:4"]
39 #[inline(always)]
40 pub fn host_frc_sdio11(&self) -> HOST_FRC_SDIO11_R {
41 HOST_FRC_SDIO11_R::new((self.bits & 0x1f) as u8)
42 }
43 #[doc = "Bits 5:9"]
44 #[inline(always)]
45 pub fn host_frc_sdio20(&self) -> HOST_FRC_SDIO20_R {
46 HOST_FRC_SDIO20_R::new(((self.bits >> 5) & 0x1f) as u8)
47 }
48 #[doc = "Bits 10:14"]
49 #[inline(always)]
50 pub fn host_frc_neg_samp(&self) -> HOST_FRC_NEG_SAMP_R {
51 HOST_FRC_NEG_SAMP_R::new(((self.bits >> 10) & 0x1f) as u8)
52 }
53 #[doc = "Bits 15:19"]
54 #[inline(always)]
55 pub fn host_frc_pos_samp(&self) -> HOST_FRC_POS_SAMP_R {
56 HOST_FRC_POS_SAMP_R::new(((self.bits >> 15) & 0x1f) as u8)
57 }
58 #[doc = "Bits 20:24"]
59 #[inline(always)]
60 pub fn host_frc_quick_in(&self) -> HOST_FRC_QUICK_IN_R {
61 HOST_FRC_QUICK_IN_R::new(((self.bits >> 20) & 0x1f) as u8)
62 }
63 #[doc = "Bit 25"]
64 #[inline(always)]
65 pub fn host_sdio20_int_delay(&self) -> HOST_SDIO20_INT_DELAY_R {
66 HOST_SDIO20_INT_DELAY_R::new(((self.bits >> 25) & 1) != 0)
67 }
68 #[doc = "Bit 26"]
69 #[inline(always)]
70 pub fn host_sdio_pad_pullup(&self) -> HOST_SDIO_PAD_PULLUP_R {
71 HOST_SDIO_PAD_PULLUP_R::new(((self.bits >> 26) & 1) != 0)
72 }
73 #[doc = "Bit 27"]
74 #[inline(always)]
75 pub fn host_hspeed_con_en(&self) -> HOST_HSPEED_CON_EN_R {
76 HOST_HSPEED_CON_EN_R::new(((self.bits >> 27) & 1) != 0)
77 }
78}
79#[cfg(feature = "impl-register-debug")]
80impl core::fmt::Debug for R {
81 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
82 f.debug_struct("HOST_SLCHOST_CONF")
83 .field("host_frc_sdio11", &self.host_frc_sdio11())
84 .field("host_frc_sdio20", &self.host_frc_sdio20())
85 .field("host_frc_neg_samp", &self.host_frc_neg_samp())
86 .field("host_frc_pos_samp", &self.host_frc_pos_samp())
87 .field("host_frc_quick_in", &self.host_frc_quick_in())
88 .field("host_sdio20_int_delay", &self.host_sdio20_int_delay())
89 .field("host_sdio_pad_pullup", &self.host_sdio_pad_pullup())
90 .field("host_hspeed_con_en", &self.host_hspeed_con_en())
91 .finish()
92 }
93}
94impl W {
95 #[doc = "Bits 0:4"]
96 #[inline(always)]
97 pub fn host_frc_sdio11(&mut self) -> HOST_FRC_SDIO11_W<HOST_SLCHOST_CONF_SPEC> {
98 HOST_FRC_SDIO11_W::new(self, 0)
99 }
100 #[doc = "Bits 5:9"]
101 #[inline(always)]
102 pub fn host_frc_sdio20(&mut self) -> HOST_FRC_SDIO20_W<HOST_SLCHOST_CONF_SPEC> {
103 HOST_FRC_SDIO20_W::new(self, 5)
104 }
105 #[doc = "Bits 10:14"]
106 #[inline(always)]
107 pub fn host_frc_neg_samp(&mut self) -> HOST_FRC_NEG_SAMP_W<HOST_SLCHOST_CONF_SPEC> {
108 HOST_FRC_NEG_SAMP_W::new(self, 10)
109 }
110 #[doc = "Bits 15:19"]
111 #[inline(always)]
112 pub fn host_frc_pos_samp(&mut self) -> HOST_FRC_POS_SAMP_W<HOST_SLCHOST_CONF_SPEC> {
113 HOST_FRC_POS_SAMP_W::new(self, 15)
114 }
115 #[doc = "Bits 20:24"]
116 #[inline(always)]
117 pub fn host_frc_quick_in(&mut self) -> HOST_FRC_QUICK_IN_W<HOST_SLCHOST_CONF_SPEC> {
118 HOST_FRC_QUICK_IN_W::new(self, 20)
119 }
120 #[doc = "Bit 25"]
121 #[inline(always)]
122 pub fn host_sdio20_int_delay(&mut self) -> HOST_SDIO20_INT_DELAY_W<HOST_SLCHOST_CONF_SPEC> {
123 HOST_SDIO20_INT_DELAY_W::new(self, 25)
124 }
125 #[doc = "Bit 26"]
126 #[inline(always)]
127 pub fn host_sdio_pad_pullup(&mut self) -> HOST_SDIO_PAD_PULLUP_W<HOST_SLCHOST_CONF_SPEC> {
128 HOST_SDIO_PAD_PULLUP_W::new(self, 26)
129 }
130 #[doc = "Bit 27"]
131 #[inline(always)]
132 pub fn host_hspeed_con_en(&mut self) -> HOST_HSPEED_CON_EN_W<HOST_SLCHOST_CONF_SPEC> {
133 HOST_HSPEED_CON_EN_W::new(self, 27)
134 }
135}
136#[doc = "\n\nYou can [`read`](crate::Reg::read) this register and get [`host_slchost_conf::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`host_slchost_conf::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
137pub struct HOST_SLCHOST_CONF_SPEC;
138impl crate::RegisterSpec for HOST_SLCHOST_CONF_SPEC {
139 type Ux = u32;
140}
141#[doc = "`read()` method returns [`host_slchost_conf::R`](R) reader structure"]
142impl crate::Readable for HOST_SLCHOST_CONF_SPEC {}
143#[doc = "`write(|w| ..)` method takes [`host_slchost_conf::W`](W) writer structure"]
144impl crate::Writable for HOST_SLCHOST_CONF_SPEC {
145 type Safety = crate::Unsafe;
146}
147#[doc = "`reset()` method sets HOST_SLCHOST_CONF to value 0"]
148impl crate::Resettable for HOST_SLCHOST_CONF_SPEC {}