1#[repr(C)]
2#[doc = "Register block"]
3pub struct RegisterBlock {
4 ctrl: Ctrl,
5 sleep: Sleep,
6 _reserved2: [u8; 0x06],
7 cpusel: Cpusel,
8 apbasel: Apbasel,
9 apbbsel: Apbbsel,
10 apbcsel: Apbcsel,
11 _reserved6: [u8; 0x08],
12 ahbmask: Ahbmask,
13 apbamask: Apbamask,
14 apbbmask: Apbbmask,
15 apbcmask: Apbcmask,
16 _reserved10: [u8; 0x10],
17 intenclr: Intenclr,
18 intenset: Intenset,
19 intflag: Intflag,
20 _reserved13: [u8; 0x01],
21 rcause: Rcause,
22}
23impl RegisterBlock {
24 #[doc = "0x00 - Control"]
25 #[inline(always)]
26 pub const fn ctrl(&self) -> &Ctrl {
27 &self.ctrl
28 }
29 #[doc = "0x01 - Sleep Mode"]
30 #[inline(always)]
31 pub const fn sleep(&self) -> &Sleep {
32 &self.sleep
33 }
34 #[doc = "0x08 - CPU Clock Select"]
35 #[inline(always)]
36 pub const fn cpusel(&self) -> &Cpusel {
37 &self.cpusel
38 }
39 #[doc = "0x09 - APBA Clock Select"]
40 #[inline(always)]
41 pub const fn apbasel(&self) -> &Apbasel {
42 &self.apbasel
43 }
44 #[doc = "0x0a - APBB Clock Select"]
45 #[inline(always)]
46 pub const fn apbbsel(&self) -> &Apbbsel {
47 &self.apbbsel
48 }
49 #[doc = "0x0b - APBC Clock Select"]
50 #[inline(always)]
51 pub const fn apbcsel(&self) -> &Apbcsel {
52 &self.apbcsel
53 }
54 #[doc = "0x14 - AHB Mask"]
55 #[inline(always)]
56 pub const fn ahbmask(&self) -> &Ahbmask {
57 &self.ahbmask
58 }
59 #[doc = "0x18 - APBA Mask"]
60 #[inline(always)]
61 pub const fn apbamask(&self) -> &Apbamask {
62 &self.apbamask
63 }
64 #[doc = "0x1c - APBB Mask"]
65 #[inline(always)]
66 pub const fn apbbmask(&self) -> &Apbbmask {
67 &self.apbbmask
68 }
69 #[doc = "0x20 - APBC Mask"]
70 #[inline(always)]
71 pub const fn apbcmask(&self) -> &Apbcmask {
72 &self.apbcmask
73 }
74 #[doc = "0x34 - Interrupt Enable Clear"]
75 #[inline(always)]
76 pub const fn intenclr(&self) -> &Intenclr {
77 &self.intenclr
78 }
79 #[doc = "0x35 - Interrupt Enable Set"]
80 #[inline(always)]
81 pub const fn intenset(&self) -> &Intenset {
82 &self.intenset
83 }
84 #[doc = "0x36 - Interrupt Flag Status and Clear"]
85 #[inline(always)]
86 pub const fn intflag(&self) -> &Intflag {
87 &self.intflag
88 }
89 #[doc = "0x38 - Reset Cause"]
90 #[inline(always)]
91 pub const fn rcause(&self) -> &Rcause {
92 &self.rcause
93 }
94}
95#[doc = "CTRL (rw) register accessor: Control\n\nYou can [`read`](crate::Reg::read) this register and get [`ctrl::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`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@ctrl`]
96module"]
97#[doc(alias = "CTRL")]
98pub type Ctrl = crate::Reg<ctrl::CtrlSpec>;
99#[doc = "Control"]
100pub mod ctrl;
101#[doc = "SLEEP (rw) register accessor: Sleep Mode\n\nYou can [`read`](crate::Reg::read) this register and get [`sleep::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`sleep::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@sleep`]
102module"]
103#[doc(alias = "SLEEP")]
104pub type Sleep = crate::Reg<sleep::SleepSpec>;
105#[doc = "Sleep Mode"]
106pub mod sleep;
107#[doc = "CPUSEL (rw) register accessor: CPU Clock Select\n\nYou can [`read`](crate::Reg::read) this register and get [`cpusel::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`cpusel::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@cpusel`]
108module"]
109#[doc(alias = "CPUSEL")]
110pub type Cpusel = crate::Reg<cpusel::CpuselSpec>;
111#[doc = "CPU Clock Select"]
112pub mod cpusel;
113#[doc = "APBASEL (rw) register accessor: APBA Clock Select\n\nYou can [`read`](crate::Reg::read) this register and get [`apbasel::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`apbasel::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@apbasel`]
114module"]
115#[doc(alias = "APBASEL")]
116pub type Apbasel = crate::Reg<apbasel::ApbaselSpec>;
117#[doc = "APBA Clock Select"]
118pub mod apbasel;
119#[doc = "APBBSEL (rw) register accessor: APBB Clock Select\n\nYou can [`read`](crate::Reg::read) this register and get [`apbbsel::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`apbbsel::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@apbbsel`]
120module"]
121#[doc(alias = "APBBSEL")]
122pub type Apbbsel = crate::Reg<apbbsel::ApbbselSpec>;
123#[doc = "APBB Clock Select"]
124pub mod apbbsel;
125#[doc = "APBCSEL (rw) register accessor: APBC Clock Select\n\nYou can [`read`](crate::Reg::read) this register and get [`apbcsel::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`apbcsel::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@apbcsel`]
126module"]
127#[doc(alias = "APBCSEL")]
128pub type Apbcsel = crate::Reg<apbcsel::ApbcselSpec>;
129#[doc = "APBC Clock Select"]
130pub mod apbcsel;
131#[doc = "AHBMASK (rw) register accessor: AHB Mask\n\nYou can [`read`](crate::Reg::read) this register and get [`ahbmask::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ahbmask::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@ahbmask`]
132module"]
133#[doc(alias = "AHBMASK")]
134pub type Ahbmask = crate::Reg<ahbmask::AhbmaskSpec>;
135#[doc = "AHB Mask"]
136pub mod ahbmask;
137#[doc = "APBAMASK (rw) register accessor: APBA Mask\n\nYou can [`read`](crate::Reg::read) this register and get [`apbamask::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`apbamask::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@apbamask`]
138module"]
139#[doc(alias = "APBAMASK")]
140pub type Apbamask = crate::Reg<apbamask::ApbamaskSpec>;
141#[doc = "APBA Mask"]
142pub mod apbamask;
143#[doc = "APBBMASK (rw) register accessor: APBB Mask\n\nYou can [`read`](crate::Reg::read) this register and get [`apbbmask::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`apbbmask::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@apbbmask`]
144module"]
145#[doc(alias = "APBBMASK")]
146pub type Apbbmask = crate::Reg<apbbmask::ApbbmaskSpec>;
147#[doc = "APBB Mask"]
148pub mod apbbmask;
149#[doc = "APBCMASK (rw) register accessor: APBC Mask\n\nYou can [`read`](crate::Reg::read) this register and get [`apbcmask::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`apbcmask::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@apbcmask`]
150module"]
151#[doc(alias = "APBCMASK")]
152pub type Apbcmask = crate::Reg<apbcmask::ApbcmaskSpec>;
153#[doc = "APBC Mask"]
154pub mod apbcmask;
155#[doc = "INTENCLR (rw) register accessor: Interrupt Enable Clear\n\nYou can [`read`](crate::Reg::read) this register and get [`intenclr::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`intenclr::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@intenclr`]
156module"]
157#[doc(alias = "INTENCLR")]
158pub type Intenclr = crate::Reg<intenclr::IntenclrSpec>;
159#[doc = "Interrupt Enable Clear"]
160pub mod intenclr;
161#[doc = "INTENSET (rw) register accessor: Interrupt Enable Set\n\nYou can [`read`](crate::Reg::read) this register and get [`intenset::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`intenset::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@intenset`]
162module"]
163#[doc(alias = "INTENSET")]
164pub type Intenset = crate::Reg<intenset::IntensetSpec>;
165#[doc = "Interrupt Enable Set"]
166pub mod intenset;
167#[doc = "INTFLAG (rw) register accessor: Interrupt Flag Status and Clear\n\nYou can [`read`](crate::Reg::read) this register and get [`intflag::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`intflag::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@intflag`]
168module"]
169#[doc(alias = "INTFLAG")]
170pub type Intflag = crate::Reg<intflag::IntflagSpec>;
171#[doc = "Interrupt Flag Status and Clear"]
172pub mod intflag;
173#[doc = "RCAUSE (r) register accessor: Reset Cause\n\nYou can [`read`](crate::Reg::read) this register and get [`rcause::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@rcause`]
174module"]
175#[doc(alias = "RCAUSE")]
176pub type Rcause = crate::Reg<rcause::RcauseSpec>;
177#[doc = "Reset Cause"]
178pub mod rcause;