esp32c3/
io_mux.rs

1#[repr(C)]
2#[cfg_attr(feature = "impl-register-debug", derive(Debug))]
3#[doc = "Register block"]
4pub struct RegisterBlock {
5    pin_ctrl: PIN_CTRL,
6    gpio: [GPIO; 22],
7    _reserved2: [u8; 0xa0],
8    date: DATE,
9}
10impl RegisterBlock {
11    #[doc = "0x00 - Clock Output Configuration Register"]
12    #[inline(always)]
13    pub const fn pin_ctrl(&self) -> &PIN_CTRL {
14        &self.pin_ctrl
15    }
16    #[doc = "0x04..0x5c - IO MUX Configure Register for pad XTAL_32K_P"]
17    #[inline(always)]
18    pub const fn gpio(&self, n: usize) -> &GPIO {
19        &self.gpio[n]
20    }
21    #[doc = "Iterator for array of:"]
22    #[doc = "0x04..0x5c - IO MUX Configure Register for pad XTAL_32K_P"]
23    #[inline(always)]
24    pub fn gpio_iter(&self) -> impl Iterator<Item = &GPIO> {
25        self.gpio.iter()
26    }
27    #[doc = "0xfc - IO MUX Version Control Register"]
28    #[inline(always)]
29    pub const fn date(&self) -> &DATE {
30        &self.date
31    }
32}
33#[doc = "PIN_CTRL (rw) register accessor: Clock Output Configuration Register\n\nYou can [`read`](crate::Reg::read) this register and get [`pin_ctrl::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pin_ctrl::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_ctrl`] module"]
34pub type PIN_CTRL = crate::Reg<pin_ctrl::PIN_CTRL_SPEC>;
35#[doc = "Clock Output Configuration Register"]
36pub mod pin_ctrl;
37#[doc = "GPIO (rw) register accessor: IO MUX Configure Register for pad XTAL_32K_P\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"]
38pub type GPIO = crate::Reg<gpio::GPIO_SPEC>;
39#[doc = "IO MUX Configure Register for pad XTAL_32K_P"]
40pub mod gpio;
41#[doc = "DATE (rw) register accessor: IO MUX Version Control Register\n\nYou can [`read`](crate::Reg::read) this register and get [`date::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`date::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@date`] module"]
42pub type DATE = crate::Reg<date::DATE_SPEC>;
43#[doc = "IO MUX Version Control Register"]
44pub mod date;