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