1#[repr(C)]
2#[doc = "32-bit Counter with Single 32-bit Compare"]
3#[doc(alias = "MODE0")]
4pub struct Mode0 {
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 count: Count,
17 _reserved10: [u8; 0x04],
18 comp: [Comp; 1],
19}
20impl Mode0 {
21#[doc = "0x00 - MODE0 Control"]
22 #[inline(always)]
23pub const fn ctrl(&self) -> &Ctrl {
24&self.ctrl
25 }
26#[doc = "0x02 - Read Request"]
27 #[inline(always)]
28pub const fn readreq(&self) -> &Readreq {
29&self.readreq
30 }
31#[doc = "0x04 - MODE0 Event Control"]
32 #[inline(always)]
33pub const fn evctrl(&self) -> &Evctrl {
34&self.evctrl
35 }
36#[doc = "0x06 - MODE0 Interrupt Enable Clear"]
37 #[inline(always)]
38pub const fn intenclr(&self) -> &Intenclr {
39&self.intenclr
40 }
41#[doc = "0x07 - MODE0 Interrupt Enable Set"]
42 #[inline(always)]
43pub const fn intenset(&self) -> &Intenset {
44&self.intenset
45 }
46#[doc = "0x08 - MODE0 Interrupt Flag Status and Clear"]
47 #[inline(always)]
48pub const fn intflag(&self) -> &Intflag {
49&self.intflag
50 }
51#[doc = "0x0a - Status"]
52 #[inline(always)]
53pub const fn status(&self) -> &Status {
54&self.status
55 }
56#[doc = "0x0b - Debug Control"]
57 #[inline(always)]
58pub const fn dbgctrl(&self) -> &Dbgctrl {
59&self.dbgctrl
60 }
61#[doc = "0x0c - Frequency Correction"]
62 #[inline(always)]
63pub const fn freqcorr(&self) -> &Freqcorr {
64&self.freqcorr
65 }
66#[doc = "0x10 - MODE0 Counter Value"]
67 #[inline(always)]
68pub const fn count(&self) -> &Count {
69&self.count
70 }
71#[doc = "0x18 - MODE0 Compare n Value"]
72 #[inline(always)]
73pub const fn comp(&self, n: usize) -> &Comp {
74&self.comp[n]
75 }
76#[doc = "Iterator for array of:"]
77 #[doc = "0x18 - MODE0 Compare n Value"]
78 #[inline(always)]
79pub fn comp_iter(&self) -> impl Iterator<Item = &Comp> {
80self.comp.iter()
81 }
82}
83#[doc = "CTRL (rw) register accessor: MODE0 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`]
84module"]
85#[doc(alias = "CTRL")]
86pub type Ctrl = crate::Reg<ctrl::CtrlSpec>;
87#[doc = "MODE0 Control"]
88pub mod ctrl;
89#[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`]
90module"]
91#[doc(alias = "READREQ")]
92pub type Readreq = crate::Reg<readreq::ReadreqSpec>;
93#[doc = "Read Request"]
94pub mod readreq;
95#[doc = "EVCTRL (rw) register accessor: MODE0 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`]
96module"]
97#[doc(alias = "EVCTRL")]
98pub type Evctrl = crate::Reg<evctrl::EvctrlSpec>;
99#[doc = "MODE0 Event Control"]
100pub mod evctrl;
101#[doc = "INTENCLR (rw) register accessor: MODE0 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`]
102module"]
103#[doc(alias = "INTENCLR")]
104pub type Intenclr = crate::Reg<intenclr::IntenclrSpec>;
105#[doc = "MODE0 Interrupt Enable Clear"]
106pub mod intenclr;
107#[doc = "INTENSET (rw) register accessor: MODE0 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`]
108module"]
109#[doc(alias = "INTENSET")]
110pub type Intenset = crate::Reg<intenset::IntensetSpec>;
111#[doc = "MODE0 Interrupt Enable Set"]
112pub mod intenset;
113#[doc = "INTFLAG (rw) register accessor: MODE0 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`]
114module"]
115#[doc(alias = "INTFLAG")]
116pub type Intflag = crate::Reg<intflag::IntflagSpec>;
117#[doc = "MODE0 Interrupt Flag Status and Clear"]
118pub mod intflag;
119#[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`]
120module"]
121#[doc(alias = "STATUS")]
122pub type Status = crate::Reg<status::StatusSpec>;
123#[doc = "Status"]
124pub mod status;
125#[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`]
126module"]
127#[doc(alias = "DBGCTRL")]
128pub type Dbgctrl = crate::Reg<dbgctrl::DbgctrlSpec>;
129#[doc = "Debug Control"]
130pub mod dbgctrl;
131#[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`]
132module"]
133#[doc(alias = "FREQCORR")]
134pub type Freqcorr = crate::Reg<freqcorr::FreqcorrSpec>;
135#[doc = "Frequency Correction"]
136pub mod freqcorr;
137#[doc = "COUNT (rw) register accessor: MODE0 Counter Value\n\nYou can [`read`](crate::Reg::read) this register and get [`count::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`count::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@count`]
138module"]
139#[doc(alias = "COUNT")]
140pub type Count = crate::Reg<count::CountSpec>;
141#[doc = "MODE0 Counter Value"]
142pub mod count;
143#[doc = "COMP (rw) register accessor: MODE0 Compare n Value\n\nYou can [`read`](crate::Reg::read) this register and get [`comp::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`comp::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@comp`]
144module"]
145#[doc(alias = "COMP")]
146pub type Comp = crate::Reg<comp::CompSpec>;
147#[doc = "MODE0 Compare n Value"]
148pub mod comp;