esp32h2/
lp_apm.rs

1#[repr(C)]
2#[cfg_attr(feature = "impl-register-debug", derive(Debug))]
3#[doc = "Register block"]
4pub struct RegisterBlock {
5    region_filter_en: REGION_FILTER_EN,
6    region: [REGION; 2],
7    _reserved2: [u8; 0xa8],
8    func_ctrl: FUNC_CTRL,
9    m: [M; 1],
10    _reserved4: [u8; 0x10],
11    int_en: INT_EN,
12    clock_gate: CLOCK_GATE,
13    _reserved6: [u8; 0x0c],
14    date: DATE,
15}
16impl RegisterBlock {
17    #[doc = "0x00 - Region filter enable register"]
18    #[inline(always)]
19    pub const fn region_filter_en(&self) -> &REGION_FILTER_EN {
20        &self.region_filter_en
21    }
22    #[doc = "0x04..0x1c - Cluster REGION%s, containing REGION*_ADDR_START, REGION*_ADDR_END, REGION*_PMS_ATTR"]
23    #[inline(always)]
24    pub const fn region(&self, n: usize) -> &REGION {
25        &self.region[n]
26    }
27    #[doc = "Iterator for array of:"]
28    #[doc = "0x04..0x1c - Cluster REGION%s, containing REGION*_ADDR_START, REGION*_ADDR_END, REGION*_PMS_ATTR"]
29    #[inline(always)]
30    pub fn region_iter(&self) -> impl Iterator<Item = &REGION> {
31        self.region.iter()
32    }
33    #[doc = "0xc4 - PMS function control register"]
34    #[inline(always)]
35    pub const fn func_ctrl(&self) -> &FUNC_CTRL {
36        &self.func_ctrl
37    }
38    #[doc = "0xc8..0xd8 - Cluster M%s, containing M?_STATUS, M?_STATUS_CLR, M?_EXCEPTION_INFO0, M?_EXCEPTION_INFO1"]
39    #[inline(always)]
40    pub const fn m(&self, n: usize) -> &M {
41        &self.m[n]
42    }
43    #[doc = "Iterator for array of:"]
44    #[doc = "0xc8..0xd8 - Cluster M%s, containing M?_STATUS, M?_STATUS_CLR, M?_EXCEPTION_INFO0, M?_EXCEPTION_INFO1"]
45    #[inline(always)]
46    pub fn m_iter(&self) -> impl Iterator<Item = &M> {
47        self.m.iter()
48    }
49    #[doc = "0xe8 - APM interrupt enable register"]
50    #[inline(always)]
51    pub const fn int_en(&self) -> &INT_EN {
52        &self.int_en
53    }
54    #[doc = "0xec - clock gating register"]
55    #[inline(always)]
56    pub const fn clock_gate(&self) -> &CLOCK_GATE {
57        &self.clock_gate
58    }
59    #[doc = "0xfc - Version register"]
60    #[inline(always)]
61    pub const fn date(&self) -> &DATE {
62        &self.date
63    }
64}
65#[doc = "REGION_FILTER_EN (rw) register accessor: Region filter enable register\n\nYou can [`read`](crate::Reg::read) this register and get [`region_filter_en::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`region_filter_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@region_filter_en`] module"]
66pub type REGION_FILTER_EN = crate::Reg<region_filter_en::REGION_FILTER_EN_SPEC>;
67#[doc = "Region filter enable register"]
68pub mod region_filter_en;
69#[doc = "Cluster REGION%s, containing REGION*_ADDR_START, REGION*_ADDR_END, REGION*_PMS_ATTR"]
70pub use self::region::REGION;
71#[doc = r"Cluster"]
72#[doc = "Cluster REGION%s, containing REGION*_ADDR_START, REGION*_ADDR_END, REGION*_PMS_ATTR"]
73pub mod region;
74#[doc = "FUNC_CTRL (rw) register accessor: PMS function control register\n\nYou can [`read`](crate::Reg::read) this register and get [`func_ctrl::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`func_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@func_ctrl`] module"]
75pub type FUNC_CTRL = crate::Reg<func_ctrl::FUNC_CTRL_SPEC>;
76#[doc = "PMS function control register"]
77pub mod func_ctrl;
78#[doc = "Cluster M%s, containing M?_STATUS, M?_STATUS_CLR, M?_EXCEPTION_INFO0, M?_EXCEPTION_INFO1"]
79pub use self::m::M;
80#[doc = r"Cluster"]
81#[doc = "Cluster M%s, containing M?_STATUS, M?_STATUS_CLR, M?_EXCEPTION_INFO0, M?_EXCEPTION_INFO1"]
82pub mod m;
83#[doc = "INT_EN (rw) register accessor: APM interrupt enable register\n\nYou can [`read`](crate::Reg::read) this register and get [`int_en::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`int_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@int_en`] module"]
84pub type INT_EN = crate::Reg<int_en::INT_EN_SPEC>;
85#[doc = "APM interrupt enable register"]
86pub mod int_en;
87#[doc = "CLOCK_GATE (rw) register accessor: clock gating register\n\nYou can [`read`](crate::Reg::read) this register and get [`clock_gate::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`clock_gate::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@clock_gate`] module"]
88pub type CLOCK_GATE = crate::Reg<clock_gate::CLOCK_GATE_SPEC>;
89#[doc = "clock gating register"]
90pub mod clock_gate;
91#[doc = "DATE (rw) register accessor: Version 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"]
92pub type DATE = crate::Reg<date::DATE_SPEC>;
93#[doc = "Version register"]
94pub mod date;