esp32h2/
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; 28],
7    _reserved2: [u8; 0x48],
8    modem_diag_en: MODEM_DIAG_EN,
9    _reserved3: [u8; 0x3c],
10    date: DATE,
11}
12impl RegisterBlock {
13    #[doc = "0x00 - Clock Output Configuration Register"]
14    #[inline(always)]
15    pub const fn pin_ctrl(&self) -> &PIN_CTRL {
16        &self.pin_ctrl
17    }
18    #[doc = "0x04..0x74 - IO MUX Configure Register for pad GPIO0"]
19    #[inline(always)]
20    pub const fn gpio(&self, n: usize) -> &GPIO {
21        &self.gpio[n]
22    }
23    #[doc = "Iterator for array of:"]
24    #[doc = "0x04..0x74 - IO MUX Configure Register for pad GPIO0"]
25    #[inline(always)]
26    pub fn gpio_iter(&self) -> impl Iterator<Item = &GPIO> {
27        self.gpio.iter()
28    }
29    #[doc = "0xbc - GPIO MATRIX Configure Register for modem diag"]
30    #[inline(always)]
31    pub const fn modem_diag_en(&self) -> &MODEM_DIAG_EN {
32        &self.modem_diag_en
33    }
34    #[doc = "0xfc - IO MUX Version Control Register"]
35    #[inline(always)]
36    pub const fn date(&self) -> &DATE {
37        &self.date
38    }
39}
40#[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"]
41pub type PIN_CTRL = crate::Reg<pin_ctrl::PIN_CTRL_SPEC>;
42#[doc = "Clock Output Configuration Register"]
43pub mod pin_ctrl;
44#[doc = "GPIO (rw) register accessor: IO MUX Configure Register for pad GPIO0\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"]
45pub type GPIO = crate::Reg<gpio::GPIO_SPEC>;
46#[doc = "IO MUX Configure Register for pad GPIO0"]
47pub mod gpio;
48#[doc = "MODEM_DIAG_EN (rw) register accessor: GPIO MATRIX Configure Register for modem diag\n\nYou can [`read`](crate::Reg::read) this register and get [`modem_diag_en::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`modem_diag_en::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@modem_diag_en`] module"]
49pub type MODEM_DIAG_EN = crate::Reg<modem_diag_en::MODEM_DIAG_EN_SPEC>;
50#[doc = "GPIO MATRIX Configure Register for modem diag"]
51pub mod modem_diag_en;
52#[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"]
53pub type DATE = crate::Reg<date::DATE_SPEC>;
54#[doc = "IO MUX Version Control Register"]
55pub mod date;