Skip to content

Commit 02ca6ae

Browse files
bugadanijessebraham
authored andcommittedOct 16, 2024·
C6: Arrayify LP_IO PIN and GPIO registers
1 parent 7104f6c commit 02ca6ae

18 files changed

+73
-2492
lines changed
 

‎esp32c6/src/lp_io.rs

+23-151
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,13 @@ pub struct RegisterBlock {
1212
status_w1ts: STATUS_W1TS,
1313
status_w1tc: STATUS_W1TC,
1414
in_: IN,
15-
pin0: PIN0,
16-
pin1: PIN1,
17-
pin2: PIN2,
18-
pin3: PIN3,
19-
pin4: PIN4,
20-
pin5: PIN5,
21-
pin6: PIN6,
22-
pin7: PIN7,
23-
gpio0: GPIO0,
24-
gpio1: GPIO1,
25-
gpio2: GPIO2,
26-
gpio3: GPIO3,
27-
gpio4: GPIO4,
28-
gpio5: GPIO5,
29-
gpio6: GPIO6,
30-
gpio7: GPIO7,
15+
pin: [PIN; 8],
16+
gpio: [GPIO; 8],
3117
status_interrupt: STATUS_INTERRUPT,
3218
debug_sel0: DEBUG_SEL0,
3319
debug_sel1: DEBUG_SEL1,
3420
lpi2c: LPI2C,
35-
_reserved30: [u8; 0x0384],
21+
_reserved16: [u8; 0x0384],
3622
date: DATE,
3723
}
3824
impl RegisterBlock {
@@ -86,85 +72,27 @@ impl RegisterBlock {
8672
pub const fn in_(&self) -> &IN {
8773
&self.in_
8874
}
89-
#[doc = "0x28 - need des"]
75+
#[doc = "0x28..0x48 - need des"]
9076
#[inline(always)]
91-
pub const fn pin0(&self) -> &PIN0 {
92-
&self.pin0
77+
pub const fn pin(&self, n: usize) -> &PIN {
78+
&self.pin[n]
9379
}
94-
#[doc = "0x2c - need des"]
80+
#[doc = "Iterator for array of:"]
81+
#[doc = "0x28..0x48 - need des"]
9582
#[inline(always)]
96-
pub const fn pin1(&self) -> &PIN1 {
97-
&self.pin1
83+
pub fn pin_iter(&self) -> impl Iterator<Item = &PIN> {
84+
self.pin.iter()
9885
}
99-
#[doc = "0x30 - need des"]
86+
#[doc = "0x48..0x68 - need des"]
10087
#[inline(always)]
101-
pub const fn pin2(&self) -> &PIN2 {
102-
&self.pin2
88+
pub const fn gpio(&self, n: usize) -> &GPIO {
89+
&self.gpio[n]
10390
}
104-
#[doc = "0x34 - need des"]
91+
#[doc = "Iterator for array of:"]
92+
#[doc = "0x48..0x68 - need des"]
10593
#[inline(always)]
106-
pub const fn pin3(&self) -> &PIN3 {
107-
&self.pin3
108-
}
109-
#[doc = "0x38 - need des"]
110-
#[inline(always)]
111-
pub const fn pin4(&self) -> &PIN4 {
112-
&self.pin4
113-
}
114-
#[doc = "0x3c - need des"]
115-
#[inline(always)]
116-
pub const fn pin5(&self) -> &PIN5 {
117-
&self.pin5
118-
}
119-
#[doc = "0x40 - need des"]
120-
#[inline(always)]
121-
pub const fn pin6(&self) -> &PIN6 {
122-
&self.pin6
123-
}
124-
#[doc = "0x44 - need des"]
125-
#[inline(always)]
126-
pub const fn pin7(&self) -> &PIN7 {
127-
&self.pin7
128-
}
129-
#[doc = "0x48 - need des"]
130-
#[inline(always)]
131-
pub const fn gpio0(&self) -> &GPIO0 {
132-
&self.gpio0
133-
}
134-
#[doc = "0x4c - need des"]
135-
#[inline(always)]
136-
pub const fn gpio1(&self) -> &GPIO1 {
137-
&self.gpio1
138-
}
139-
#[doc = "0x50 - need des"]
140-
#[inline(always)]
141-
pub const fn gpio2(&self) -> &GPIO2 {
142-
&self.gpio2
143-
}
144-
#[doc = "0x54 - need des"]
145-
#[inline(always)]
146-
pub const fn gpio3(&self) -> &GPIO3 {
147-
&self.gpio3
148-
}
149-
#[doc = "0x58 - need des"]
150-
#[inline(always)]
151-
pub const fn gpio4(&self) -> &GPIO4 {
152-
&self.gpio4
153-
}
154-
#[doc = "0x5c - need des"]
155-
#[inline(always)]
156-
pub const fn gpio5(&self) -> &GPIO5 {
157-
&self.gpio5
158-
}
159-
#[doc = "0x60 - need des"]
160-
#[inline(always)]
161-
pub const fn gpio6(&self) -> &GPIO6 {
162-
&self.gpio6
163-
}
164-
#[doc = "0x64 - need des"]
165-
#[inline(always)]
166-
pub const fn gpio7(&self) -> &GPIO7 {
167-
&self.gpio7
94+
pub fn gpio_iter(&self) -> impl Iterator<Item = &GPIO> {
95+
self.gpio.iter()
16896
}
16997
#[doc = "0x68 - need des"]
17098
#[inline(always)]
@@ -232,70 +160,14 @@ pub mod status_w1tc;
232160
pub type IN = crate::Reg<in_::IN_SPEC>;
233161
#[doc = "need des"]
234162
pub mod in_;
235-
#[doc = "PIN0 (rw) register accessor: need des\n\nYou can [`read`](crate::Reg::read) this register and get [`pin0::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pin0::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@pin0`] module"]
236-
pub type PIN0 = crate::Reg<pin0::PIN0_SPEC>;
237-
#[doc = "need des"]
238-
pub mod pin0;
239-
#[doc = "PIN1 (rw) register accessor: need des\n\nYou can [`read`](crate::Reg::read) this register and get [`pin1::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pin1::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@pin1`] module"]
240-
pub type PIN1 = crate::Reg<pin1::PIN1_SPEC>;
241-
#[doc = "need des"]
242-
pub mod pin1;
243-
#[doc = "PIN2 (rw) register accessor: need des\n\nYou can [`read`](crate::Reg::read) this register and get [`pin2::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pin2::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@pin2`] module"]
244-
pub type PIN2 = crate::Reg<pin2::PIN2_SPEC>;
245-
#[doc = "need des"]
246-
pub mod pin2;
247-
#[doc = "PIN3 (rw) register accessor: need des\n\nYou can [`read`](crate::Reg::read) this register and get [`pin3::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pin3::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@pin3`] module"]
248-
pub type PIN3 = crate::Reg<pin3::PIN3_SPEC>;
249-
#[doc = "need des"]
250-
pub mod pin3;
251-
#[doc = "PIN4 (rw) register accessor: need des\n\nYou can [`read`](crate::Reg::read) this register and get [`pin4::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pin4::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@pin4`] module"]
252-
pub type PIN4 = crate::Reg<pin4::PIN4_SPEC>;
253-
#[doc = "need des"]
254-
pub mod pin4;
255-
#[doc = "PIN5 (rw) register accessor: need des\n\nYou can [`read`](crate::Reg::read) this register and get [`pin5::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pin5::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@pin5`] module"]
256-
pub type PIN5 = crate::Reg<pin5::PIN5_SPEC>;
257-
#[doc = "need des"]
258-
pub mod pin5;
259-
#[doc = "PIN6 (rw) register accessor: need des\n\nYou can [`read`](crate::Reg::read) this register and get [`pin6::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pin6::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@pin6`] module"]
260-
pub type PIN6 = crate::Reg<pin6::PIN6_SPEC>;
261-
#[doc = "need des"]
262-
pub mod pin6;
263-
#[doc = "PIN7 (rw) register accessor: need des\n\nYou can [`read`](crate::Reg::read) this register and get [`pin7::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pin7::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@pin7`] module"]
264-
pub type PIN7 = crate::Reg<pin7::PIN7_SPEC>;
265-
#[doc = "need des"]
266-
pub mod pin7;
267-
#[doc = "GPIO0 (rw) register accessor: need des\n\nYou can [`read`](crate::Reg::read) this register and get [`gpio0::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`gpio0::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@gpio0`] module"]
268-
pub type GPIO0 = crate::Reg<gpio0::GPIO0_SPEC>;
269-
#[doc = "need des"]
270-
pub mod gpio0;
271-
#[doc = "GPIO1 (rw) register accessor: need des\n\nYou can [`read`](crate::Reg::read) this register and get [`gpio1::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`gpio1::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@gpio1`] module"]
272-
pub type GPIO1 = crate::Reg<gpio1::GPIO1_SPEC>;
273-
#[doc = "need des"]
274-
pub mod gpio1;
275-
#[doc = "GPIO2 (rw) register accessor: need des\n\nYou can [`read`](crate::Reg::read) this register and get [`gpio2::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`gpio2::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@gpio2`] module"]
276-
pub type GPIO2 = crate::Reg<gpio2::GPIO2_SPEC>;
277-
#[doc = "need des"]
278-
pub mod gpio2;
279-
#[doc = "GPIO3 (rw) register accessor: need des\n\nYou can [`read`](crate::Reg::read) this register and get [`gpio3::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`gpio3::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@gpio3`] module"]
280-
pub type GPIO3 = crate::Reg<gpio3::GPIO3_SPEC>;
281-
#[doc = "need des"]
282-
pub mod gpio3;
283-
#[doc = "GPIO4 (rw) register accessor: need des\n\nYou can [`read`](crate::Reg::read) this register and get [`gpio4::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`gpio4::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@gpio4`] module"]
284-
pub type GPIO4 = crate::Reg<gpio4::GPIO4_SPEC>;
285-
#[doc = "need des"]
286-
pub mod gpio4;
287-
#[doc = "GPIO5 (rw) register accessor: need des\n\nYou can [`read`](crate::Reg::read) this register and get [`gpio5::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`gpio5::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@gpio5`] module"]
288-
pub type GPIO5 = crate::Reg<gpio5::GPIO5_SPEC>;
289-
#[doc = "need des"]
290-
pub mod gpio5;
291-
#[doc = "GPIO6 (rw) register accessor: need des\n\nYou can [`read`](crate::Reg::read) this register and get [`gpio6::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`gpio6::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@gpio6`] module"]
292-
pub type GPIO6 = crate::Reg<gpio6::GPIO6_SPEC>;
163+
#[doc = "PIN (rw) register accessor: need des\n\nYou can [`read`](crate::Reg::read) this register and get [`pin::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pin::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@pin`] module"]
164+
pub type PIN = crate::Reg<pin::PIN_SPEC>;
293165
#[doc = "need des"]
294-
pub mod gpio6;
295-
#[doc = "GPIO7 (rw) register accessor: need des\n\nYou can [`read`](crate::Reg::read) this register and get [`gpio7::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`gpio7::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@gpio7`] module"]
296-
pub type GPIO7 = crate::Reg<gpio7::GPIO7_SPEC>;
166+
pub mod pin;
167+
#[doc = "GPIO (rw) register accessor: need des\n\nYou can [`read`](crate::Reg::read) this register and get [`gpio::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`gpio::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@gpio`] module"]
168+
pub type GPIO = crate::Reg<gpio::GPIO_SPEC>;
297169
#[doc = "need des"]
298-
pub mod gpio7;
170+
pub mod gpio;
299171
#[doc = "STATUS_INTERRUPT (r) register accessor: need des\n\nYou can [`read`](crate::Reg::read) this register and get [`status_interrupt::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@status_interrupt`] module"]
300172
pub type STATUS_INTERRUPT = crate::Reg<status_interrupt::STATUS_INTERRUPT_SPEC>;
301173
#[doc = "need des"]

‎esp32c6/src/lp_io/gpio0.rs ‎esp32c6/src/lp_io/gpio.rs

+25-25
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
#[doc = "Register `GPIO0` reader"]
2-
pub type R = crate::R<GPIO0_SPEC>;
3-
#[doc = "Register `GPIO0` writer"]
4-
pub type W = crate::W<GPIO0_SPEC>;
1+
#[doc = "Register `GPIO%s` reader"]
2+
pub type R = crate::R<GPIO_SPEC>;
3+
#[doc = "Register `GPIO%s` writer"]
4+
pub type W = crate::W<GPIO_SPEC>;
55
#[doc = "Field `MCU_OE` reader - need des"]
66
pub type MCU_OE_R = crate::BitReader;
77
#[doc = "Field `MCU_OE` writer - need des"]
@@ -106,7 +106,7 @@ impl R {
106106
#[cfg(feature = "impl-register-debug")]
107107
impl core::fmt::Debug for R {
108108
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
109-
f.debug_struct("GPIO0")
109+
f.debug_struct("GPIO")
110110
.field("mcu_oe", &self.mcu_oe())
111111
.field("slp_sel", &self.slp_sel())
112112
.field("mcu_wpd", &self.mcu_wpd())
@@ -125,84 +125,84 @@ impl W {
125125
#[doc = "Bit 0 - need des"]
126126
#[inline(always)]
127127
#[must_use]
128-
pub fn mcu_oe(&mut self) -> MCU_OE_W<GPIO0_SPEC> {
128+
pub fn mcu_oe(&mut self) -> MCU_OE_W<GPIO_SPEC> {
129129
MCU_OE_W::new(self, 0)
130130
}
131131
#[doc = "Bit 1 - need des"]
132132
#[inline(always)]
133133
#[must_use]
134-
pub fn slp_sel(&mut self) -> SLP_SEL_W<GPIO0_SPEC> {
134+
pub fn slp_sel(&mut self) -> SLP_SEL_W<GPIO_SPEC> {
135135
SLP_SEL_W::new(self, 1)
136136
}
137137
#[doc = "Bit 2 - need des"]
138138
#[inline(always)]
139139
#[must_use]
140-
pub fn mcu_wpd(&mut self) -> MCU_WPD_W<GPIO0_SPEC> {
140+
pub fn mcu_wpd(&mut self) -> MCU_WPD_W<GPIO_SPEC> {
141141
MCU_WPD_W::new(self, 2)
142142
}
143143
#[doc = "Bit 3 - need des"]
144144
#[inline(always)]
145145
#[must_use]
146-
pub fn mcu_wpu(&mut self) -> MCU_WPU_W<GPIO0_SPEC> {
146+
pub fn mcu_wpu(&mut self) -> MCU_WPU_W<GPIO_SPEC> {
147147
MCU_WPU_W::new(self, 3)
148148
}
149149
#[doc = "Bit 4 - need des"]
150150
#[inline(always)]
151151
#[must_use]
152-
pub fn mcu_ie(&mut self) -> MCU_IE_W<GPIO0_SPEC> {
152+
pub fn mcu_ie(&mut self) -> MCU_IE_W<GPIO_SPEC> {
153153
MCU_IE_W::new(self, 4)
154154
}
155155
#[doc = "Bits 5:6 - need des"]
156156
#[inline(always)]
157157
#[must_use]
158-
pub fn mcu_drv(&mut self) -> MCU_DRV_W<GPIO0_SPEC> {
158+
pub fn mcu_drv(&mut self) -> MCU_DRV_W<GPIO_SPEC> {
159159
MCU_DRV_W::new(self, 5)
160160
}
161161
#[doc = "Bit 7 - need des"]
162162
#[inline(always)]
163163
#[must_use]
164-
pub fn fun_wpd(&mut self) -> FUN_WPD_W<GPIO0_SPEC> {
164+
pub fn fun_wpd(&mut self) -> FUN_WPD_W<GPIO_SPEC> {
165165
FUN_WPD_W::new(self, 7)
166166
}
167167
#[doc = "Bit 8 - need des"]
168168
#[inline(always)]
169169
#[must_use]
170-
pub fn fun_wpu(&mut self) -> FUN_WPU_W<GPIO0_SPEC> {
170+
pub fn fun_wpu(&mut self) -> FUN_WPU_W<GPIO_SPEC> {
171171
FUN_WPU_W::new(self, 8)
172172
}
173173
#[doc = "Bit 9 - need des"]
174174
#[inline(always)]
175175
#[must_use]
176-
pub fn fun_ie(&mut self) -> FUN_IE_W<GPIO0_SPEC> {
176+
pub fn fun_ie(&mut self) -> FUN_IE_W<GPIO_SPEC> {
177177
FUN_IE_W::new(self, 9)
178178
}
179179
#[doc = "Bits 10:11 - need des"]
180180
#[inline(always)]
181181
#[must_use]
182-
pub fn fun_drv(&mut self) -> FUN_DRV_W<GPIO0_SPEC> {
182+
pub fn fun_drv(&mut self) -> FUN_DRV_W<GPIO_SPEC> {
183183
FUN_DRV_W::new(self, 10)
184184
}
185185
#[doc = "Bits 12:14 - need des"]
186186
#[inline(always)]
187187
#[must_use]
188-
pub fn mcu_sel(&mut self) -> MCU_SEL_W<GPIO0_SPEC> {
188+
pub fn mcu_sel(&mut self) -> MCU_SEL_W<GPIO_SPEC> {
189189
MCU_SEL_W::new(self, 12)
190190
}
191191
}
192-
#[doc = "need des\n\nYou can [`read`](crate::Reg::read) this register and get [`gpio0::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`gpio0::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
193-
pub struct GPIO0_SPEC;
194-
impl crate::RegisterSpec for GPIO0_SPEC {
192+
#[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)."]
193+
pub struct GPIO_SPEC;
194+
impl crate::RegisterSpec for GPIO_SPEC {
195195
type Ux = u32;
196196
}
197-
#[doc = "`read()` method returns [`gpio0::R`](R) reader structure"]
198-
impl crate::Readable for GPIO0_SPEC {}
199-
#[doc = "`write(|w| ..)` method takes [`gpio0::W`](W) writer structure"]
200-
impl crate::Writable for GPIO0_SPEC {
197+
#[doc = "`read()` method returns [`gpio::R`](R) reader structure"]
198+
impl crate::Readable for GPIO_SPEC {}
199+
#[doc = "`write(|w| ..)` method takes [`gpio::W`](W) writer structure"]
200+
impl crate::Writable for GPIO_SPEC {
201201
type Safety = crate::Unsafe;
202202
const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
203203
const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
204204
}
205-
#[doc = "`reset()` method sets GPIO0 to value 0"]
206-
impl crate::Resettable for GPIO0_SPEC {
205+
#[doc = "`reset()` method sets GPIO%s to value 0"]
206+
impl crate::Resettable for GPIO_SPEC {
207207
const RESET_VALUE: u32 = 0;
208208
}

‎esp32c6/src/lp_io/gpio1.rs

-208
This file was deleted.

‎esp32c6/src/lp_io/gpio2.rs

-208
This file was deleted.

‎esp32c6/src/lp_io/gpio3.rs

-208
This file was deleted.

‎esp32c6/src/lp_io/gpio4.rs

-208
This file was deleted.

‎esp32c6/src/lp_io/gpio5.rs

-208
This file was deleted.

‎esp32c6/src/lp_io/gpio6.rs

-208
This file was deleted.

‎esp32c6/src/lp_io/gpio7.rs

-208
This file was deleted.

‎esp32c6/src/lp_io/pin0.rs ‎esp32c6/src/lp_io/pin.rs

+20-20
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
#[doc = "Register `PIN0` reader"]
2-
pub type R = crate::R<PIN0_SPEC>;
3-
#[doc = "Register `PIN0` writer"]
4-
pub type W = crate::W<PIN0_SPEC>;
1+
#[doc = "Register `PIN%s` reader"]
2+
pub type R = crate::R<PIN_SPEC>;
3+
#[doc = "Register `PIN%s` writer"]
4+
pub type W = crate::W<PIN_SPEC>;
55
#[doc = "Field `SYNC_BYPASS` reader - need des"]
66
pub type SYNC_BYPASS_R = crate::FieldReader;
77
#[doc = "Field `SYNC_BYPASS` writer - need des"]
@@ -54,7 +54,7 @@ impl R {
5454
#[cfg(feature = "impl-register-debug")]
5555
impl core::fmt::Debug for R {
5656
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
57-
f.debug_struct("PIN0")
57+
f.debug_struct("PIN")
5858
.field("sync_bypass", &self.sync_bypass())
5959
.field("pad_driver", &self.pad_driver())
6060
.field("int_type", &self.int_type())
@@ -67,54 +67,54 @@ impl W {
6767
#[doc = "Bits 0:1 - need des"]
6868
#[inline(always)]
6969
#[must_use]
70-
pub fn sync_bypass(&mut self) -> SYNC_BYPASS_W<PIN0_SPEC> {
70+
pub fn sync_bypass(&mut self) -> SYNC_BYPASS_W<PIN_SPEC> {
7171
SYNC_BYPASS_W::new(self, 0)
7272
}
7373
#[doc = "Bit 2 - need des"]
7474
#[inline(always)]
7575
#[must_use]
76-
pub fn pad_driver(&mut self) -> PAD_DRIVER_W<PIN0_SPEC> {
76+
pub fn pad_driver(&mut self) -> PAD_DRIVER_W<PIN_SPEC> {
7777
PAD_DRIVER_W::new(self, 2)
7878
}
7979
#[doc = "Bit 3 - need des"]
8080
#[inline(always)]
8181
#[must_use]
82-
pub fn edge_wakeup_clr(&mut self) -> EDGE_WAKEUP_CLR_W<PIN0_SPEC> {
82+
pub fn edge_wakeup_clr(&mut self) -> EDGE_WAKEUP_CLR_W<PIN_SPEC> {
8383
EDGE_WAKEUP_CLR_W::new(self, 3)
8484
}
8585
#[doc = "Bits 7:9 - need des"]
8686
#[inline(always)]
8787
#[must_use]
88-
pub fn int_type(&mut self) -> INT_TYPE_W<PIN0_SPEC> {
88+
pub fn int_type(&mut self) -> INT_TYPE_W<PIN_SPEC> {
8989
INT_TYPE_W::new(self, 7)
9090
}
9191
#[doc = "Bit 10 - need des"]
9292
#[inline(always)]
9393
#[must_use]
94-
pub fn wakeup_enable(&mut self) -> WAKEUP_ENABLE_W<PIN0_SPEC> {
94+
pub fn wakeup_enable(&mut self) -> WAKEUP_ENABLE_W<PIN_SPEC> {
9595
WAKEUP_ENABLE_W::new(self, 10)
9696
}
9797
#[doc = "Bit 11 - need des"]
9898
#[inline(always)]
9999
#[must_use]
100-
pub fn filter_en(&mut self) -> FILTER_EN_W<PIN0_SPEC> {
100+
pub fn filter_en(&mut self) -> FILTER_EN_W<PIN_SPEC> {
101101
FILTER_EN_W::new(self, 11)
102102
}
103103
}
104-
#[doc = "need des\n\nYou can [`read`](crate::Reg::read) this register and get [`pin0::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pin0::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
105-
pub struct PIN0_SPEC;
106-
impl crate::RegisterSpec for PIN0_SPEC {
104+
#[doc = "need des\n\nYou can [`read`](crate::Reg::read) this register and get [`pin::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pin::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
105+
pub struct PIN_SPEC;
106+
impl crate::RegisterSpec for PIN_SPEC {
107107
type Ux = u32;
108108
}
109-
#[doc = "`read()` method returns [`pin0::R`](R) reader structure"]
110-
impl crate::Readable for PIN0_SPEC {}
111-
#[doc = "`write(|w| ..)` method takes [`pin0::W`](W) writer structure"]
112-
impl crate::Writable for PIN0_SPEC {
109+
#[doc = "`read()` method returns [`pin::R`](R) reader structure"]
110+
impl crate::Readable for PIN_SPEC {}
111+
#[doc = "`write(|w| ..)` method takes [`pin::W`](W) writer structure"]
112+
impl crate::Writable for PIN_SPEC {
113113
type Safety = crate::Unsafe;
114114
const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
115115
const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
116116
}
117-
#[doc = "`reset()` method sets PIN0 to value 0"]
118-
impl crate::Resettable for PIN0_SPEC {
117+
#[doc = "`reset()` method sets PIN%s to value 0"]
118+
impl crate::Resettable for PIN_SPEC {
119119
const RESET_VALUE: u32 = 0;
120120
}

‎esp32c6/src/lp_io/pin1.rs

-120
This file was deleted.

‎esp32c6/src/lp_io/pin2.rs

-120
This file was deleted.

‎esp32c6/src/lp_io/pin3.rs

-120
This file was deleted.

‎esp32c6/src/lp_io/pin4.rs

-120
This file was deleted.

‎esp32c6/src/lp_io/pin5.rs

-120
This file was deleted.

‎esp32c6/src/lp_io/pin6.rs

-120
This file was deleted.

‎esp32c6/src/lp_io/pin7.rs

-120
This file was deleted.

‎esp32c6/svd/patches/esp32c6.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,11 @@ LP_I2C0:
236236
COMD?: {}
237237
_include: ../../../common_patches/int_strip.yaml
238238

239+
LP_IO:
240+
_array:
241+
GPIO?: {}
242+
PIN?: {}
243+
239244
LP_WDT:
240245
_modify:
241246
INT_ST_RTC:

0 commit comments

Comments
 (0)
Please sign in to comment.