stm32f1_staging/stm32f101/
rtc.rs

1#[repr(C)]
2#[derive(Debug)]
3///Register block
4pub struct RegisterBlock {
5    crh: CRH,
6    crl: CRL,
7    prlh: PRLH,
8    prll: PRLL,
9    divh: DIVH,
10    divl: DIVL,
11    cnth: CNTH,
12    cntl: CNTL,
13    alrh: ALRH,
14    alrl: ALRL,
15}
16impl RegisterBlock {
17    ///0x00 - RTC Control Register High
18    #[inline(always)]
19    pub const fn crh(&self) -> &CRH {
20        &self.crh
21    }
22    ///0x04 - RTC Control Register Low
23    #[inline(always)]
24    pub const fn crl(&self) -> &CRL {
25        &self.crl
26    }
27    ///0x08 - RTC Prescaler Load Register High
28    #[inline(always)]
29    pub const fn prlh(&self) -> &PRLH {
30        &self.prlh
31    }
32    ///0x0c - RTC Prescaler Load Register Low
33    #[inline(always)]
34    pub const fn prll(&self) -> &PRLL {
35        &self.prll
36    }
37    ///0x10 - RTC Prescaler Divider Register High
38    #[inline(always)]
39    pub const fn divh(&self) -> &DIVH {
40        &self.divh
41    }
42    ///0x14 - RTC Prescaler Divider Register Low
43    #[inline(always)]
44    pub const fn divl(&self) -> &DIVL {
45        &self.divl
46    }
47    ///0x18 - RTC Counter Register High
48    #[inline(always)]
49    pub const fn cnth(&self) -> &CNTH {
50        &self.cnth
51    }
52    ///0x1c - RTC Counter Register Low
53    #[inline(always)]
54    pub const fn cntl(&self) -> &CNTL {
55        &self.cntl
56    }
57    ///0x20 - RTC Alarm Register High
58    #[inline(always)]
59    pub const fn alrh(&self) -> &ALRH {
60        &self.alrh
61    }
62    ///0x24 - RTC Alarm Register Low
63    #[inline(always)]
64    pub const fn alrl(&self) -> &ALRL {
65        &self.alrl
66    }
67}
68/**CRH (rw) register accessor: RTC Control Register High
69
70You can [`read`](crate::Reg::read) this register and get [`crh::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`crh::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
71
72See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F101.html#RTC:CRH)
73
74For information about available fields see [`mod@crh`] module*/
75pub type CRH = crate::Reg<crh::CRHrs>;
76///RTC Control Register High
77pub mod crh;
78/**CRL (rw) register accessor: RTC Control Register Low
79
80You can [`read`](crate::Reg::read) this register and get [`crl::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`crl::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
81
82See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F101.html#RTC:CRL)
83
84For information about available fields see [`mod@crl`] module*/
85pub type CRL = crate::Reg<crl::CRLrs>;
86///RTC Control Register Low
87pub mod crl;
88/**PRLH (w) register accessor: RTC Prescaler Load Register High
89
90You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`prlh::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
91
92See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F101.html#RTC:PRLH)
93
94For information about available fields see [`mod@prlh`] module*/
95pub type PRLH = crate::Reg<prlh::PRLHrs>;
96///RTC Prescaler Load Register High
97pub mod prlh;
98/**PRLL (w) register accessor: RTC Prescaler Load Register Low
99
100You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`prll::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
101
102See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F101.html#RTC:PRLL)
103
104For information about available fields see [`mod@prll`] module*/
105pub type PRLL = crate::Reg<prll::PRLLrs>;
106///RTC Prescaler Load Register Low
107pub mod prll;
108/**DIVH (r) register accessor: RTC Prescaler Divider Register High
109
110You can [`read`](crate::Reg::read) this register and get [`divh::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
111
112See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F101.html#RTC:DIVH)
113
114For information about available fields see [`mod@divh`] module*/
115pub type DIVH = crate::Reg<divh::DIVHrs>;
116///RTC Prescaler Divider Register High
117pub mod divh;
118/**DIVL (r) register accessor: RTC Prescaler Divider Register Low
119
120You can [`read`](crate::Reg::read) this register and get [`divl::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
121
122See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F101.html#RTC:DIVL)
123
124For information about available fields see [`mod@divl`] module*/
125pub type DIVL = crate::Reg<divl::DIVLrs>;
126///RTC Prescaler Divider Register Low
127pub mod divl;
128/**CNTH (rw) register accessor: RTC Counter Register High
129
130You can [`read`](crate::Reg::read) this register and get [`cnth::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`cnth::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
131
132See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F101.html#RTC:CNTH)
133
134For information about available fields see [`mod@cnth`] module*/
135pub type CNTH = crate::Reg<cnth::CNTHrs>;
136///RTC Counter Register High
137pub mod cnth;
138/**CNTL (rw) register accessor: RTC Counter Register Low
139
140You can [`read`](crate::Reg::read) this register and get [`cntl::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`cntl::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
141
142See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F101.html#RTC:CNTL)
143
144For information about available fields see [`mod@cntl`] module*/
145pub type CNTL = crate::Reg<cntl::CNTLrs>;
146///RTC Counter Register Low
147pub mod cntl;
148/**ALRH (w) register accessor: RTC Alarm Register High
149
150You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`alrh::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
151
152See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F101.html#RTC:ALRH)
153
154For information about available fields see [`mod@alrh`] module*/
155pub type ALRH = crate::Reg<alrh::ALRHrs>;
156///RTC Alarm Register High
157pub mod alrh;
158/**ALRL (w) register accessor: RTC Alarm Register Low
159
160You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`alrl::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
161
162See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F101.html#RTC:ALRL)
163
164For information about available fields see [`mod@alrl`] module*/
165pub type ALRL = crate::Reg<alrl::ALRLrs>;
166///RTC Alarm Register Low
167pub mod alrl;