esp32/dport/
wifi_rst_en.rs1#[doc = "Register `WIFI_RST_EN` reader"]
2pub type R = crate::R<WIFI_RST_EN_SPEC>;
3#[doc = "Register `WIFI_RST_EN` writer"]
4pub type W = crate::W<WIFI_RST_EN_SPEC>;
5#[doc = "Field `MAC_RST` reader - Set this bit to reset MAC module. Clear the bit to release MAC module."]
6pub type MAC_RST_R = crate::BitReader;
7#[doc = "Field `MAC_RST` writer - Set this bit to reset MAC module. Clear the bit to release MAC module."]
8pub type MAC_RST_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `SDIO_RST` reader - Set this bit to reset SDIO module. Clear the bit to release SDIO module."]
10pub type SDIO_RST_R = crate::BitReader;
11#[doc = "Field `SDIO_RST` writer - Set this bit to reset SDIO module. Clear the bit to release SDIO module."]
12pub type SDIO_RST_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `SDIO_HOST_RST` reader - Set this bit to reset SD/MMC module. Clear the bit to release SD/MMC module."]
14pub type SDIO_HOST_RST_R = crate::BitReader;
15#[doc = "Field `SDIO_HOST_RST` writer - Set this bit to reset SD/MMC module. Clear the bit to release SD/MMC module."]
16pub type SDIO_HOST_RST_W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `EMAC_RST` reader - Set this bit to reset Ethernet MAC module. Clear the bit to release Ethernet MAC module."]
18pub type EMAC_RST_R = crate::BitReader;
19#[doc = "Field `EMAC_RST` writer - Set this bit to reset Ethernet MAC module. Clear the bit to release Ethernet MAC module."]
20pub type EMAC_RST_W<'a, REG> = crate::BitWriter<'a, REG>;
21impl R {
22 #[doc = "Bit 2 - Set this bit to reset MAC module. Clear the bit to release MAC module."]
23 #[inline(always)]
24 pub fn mac_rst(&self) -> MAC_RST_R {
25 MAC_RST_R::new(((self.bits >> 2) & 1) != 0)
26 }
27 #[doc = "Bit 5 - Set this bit to reset SDIO module. Clear the bit to release SDIO module."]
28 #[inline(always)]
29 pub fn sdio_rst(&self) -> SDIO_RST_R {
30 SDIO_RST_R::new(((self.bits >> 5) & 1) != 0)
31 }
32 #[doc = "Bit 6 - Set this bit to reset SD/MMC module. Clear the bit to release SD/MMC module."]
33 #[inline(always)]
34 pub fn sdio_host_rst(&self) -> SDIO_HOST_RST_R {
35 SDIO_HOST_RST_R::new(((self.bits >> 6) & 1) != 0)
36 }
37 #[doc = "Bit 7 - Set this bit to reset Ethernet MAC module. Clear the bit to release Ethernet MAC module."]
38 #[inline(always)]
39 pub fn emac_rst(&self) -> EMAC_RST_R {
40 EMAC_RST_R::new(((self.bits >> 7) & 1) != 0)
41 }
42}
43#[cfg(feature = "impl-register-debug")]
44impl core::fmt::Debug for R {
45 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
46 f.debug_struct("WIFI_RST_EN")
47 .field("emac_rst", &self.emac_rst())
48 .field("sdio_host_rst", &self.sdio_host_rst())
49 .field("sdio_rst", &self.sdio_rst())
50 .field("mac_rst", &self.mac_rst())
51 .finish()
52 }
53}
54impl W {
55 #[doc = "Bit 2 - Set this bit to reset MAC module. Clear the bit to release MAC module."]
56 #[inline(always)]
57 pub fn mac_rst(&mut self) -> MAC_RST_W<WIFI_RST_EN_SPEC> {
58 MAC_RST_W::new(self, 2)
59 }
60 #[doc = "Bit 5 - Set this bit to reset SDIO module. Clear the bit to release SDIO module."]
61 #[inline(always)]
62 pub fn sdio_rst(&mut self) -> SDIO_RST_W<WIFI_RST_EN_SPEC> {
63 SDIO_RST_W::new(self, 5)
64 }
65 #[doc = "Bit 6 - Set this bit to reset SD/MMC module. Clear the bit to release SD/MMC module."]
66 #[inline(always)]
67 pub fn sdio_host_rst(&mut self) -> SDIO_HOST_RST_W<WIFI_RST_EN_SPEC> {
68 SDIO_HOST_RST_W::new(self, 6)
69 }
70 #[doc = "Bit 7 - Set this bit to reset Ethernet MAC module. Clear the bit to release Ethernet MAC module."]
71 #[inline(always)]
72 pub fn emac_rst(&mut self) -> EMAC_RST_W<WIFI_RST_EN_SPEC> {
73 EMAC_RST_W::new(self, 7)
74 }
75}
76#[doc = "Wifi peripheral reset control\n\nYou can [`read`](crate::Reg::read) this register and get [`wifi_rst_en::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`wifi_rst_en::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
77pub struct WIFI_RST_EN_SPEC;
78impl crate::RegisterSpec for WIFI_RST_EN_SPEC {
79 type Ux = u32;
80}
81#[doc = "`read()` method returns [`wifi_rst_en::R`](R) reader structure"]
82impl crate::Readable for WIFI_RST_EN_SPEC {}
83#[doc = "`write(|w| ..)` method takes [`wifi_rst_en::W`](W) writer structure"]
84impl crate::Writable for WIFI_RST_EN_SPEC {
85 type Safety = crate::Unsafe;
86}
87#[doc = "`reset()` method sets WIFI_RST_EN to value 0"]
88impl crate::Resettable for WIFI_RST_EN_SPEC {}