stm32g0/stm32g0b0/tamp.rs
1#[repr(C)]
2#[derive(Debug)]
3///Register block
4pub struct RegisterBlock {
5 cr1: CR1,
6 cr2: CR2,
7 _reserved2: [u8; 0x04],
8 fltcr: FLTCR,
9 _reserved3: [u8; 0x1c],
10 ier: IER,
11 sr: SR,
12 misr: MISR,
13 _reserved6: [u8; 0x04],
14 scr: SCR,
15 _reserved7: [u8; 0xc0],
16 bkpr: [BKPR; 5],
17}
18impl RegisterBlock {
19 ///0x00 - TAMP control register 1
20 #[inline(always)]
21 pub const fn cr1(&self) -> &CR1 {
22 &self.cr1
23 }
24 ///0x04 - TAMP control register 2
25 #[inline(always)]
26 pub const fn cr2(&self) -> &CR2 {
27 &self.cr2
28 }
29 ///0x0c - TAMP filter control register
30 #[inline(always)]
31 pub const fn fltcr(&self) -> &FLTCR {
32 &self.fltcr
33 }
34 ///0x2c - TAMP interrupt enable register
35 #[inline(always)]
36 pub const fn ier(&self) -> &IER {
37 &self.ier
38 }
39 ///0x30 - TAMP status register
40 #[inline(always)]
41 pub const fn sr(&self) -> &SR {
42 &self.sr
43 }
44 ///0x34 - TAMP masked interrupt status register
45 #[inline(always)]
46 pub const fn misr(&self) -> &MISR {
47 &self.misr
48 }
49 ///0x3c - TAMP status clear register
50 #[inline(always)]
51 pub const fn scr(&self) -> &SCR {
52 &self.scr
53 }
54 ///0x100..0x114 - TAMP backup %s register
55 #[inline(always)]
56 pub const fn bkpr(&self, n: usize) -> &BKPR {
57 &self.bkpr[n]
58 }
59 ///Iterator for array of:
60 ///0x100..0x114 - TAMP backup %s register
61 #[inline(always)]
62 pub fn bkpr_iter(&self) -> impl Iterator<Item = &BKPR> {
63 self.bkpr.iter()
64 }
65 ///0x100 - TAMP backup 0 register
66 #[inline(always)]
67 pub const fn bkp0r(&self) -> &BKPR {
68 self.bkpr(0)
69 }
70 ///0x104 - TAMP backup 1 register
71 #[inline(always)]
72 pub const fn bkp1r(&self) -> &BKPR {
73 self.bkpr(1)
74 }
75 ///0x108 - TAMP backup 2 register
76 #[inline(always)]
77 pub const fn bkp2r(&self) -> &BKPR {
78 self.bkpr(2)
79 }
80 ///0x10c - TAMP backup 3 register
81 #[inline(always)]
82 pub const fn bkp3r(&self) -> &BKPR {
83 self.bkpr(3)
84 }
85 ///0x110 - TAMP backup 4 register
86 #[inline(always)]
87 pub const fn bkp4r(&self) -> &BKPR {
88 self.bkpr(4)
89 }
90}
91/**CR1 (rw) register accessor: TAMP control register 1
92
93You can [`read`](crate::Reg::read) this register and get [`cr1::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`cr1::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
94
95See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G0B0.html#TAMP:CR1)
96
97For information about available fields see [`mod@cr1`] module*/
98pub type CR1 = crate::Reg<cr1::CR1rs>;
99///TAMP control register 1
100pub mod cr1;
101/**CR2 (rw) register accessor: TAMP control register 2
102
103You can [`read`](crate::Reg::read) this register and get [`cr2::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`cr2::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
104
105See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G0B0.html#TAMP:CR2)
106
107For information about available fields see [`mod@cr2`] module*/
108pub type CR2 = crate::Reg<cr2::CR2rs>;
109///TAMP control register 2
110pub mod cr2;
111/**FLTCR (rw) register accessor: TAMP filter control register
112
113You can [`read`](crate::Reg::read) this register and get [`fltcr::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`fltcr::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
114
115See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G0B0.html#TAMP:FLTCR)
116
117For information about available fields see [`mod@fltcr`] module*/
118pub type FLTCR = crate::Reg<fltcr::FLTCRrs>;
119///TAMP filter control register
120pub mod fltcr;
121/**IER (rw) register accessor: TAMP interrupt enable register
122
123You can [`read`](crate::Reg::read) this register and get [`ier::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ier::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
124
125See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G0B0.html#TAMP:IER)
126
127For information about available fields see [`mod@ier`] module*/
128pub type IER = crate::Reg<ier::IERrs>;
129///TAMP interrupt enable register
130pub mod ier;
131/**SR (r) register accessor: TAMP status register
132
133You can [`read`](crate::Reg::read) this register and get [`sr::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
134
135See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G0B0.html#TAMP:SR)
136
137For information about available fields see [`mod@sr`] module*/
138pub type SR = crate::Reg<sr::SRrs>;
139///TAMP status register
140pub mod sr;
141/**MISR (r) register accessor: TAMP masked interrupt status register
142
143You can [`read`](crate::Reg::read) this register and get [`misr::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
144
145See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G0B0.html#TAMP:MISR)
146
147For information about available fields see [`mod@misr`] module*/
148pub type MISR = crate::Reg<misr::MISRrs>;
149///TAMP masked interrupt status register
150pub mod misr;
151/**SCR (w) register accessor: TAMP status clear register
152
153You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`scr::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
154
155See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G0B0.html#TAMP:SCR)
156
157For information about available fields see [`mod@scr`] module*/
158pub type SCR = crate::Reg<scr::SCRrs>;
159///TAMP status clear register
160pub mod scr;
161/**BKPR (rw) register accessor: TAMP backup %s register
162
163You can [`read`](crate::Reg::read) this register and get [`bkpr::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`bkpr::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
164
165See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G0B0.html#TAMP:BKP[0]R)
166
167For information about available fields see [`mod@bkpr`] module*/
168pub type BKPR = crate::Reg<bkpr::BKPRrs>;
169///TAMP backup %s register
170pub mod bkpr;