esp32h2/pcr/
iomux_conf.rs1#[doc = "Register `IOMUX_CONF` reader"]
2pub type R = crate::R<IOMUX_CONF_SPEC>;
3#[doc = "Register `IOMUX_CONF` writer"]
4pub type W = crate::W<IOMUX_CONF_SPEC>;
5#[doc = "Field `IOMUX_CLK_EN` reader - Set 1 to enable iomux apb clock"]
6pub type IOMUX_CLK_EN_R = crate::BitReader;
7#[doc = "Field `IOMUX_CLK_EN` writer - Set 1 to enable iomux apb clock"]
8pub type IOMUX_CLK_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `IOMUX_RST_EN` reader - Set 0 to reset iomux module"]
10pub type IOMUX_RST_EN_R = crate::BitReader;
11#[doc = "Field `IOMUX_RST_EN` writer - Set 0 to reset iomux module"]
12pub type IOMUX_RST_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
13impl R {
14 #[doc = "Bit 0 - Set 1 to enable iomux apb clock"]
15 #[inline(always)]
16 pub fn iomux_clk_en(&self) -> IOMUX_CLK_EN_R {
17 IOMUX_CLK_EN_R::new((self.bits & 1) != 0)
18 }
19 #[doc = "Bit 1 - Set 0 to reset iomux module"]
20 #[inline(always)]
21 pub fn iomux_rst_en(&self) -> IOMUX_RST_EN_R {
22 IOMUX_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("IOMUX_CONF")
29 .field("iomux_clk_en", &self.iomux_clk_en())
30 .field("iomux_rst_en", &self.iomux_rst_en())
31 .finish()
32 }
33}
34impl W {
35 #[doc = "Bit 0 - Set 1 to enable iomux apb clock"]
36 #[inline(always)]
37 pub fn iomux_clk_en(&mut self) -> IOMUX_CLK_EN_W<IOMUX_CONF_SPEC> {
38 IOMUX_CLK_EN_W::new(self, 0)
39 }
40 #[doc = "Bit 1 - Set 0 to reset iomux module"]
41 #[inline(always)]
42 pub fn iomux_rst_en(&mut self) -> IOMUX_RST_EN_W<IOMUX_CONF_SPEC> {
43 IOMUX_RST_EN_W::new(self, 1)
44 }
45}
46#[doc = "IOMUX configuration register\n\nYou can [`read`](crate::Reg::read) this register and get [`iomux_conf::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`iomux_conf::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
47pub struct IOMUX_CONF_SPEC;
48impl crate::RegisterSpec for IOMUX_CONF_SPEC {
49 type Ux = u32;
50}
51#[doc = "`read()` method returns [`iomux_conf::R`](R) reader structure"]
52impl crate::Readable for IOMUX_CONF_SPEC {}
53#[doc = "`write(|w| ..)` method takes [`iomux_conf::W`](W) writer structure"]
54impl crate::Writable for IOMUX_CONF_SPEC {
55 type Safety = crate::Unsafe;
56}
57#[doc = "`reset()` method sets IOMUX_CONF to value 0x01"]
58impl crate::Resettable for IOMUX_CONF_SPEC {
59 const RESET_VALUE: u32 = 0x01;
60}