esp32c6/pcr/
sdio_slave_conf.rs1#[doc = "Register `SDIO_SLAVE_CONF` reader"]
2pub type R = crate::R<SDIO_SLAVE_CONF_SPEC>;
3#[doc = "Register `SDIO_SLAVE_CONF` writer"]
4pub type W = crate::W<SDIO_SLAVE_CONF_SPEC>;
5#[doc = "Field `SDIO_SLAVE_CLK_EN` reader - Set 1 to enable sdio_slave clock"]
6pub type SDIO_SLAVE_CLK_EN_R = crate::BitReader;
7#[doc = "Field `SDIO_SLAVE_CLK_EN` writer - Set 1 to enable sdio_slave clock"]
8pub type SDIO_SLAVE_CLK_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `SDIO_SLAVE_RST_EN` reader - Set 0 to reset sdio_slave module"]
10pub type SDIO_SLAVE_RST_EN_R = crate::BitReader;
11#[doc = "Field `SDIO_SLAVE_RST_EN` writer - Set 0 to reset sdio_slave module"]
12pub type SDIO_SLAVE_RST_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
13impl R {
14 #[doc = "Bit 0 - Set 1 to enable sdio_slave clock"]
15 #[inline(always)]
16 pub fn sdio_slave_clk_en(&self) -> SDIO_SLAVE_CLK_EN_R {
17 SDIO_SLAVE_CLK_EN_R::new((self.bits & 1) != 0)
18 }
19 #[doc = "Bit 1 - Set 0 to reset sdio_slave module"]
20 #[inline(always)]
21 pub fn sdio_slave_rst_en(&self) -> SDIO_SLAVE_RST_EN_R {
22 SDIO_SLAVE_RST_EN_R::new(((self.bits >> 1) & 1) != 0)
23 }
24}
25#[cfg(feature = "impl-register-debug")]
26impl core::fmt::Debug for R {
27 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
28 f.debug_struct("SDIO_SLAVE_CONF")
29 .field("sdio_slave_clk_en", &self.sdio_slave_clk_en())
30 .field("sdio_slave_rst_en", &self.sdio_slave_rst_en())
31 .finish()
32 }
33}
34impl W {
35 #[doc = "Bit 0 - Set 1 to enable sdio_slave clock"]
36 #[inline(always)]
37 pub fn sdio_slave_clk_en(&mut self) -> SDIO_SLAVE_CLK_EN_W<SDIO_SLAVE_CONF_SPEC> {
38 SDIO_SLAVE_CLK_EN_W::new(self, 0)
39 }
40 #[doc = "Bit 1 - Set 0 to reset sdio_slave module"]
41 #[inline(always)]
42 pub fn sdio_slave_rst_en(&mut self) -> SDIO_SLAVE_RST_EN_W<SDIO_SLAVE_CONF_SPEC> {
43 SDIO_SLAVE_RST_EN_W::new(self, 1)
44 }
45}
46#[doc = "SDIO_SLAVE configuration register\n\nYou can [`read`](crate::Reg::read) this register and get [`sdio_slave_conf::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`sdio_slave_conf::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
47pub struct SDIO_SLAVE_CONF_SPEC;
48impl crate::RegisterSpec for SDIO_SLAVE_CONF_SPEC {
49 type Ux = u32;
50}
51#[doc = "`read()` method returns [`sdio_slave_conf::R`](R) reader structure"]
52impl crate::Readable for SDIO_SLAVE_CONF_SPEC {}
53#[doc = "`write(|w| ..)` method takes [`sdio_slave_conf::W`](W) writer structure"]
54impl crate::Writable for SDIO_SLAVE_CONF_SPEC {
55 type Safety = crate::Unsafe;
56}
57#[doc = "`reset()` method sets SDIO_SLAVE_CONF to value 0x01"]
58impl crate::Resettable for SDIO_SLAVE_CONF_SPEC {
59 const RESET_VALUE: u32 = 0x01;
60}