1#[repr(C)]
2#[doc = "Register block"]
3pub struct RegisterBlock {
4 ctrla: Ctrla,
5 ctrlbclr: Ctrlbclr,
6 ctrlbset: Ctrlbset,
7 evctrl: Evctrl,
8 intenclr: Intenclr,
9 intenset: Intenset,
10 intflag: Intflag,
11 _reserved7: [u8; 0x01],
12 status: Status,
13 _reserved8: [u8; 0x01],
14 dbgctrl: Dbgctrl,
15 syncbusy: Syncbusy,
16 presc: Presc,
17 filter: Filter,
18 _reserved12: [u8; 0x02],
19 prescbuf: Prescbuf,
20 filterbuf: Filterbuf,
21 _reserved14: [u8; 0x02],
22 count: Count,
23 cc: [Cc; 2],
24 _reserved16: [u8; 0x08],
25 ccbuf: [Ccbuf; 2],
26}
27impl RegisterBlock {
28#[doc = "0x00 - Control A"]
29 #[inline(always)]
30pub const fn ctrla(&self) -> &Ctrla {
31&self.ctrla
32 }
33#[doc = "0x04 - Control B Clear"]
34 #[inline(always)]
35pub const fn ctrlbclr(&self) -> &Ctrlbclr {
36&self.ctrlbclr
37 }
38#[doc = "0x05 - Control B Set"]
39 #[inline(always)]
40pub const fn ctrlbset(&self) -> &Ctrlbset {
41&self.ctrlbset
42 }
43#[doc = "0x06 - Event Control"]
44 #[inline(always)]
45pub const fn evctrl(&self) -> &Evctrl {
46&self.evctrl
47 }
48#[doc = "0x08 - Interrupt Enable Clear"]
49 #[inline(always)]
50pub const fn intenclr(&self) -> &Intenclr {
51&self.intenclr
52 }
53#[doc = "0x09 - Interrupt Enable Set"]
54 #[inline(always)]
55pub const fn intenset(&self) -> &Intenset {
56&self.intenset
57 }
58#[doc = "0x0a - Interrupt Flag Status and Clear"]
59 #[inline(always)]
60pub const fn intflag(&self) -> &Intflag {
61&self.intflag
62 }
63#[doc = "0x0c - Status"]
64 #[inline(always)]
65pub const fn status(&self) -> &Status {
66&self.status
67 }
68#[doc = "0x0f - Debug Control"]
69 #[inline(always)]
70pub const fn dbgctrl(&self) -> &Dbgctrl {
71&self.dbgctrl
72 }
73#[doc = "0x10 - Synchronization Status"]
74 #[inline(always)]
75pub const fn syncbusy(&self) -> &Syncbusy {
76&self.syncbusy
77 }
78#[doc = "0x14 - Prescaler Value"]
79 #[inline(always)]
80pub const fn presc(&self) -> &Presc {
81&self.presc
82 }
83#[doc = "0x15 - Filter Value"]
84 #[inline(always)]
85pub const fn filter(&self) -> &Filter {
86&self.filter
87 }
88#[doc = "0x18 - Prescaler Buffer Value"]
89 #[inline(always)]
90pub const fn prescbuf(&self) -> &Prescbuf {
91&self.prescbuf
92 }
93#[doc = "0x19 - Filter Buffer Value"]
94 #[inline(always)]
95pub const fn filterbuf(&self) -> &Filterbuf {
96&self.filterbuf
97 }
98#[doc = "0x1c - Counter Value"]
99 #[inline(always)]
100pub const fn count(&self) -> &Count {
101&self.count
102 }
103#[doc = "0x20..0x28 - Channel n Compare Value"]
104 #[inline(always)]
105pub const fn cc(&self, n: usize) -> &Cc {
106&self.cc[n]
107 }
108#[doc = "Iterator for array of:"]
109 #[doc = "0x20..0x28 - Channel n Compare Value"]
110 #[inline(always)]
111pub fn cc_iter(&self) -> impl Iterator<Item = &Cc> {
112self.cc.iter()
113 }
114#[doc = "0x30..0x38 - Channel Compare Buffer Value"]
115 #[inline(always)]
116pub const fn ccbuf(&self, n: usize) -> &Ccbuf {
117&self.ccbuf[n]
118 }
119#[doc = "Iterator for array of:"]
120 #[doc = "0x30..0x38 - Channel Compare Buffer Value"]
121 #[inline(always)]
122pub fn ccbuf_iter(&self) -> impl Iterator<Item = &Ccbuf> {
123self.ccbuf.iter()
124 }
125}
126#[doc = "CTRLA (rw) register accessor: Control A\n\nYou can [`read`](crate::Reg::read) this register and get [`ctrla::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ctrla::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@ctrla`]
127module"]
128#[doc(alias = "CTRLA")]
129pub type Ctrla = crate::Reg<ctrla::CtrlaSpec>;
130#[doc = "Control A"]
131pub mod ctrla;
132#[doc = "CTRLBCLR (rw) register accessor: Control B Clear\n\nYou can [`read`](crate::Reg::read) this register and get [`ctrlbclr::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ctrlbclr::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@ctrlbclr`]
133module"]
134#[doc(alias = "CTRLBCLR")]
135pub type Ctrlbclr = crate::Reg<ctrlbclr::CtrlbclrSpec>;
136#[doc = "Control B Clear"]
137pub mod ctrlbclr;
138#[doc = "CTRLBSET (rw) register accessor: Control B Set\n\nYou can [`read`](crate::Reg::read) this register and get [`ctrlbset::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ctrlbset::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@ctrlbset`]
139module"]
140#[doc(alias = "CTRLBSET")]
141pub type Ctrlbset = crate::Reg<ctrlbset::CtrlbsetSpec>;
142#[doc = "Control B Set"]
143pub mod ctrlbset;
144#[doc = "EVCTRL (rw) register accessor: 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`]
145module"]
146#[doc(alias = "EVCTRL")]
147pub type Evctrl = crate::Reg<evctrl::EvctrlSpec>;
148#[doc = "Event Control"]
149pub mod evctrl;
150#[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`]
151module"]
152#[doc(alias = "INTENCLR")]
153pub type Intenclr = crate::Reg<intenclr::IntenclrSpec>;
154#[doc = "Interrupt Enable Clear"]
155pub mod intenclr;
156#[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`]
157module"]
158#[doc(alias = "INTENSET")]
159pub type Intenset = crate::Reg<intenset::IntensetSpec>;
160#[doc = "Interrupt Enable Set"]
161pub mod intenset;
162#[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`]
163module"]
164#[doc(alias = "INTFLAG")]
165pub type Intflag = crate::Reg<intflag::IntflagSpec>;
166#[doc = "Interrupt Flag Status and Clear"]
167pub mod intflag;
168#[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`]
169module"]
170#[doc(alias = "STATUS")]
171pub type Status = crate::Reg<status::StatusSpec>;
172#[doc = "Status"]
173pub mod status;
174#[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`]
175module"]
176#[doc(alias = "DBGCTRL")]
177pub type Dbgctrl = crate::Reg<dbgctrl::DbgctrlSpec>;
178#[doc = "Debug Control"]
179pub mod dbgctrl;
180#[doc = "SYNCBUSY (r) register accessor: Synchronization Status\n\nYou can [`read`](crate::Reg::read) this register and get [`syncbusy::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@syncbusy`]
181module"]
182#[doc(alias = "SYNCBUSY")]
183pub type Syncbusy = crate::Reg<syncbusy::SyncbusySpec>;
184#[doc = "Synchronization Status"]
185pub mod syncbusy;
186#[doc = "PRESC (rw) register accessor: Prescaler Value\n\nYou can [`read`](crate::Reg::read) this register and get [`presc::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`presc::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@presc`]
187module"]
188#[doc(alias = "PRESC")]
189pub type Presc = crate::Reg<presc::PrescSpec>;
190#[doc = "Prescaler Value"]
191pub mod presc;
192#[doc = "FILTER (rw) register accessor: Filter Value\n\nYou can [`read`](crate::Reg::read) this register and get [`filter::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`filter::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@filter`]
193module"]
194#[doc(alias = "FILTER")]
195pub type Filter = crate::Reg<filter::FilterSpec>;
196#[doc = "Filter Value"]
197pub mod filter;
198#[doc = "PRESCBUF (rw) register accessor: Prescaler Buffer Value\n\nYou can [`read`](crate::Reg::read) this register and get [`prescbuf::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`prescbuf::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@prescbuf`]
199module"]
200#[doc(alias = "PRESCBUF")]
201pub type Prescbuf = crate::Reg<prescbuf::PrescbufSpec>;
202#[doc = "Prescaler Buffer Value"]
203pub mod prescbuf;
204#[doc = "FILTERBUF (rw) register accessor: Filter Buffer Value\n\nYou can [`read`](crate::Reg::read) this register and get [`filterbuf::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`filterbuf::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@filterbuf`]
205module"]
206#[doc(alias = "FILTERBUF")]
207pub type Filterbuf = crate::Reg<filterbuf::FilterbufSpec>;
208#[doc = "Filter Buffer Value"]
209pub mod filterbuf;
210#[doc = "COUNT (rw) register accessor: 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`]
211module"]
212#[doc(alias = "COUNT")]
213pub type Count = crate::Reg<count::CountSpec>;
214#[doc = "Counter Value"]
215pub mod count;
216#[doc = "CC (rw) register accessor: Channel n Compare Value\n\nYou can [`read`](crate::Reg::read) this register and get [`cc::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`cc::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@cc`]
217module"]
218#[doc(alias = "CC")]
219pub type Cc = crate::Reg<cc::CcSpec>;
220#[doc = "Channel n Compare Value"]
221pub mod cc;
222#[doc = "CCBUF (rw) register accessor: Channel Compare Buffer Value\n\nYou can [`read`](crate::Reg::read) this register and get [`ccbuf::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ccbuf::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@ccbuf`]
223module"]
224#[doc(alias = "CCBUF")]
225pub type Ccbuf = crate::Reg<ccbuf::CcbufSpec>;
226#[doc = "Channel Compare Buffer Value"]
227pub mod ccbuf;