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