1#[repr(C)]
2#[doc = "Clock/Calendar with Alarm"]
3#[doc(alias = "MODE2")]
4pub struct Mode2 {
5 ctrl: Ctrl,
6 readreq: Readreq,
7 evctrl: Evctrl,
8 intenclr: Intenclr,
9 intenset: Intenset,
10 intflag: Intflag,
11 _reserved6: [u8; 0x01],
12 status: Status,
13 dbgctrl: Dbgctrl,
14 freqcorr: Freqcorr,
15 _reserved9: [u8; 0x03],
16 clock: Clock,
17 _reserved10: [u8; 0x04],
18 alarm: [Alarm; 1],
19 mask: [Mask; 1],
20}
21impl Mode2 {
22#[doc = "0x00 - MODE2 Control"]
23 #[inline(always)]
24pub const fn ctrl(&self) -> &Ctrl {
25&self.ctrl
26 }
27#[doc = "0x02 - Read Request"]
28 #[inline(always)]
29pub const fn readreq(&self) -> &Readreq {
30&self.readreq
31 }
32#[doc = "0x04 - MODE2 Event Control"]
33 #[inline(always)]
34pub const fn evctrl(&self) -> &Evctrl {
35&self.evctrl
36 }
37#[doc = "0x06 - MODE2 Interrupt Enable Clear"]
38 #[inline(always)]
39pub const fn intenclr(&self) -> &Intenclr {
40&self.intenclr
41 }
42#[doc = "0x07 - MODE2 Interrupt Enable Set"]
43 #[inline(always)]
44pub const fn intenset(&self) -> &Intenset {
45&self.intenset
46 }
47#[doc = "0x08 - MODE2 Interrupt Flag Status and Clear"]
48 #[inline(always)]
49pub const fn intflag(&self) -> &Intflag {
50&self.intflag
51 }
52#[doc = "0x0a - Status"]
53 #[inline(always)]
54pub const fn status(&self) -> &Status {
55&self.status
56 }
57#[doc = "0x0b - Debug Control"]
58 #[inline(always)]
59pub const fn dbgctrl(&self) -> &Dbgctrl {
60&self.dbgctrl
61 }
62#[doc = "0x0c - Frequency Correction"]
63 #[inline(always)]
64pub const fn freqcorr(&self) -> &Freqcorr {
65&self.freqcorr
66 }
67#[doc = "0x10 - MODE2 Clock Value"]
68 #[inline(always)]
69pub const fn clock(&self) -> &Clock {
70&self.clock
71 }
72#[doc = "0x18 - MODE2 Alarm n Value"]
73 #[inline(always)]
74pub const fn alarm(&self, n: usize) -> &Alarm {
75&self.alarm[n]
76 }
77#[doc = "Iterator for array of:"]
78 #[doc = "0x18 - MODE2 Alarm n Value"]
79 #[inline(always)]
80pub fn alarm_iter(&self) -> impl Iterator<Item = &Alarm> {
81self.alarm.iter()
82 }
83#[doc = "0x1c - MODE2 Alarm n Mask"]
84 #[inline(always)]
85pub const fn mask(&self, n: usize) -> &Mask {
86&self.mask[n]
87 }
88#[doc = "Iterator for array of:"]
89 #[doc = "0x1c - MODE2 Alarm n Mask"]
90 #[inline(always)]
91pub fn mask_iter(&self) -> impl Iterator<Item = &Mask> {
92self.mask.iter()
93 }
94}
95#[doc = "CTRL (rw) register accessor: MODE2 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 = "MODE2 Control"]
100pub mod ctrl;
101#[doc = "READREQ (rw) register accessor: Read Request\n\nYou can [`read`](crate::Reg::read) this register and get [`readreq::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`readreq::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@readreq`]
102module"]
103#[doc(alias = "READREQ")]
104pub type Readreq = crate::Reg<readreq::ReadreqSpec>;
105#[doc = "Read Request"]
106pub mod readreq;
107#[doc = "EVCTRL (rw) register accessor: MODE2 Event Control\n\nYou can [`read`](crate::Reg::read) this register and get [`evctrl::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`evctrl::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@evctrl`]
108module"]
109#[doc(alias = "EVCTRL")]
110pub type Evctrl = crate::Reg<evctrl::EvctrlSpec>;
111#[doc = "MODE2 Event Control"]
112pub mod evctrl;
113#[doc = "INTENCLR (rw) register accessor: MODE2 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`]
114module"]
115#[doc(alias = "INTENCLR")]
116pub type Intenclr = crate::Reg<intenclr::IntenclrSpec>;
117#[doc = "MODE2 Interrupt Enable Clear"]
118pub mod intenclr;
119#[doc = "INTENSET (rw) register accessor: MODE2 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`]
120module"]
121#[doc(alias = "INTENSET")]
122pub type Intenset = crate::Reg<intenset::IntensetSpec>;
123#[doc = "MODE2 Interrupt Enable Set"]
124pub mod intenset;
125#[doc = "INTFLAG (rw) register accessor: MODE2 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`]
126module"]
127#[doc(alias = "INTFLAG")]
128pub type Intflag = crate::Reg<intflag::IntflagSpec>;
129#[doc = "MODE2 Interrupt Flag Status and Clear"]
130pub mod intflag;
131#[doc = "STATUS (rw) register accessor: Status\n\nYou can [`read`](crate::Reg::read) this register and get [`status::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`status::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@status`]
132module"]
133#[doc(alias = "STATUS")]
134pub type Status = crate::Reg<status::StatusSpec>;
135#[doc = "Status"]
136pub mod status;
137#[doc = "DBGCTRL (rw) register accessor: Debug Control\n\nYou can [`read`](crate::Reg::read) this register and get [`dbgctrl::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`dbgctrl::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@dbgctrl`]
138module"]
139#[doc(alias = "DBGCTRL")]
140pub type Dbgctrl = crate::Reg<dbgctrl::DbgctrlSpec>;
141#[doc = "Debug Control"]
142pub mod dbgctrl;
143#[doc = "FREQCORR (rw) register accessor: Frequency Correction\n\nYou can [`read`](crate::Reg::read) this register and get [`freqcorr::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`freqcorr::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@freqcorr`]
144module"]
145#[doc(alias = "FREQCORR")]
146pub type Freqcorr = crate::Reg<freqcorr::FreqcorrSpec>;
147#[doc = "Frequency Correction"]
148pub mod freqcorr;
149#[doc = "CLOCK (rw) register accessor: MODE2 Clock Value\n\nYou can [`read`](crate::Reg::read) this register and get [`clock::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`clock::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`]
150module"]
151#[doc(alias = "CLOCK")]
152pub type Clock = crate::Reg<clock::ClockSpec>;
153#[doc = "MODE2 Clock Value"]
154pub mod clock;
155#[doc = "ALARM (rw) register accessor: MODE2 Alarm n Value\n\nYou can [`read`](crate::Reg::read) this register and get [`alarm::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`alarm::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@alarm`]
156module"]
157#[doc(alias = "ALARM")]
158pub type Alarm = crate::Reg<alarm::AlarmSpec>;
159#[doc = "MODE2 Alarm n Value"]
160pub mod alarm;
161#[doc = "MASK (rw) register accessor: MODE2 Alarm n Mask\n\nYou can [`read`](crate::Reg::read) this register and get [`mask::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`mask::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@mask`]
162module"]
163#[doc(alias = "MASK")]
164pub type Mask = crate::Reg<mask::MaskSpec>;
165#[doc = "MODE2 Alarm n Mask"]
166pub mod mask;