1#[doc = "Register `GPIO%s` reader"]
2pub type R = crate::R<GPIO_SPEC>;
3#[doc = "Register `GPIO%s` writer"]
4pub type W = crate::W<GPIO_SPEC>;
5#[doc = "Field `MCU_OE` reader - need des"]
6pub type MCU_OE_R = crate::BitReader;
7#[doc = "Field `MCU_OE` writer - need des"]
8pub type MCU_OE_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `SLP_SEL` reader - need des"]
10pub type SLP_SEL_R = crate::BitReader;
11#[doc = "Field `SLP_SEL` writer - need des"]
12pub type SLP_SEL_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `MCU_WPD` reader - need des"]
14pub type MCU_WPD_R = crate::BitReader;
15#[doc = "Field `MCU_WPD` writer - need des"]
16pub type MCU_WPD_W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `MCU_WPU` reader - need des"]
18pub type MCU_WPU_R = crate::BitReader;
19#[doc = "Field `MCU_WPU` writer - need des"]
20pub type MCU_WPU_W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `MCU_IE` reader - need des"]
22pub type MCU_IE_R = crate::BitReader;
23#[doc = "Field `MCU_IE` writer - need des"]
24pub type MCU_IE_W<'a, REG> = crate::BitWriter<'a, REG>;
25#[doc = "Field `MCU_DRV` reader - need des"]
26pub type MCU_DRV_R = crate::FieldReader;
27#[doc = "Field `MCU_DRV` writer - need des"]
28pub type MCU_DRV_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
29#[doc = "Field `FUN_WPD` reader - need des"]
30pub type FUN_WPD_R = crate::BitReader;
31#[doc = "Field `FUN_WPD` writer - need des"]
32pub type FUN_WPD_W<'a, REG> = crate::BitWriter<'a, REG>;
33#[doc = "Field `FUN_WPU` reader - need des"]
34pub type FUN_WPU_R = crate::BitReader;
35#[doc = "Field `FUN_WPU` writer - need des"]
36pub type FUN_WPU_W<'a, REG> = crate::BitWriter<'a, REG>;
37#[doc = "Field `FUN_IE` reader - need des"]
38pub type FUN_IE_R = crate::BitReader;
39#[doc = "Field `FUN_IE` writer - need des"]
40pub type FUN_IE_W<'a, REG> = crate::BitWriter<'a, REG>;
41#[doc = "Field `FUN_DRV` reader - need des"]
42pub type FUN_DRV_R = crate::FieldReader;
43#[doc = "Field `FUN_DRV` writer - need des"]
44pub type FUN_DRV_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
45#[doc = "Field `MCU_SEL` reader - need des"]
46pub type MCU_SEL_R = crate::FieldReader;
47#[doc = "Field `MCU_SEL` writer - need des"]
48pub type MCU_SEL_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
49impl R {
50 #[doc = "Bit 0 - need des"]
51 #[inline(always)]
52 pub fn mcu_oe(&self) -> MCU_OE_R {
53 MCU_OE_R::new((self.bits & 1) != 0)
54 }
55 #[doc = "Bit 1 - need des"]
56 #[inline(always)]
57 pub fn slp_sel(&self) -> SLP_SEL_R {
58 SLP_SEL_R::new(((self.bits >> 1) & 1) != 0)
59 }
60 #[doc = "Bit 2 - need des"]
61 #[inline(always)]
62 pub fn mcu_wpd(&self) -> MCU_WPD_R {
63 MCU_WPD_R::new(((self.bits >> 2) & 1) != 0)
64 }
65 #[doc = "Bit 3 - need des"]
66 #[inline(always)]
67 pub fn mcu_wpu(&self) -> MCU_WPU_R {
68 MCU_WPU_R::new(((self.bits >> 3) & 1) != 0)
69 }
70 #[doc = "Bit 4 - need des"]
71 #[inline(always)]
72 pub fn mcu_ie(&self) -> MCU_IE_R {
73 MCU_IE_R::new(((self.bits >> 4) & 1) != 0)
74 }
75 #[doc = "Bits 5:6 - need des"]
76 #[inline(always)]
77 pub fn mcu_drv(&self) -> MCU_DRV_R {
78 MCU_DRV_R::new(((self.bits >> 5) & 3) as u8)
79 }
80 #[doc = "Bit 7 - need des"]
81 #[inline(always)]
82 pub fn fun_wpd(&self) -> FUN_WPD_R {
83 FUN_WPD_R::new(((self.bits >> 7) & 1) != 0)
84 }
85 #[doc = "Bit 8 - need des"]
86 #[inline(always)]
87 pub fn fun_wpu(&self) -> FUN_WPU_R {
88 FUN_WPU_R::new(((self.bits >> 8) & 1) != 0)
89 }
90 #[doc = "Bit 9 - need des"]
91 #[inline(always)]
92 pub fn fun_ie(&self) -> FUN_IE_R {
93 FUN_IE_R::new(((self.bits >> 9) & 1) != 0)
94 }
95 #[doc = "Bits 10:11 - need des"]
96 #[inline(always)]
97 pub fn fun_drv(&self) -> FUN_DRV_R {
98 FUN_DRV_R::new(((self.bits >> 10) & 3) as u8)
99 }
100 #[doc = "Bits 12:14 - need des"]
101 #[inline(always)]
102 pub fn mcu_sel(&self) -> MCU_SEL_R {
103 MCU_SEL_R::new(((self.bits >> 12) & 7) as u8)
104 }
105}
106#[cfg(feature = "impl-register-debug")]
107impl core::fmt::Debug for R {
108 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
109 f.debug_struct("GPIO")
110 .field("mcu_oe", &self.mcu_oe())
111 .field("slp_sel", &self.slp_sel())
112 .field("mcu_wpd", &self.mcu_wpd())
113 .field("mcu_wpu", &self.mcu_wpu())
114 .field("mcu_ie", &self.mcu_ie())
115 .field("mcu_drv", &self.mcu_drv())
116 .field("fun_wpd", &self.fun_wpd())
117 .field("fun_wpu", &self.fun_wpu())
118 .field("fun_ie", &self.fun_ie())
119 .field("fun_drv", &self.fun_drv())
120 .field("mcu_sel", &self.mcu_sel())
121 .finish()
122 }
123}
124impl W {
125 #[doc = "Bit 0 - need des"]
126 #[inline(always)]
127 pub fn mcu_oe(&mut self) -> MCU_OE_W<GPIO_SPEC> {
128 MCU_OE_W::new(self, 0)
129 }
130 #[doc = "Bit 1 - need des"]
131 #[inline(always)]
132 pub fn slp_sel(&mut self) -> SLP_SEL_W<GPIO_SPEC> {
133 SLP_SEL_W::new(self, 1)
134 }
135 #[doc = "Bit 2 - need des"]
136 #[inline(always)]
137 pub fn mcu_wpd(&mut self) -> MCU_WPD_W<GPIO_SPEC> {
138 MCU_WPD_W::new(self, 2)
139 }
140 #[doc = "Bit 3 - need des"]
141 #[inline(always)]
142 pub fn mcu_wpu(&mut self) -> MCU_WPU_W<GPIO_SPEC> {
143 MCU_WPU_W::new(self, 3)
144 }
145 #[doc = "Bit 4 - need des"]
146 #[inline(always)]
147 pub fn mcu_ie(&mut self) -> MCU_IE_W<GPIO_SPEC> {
148 MCU_IE_W::new(self, 4)
149 }
150 #[doc = "Bits 5:6 - need des"]
151 #[inline(always)]
152 pub fn mcu_drv(&mut self) -> MCU_DRV_W<GPIO_SPEC> {
153 MCU_DRV_W::new(self, 5)
154 }
155 #[doc = "Bit 7 - need des"]
156 #[inline(always)]
157 pub fn fun_wpd(&mut self) -> FUN_WPD_W<GPIO_SPEC> {
158 FUN_WPD_W::new(self, 7)
159 }
160 #[doc = "Bit 8 - need des"]
161 #[inline(always)]
162 pub fn fun_wpu(&mut self) -> FUN_WPU_W<GPIO_SPEC> {
163 FUN_WPU_W::new(self, 8)
164 }
165 #[doc = "Bit 9 - need des"]
166 #[inline(always)]
167 pub fn fun_ie(&mut self) -> FUN_IE_W<GPIO_SPEC> {
168 FUN_IE_W::new(self, 9)
169 }
170 #[doc = "Bits 10:11 - need des"]
171 #[inline(always)]
172 pub fn fun_drv(&mut self) -> FUN_DRV_W<GPIO_SPEC> {
173 FUN_DRV_W::new(self, 10)
174 }
175 #[doc = "Bits 12:14 - need des"]
176 #[inline(always)]
177 pub fn mcu_sel(&mut self) -> MCU_SEL_W<GPIO_SPEC> {
178 MCU_SEL_W::new(self, 12)
179 }
180}
181#[doc = "need des\n\nYou can [`read`](crate::Reg::read) this register and get [`gpio::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`gpio::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
182pub struct GPIO_SPEC;
183impl crate::RegisterSpec for GPIO_SPEC {
184 type Ux = u32;
185}
186#[doc = "`read()` method returns [`gpio::R`](R) reader structure"]
187impl crate::Readable for GPIO_SPEC {}
188#[doc = "`write(|w| ..)` method takes [`gpio::W`](W) writer structure"]
189impl crate::Writable for GPIO_SPEC {
190 type Safety = crate::Unsafe;
191 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
192 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
193}
194#[doc = "`reset()` method sets GPIO%s to value 0"]
195impl crate::Resettable for GPIO_SPEC {
196 const RESET_VALUE: u32 = 0;
197}