1#[repr(C)]
2#[doc = "Register block"]
3pub struct RegisterBlock {
4 ctrla: Ctrla,
5 ctrlb: Ctrlb,
6 evctrl: Evctrl,
7 intenclr: Intenclr,
8 intenset: Intenset,
9 intflag: Intflag,
10 _reserved6: [u8; 0x01],
11 statusa: Statusa,
12 statusb: Statusb,
13 statusc: Statusc,
14 _reserved9: [u8; 0x01],
15 winctrl: Winctrl,
16 _reserved10: [u8; 0x03],
17 compctrl: [Compctrl; 2],
18 _reserved11: [u8; 0x08],
19 scaler: [Scaler; 2],
20}
21impl RegisterBlock {
22 #[doc = "0x00 - Control A"]
23 #[inline(always)]
24 pub const fn ctrla(&self) -> &Ctrla {
25 &self.ctrla
26 }
27 #[doc = "0x01 - Control B"]
28 #[inline(always)]
29 pub const fn ctrlb(&self) -> &Ctrlb {
30 &self.ctrlb
31 }
32 #[doc = "0x02 - Event Control"]
33 #[inline(always)]
34 pub const fn evctrl(&self) -> &Evctrl {
35 &self.evctrl
36 }
37 #[doc = "0x04 - Interrupt Enable Clear"]
38 #[inline(always)]
39 pub const fn intenclr(&self) -> &Intenclr {
40 &self.intenclr
41 }
42 #[doc = "0x05 - Interrupt Enable Set"]
43 #[inline(always)]
44 pub const fn intenset(&self) -> &Intenset {
45 &self.intenset
46 }
47 #[doc = "0x06 - Interrupt Flag Status and Clear"]
48 #[inline(always)]
49 pub const fn intflag(&self) -> &Intflag {
50 &self.intflag
51 }
52 #[doc = "0x08 - Status A"]
53 #[inline(always)]
54 pub const fn statusa(&self) -> &Statusa {
55 &self.statusa
56 }
57 #[doc = "0x09 - Status B"]
58 #[inline(always)]
59 pub const fn statusb(&self) -> &Statusb {
60 &self.statusb
61 }
62 #[doc = "0x0a - Status C"]
63 #[inline(always)]
64 pub const fn statusc(&self) -> &Statusc {
65 &self.statusc
66 }
67 #[doc = "0x0c - Window Control"]
68 #[inline(always)]
69 pub const fn winctrl(&self) -> &Winctrl {
70 &self.winctrl
71 }
72 #[doc = "0x10..0x18 - Comparator Control n"]
73 #[inline(always)]
74 pub const fn compctrl(&self, n: usize) -> &Compctrl {
75 &self.compctrl[n]
76 }
77 #[doc = "Iterator for array of:"]
78 #[doc = "0x10..0x18 - Comparator Control n"]
79 #[inline(always)]
80 pub fn compctrl_iter(&self) -> impl Iterator<Item = &Compctrl> {
81 self.compctrl.iter()
82 }
83 #[doc = "0x20 - Scaler n"]
84 #[inline(always)]
85 pub const fn scaler(&self, n: usize) -> &Scaler {
86 &self.scaler[n]
87 }
88 #[doc = "Iterator for array of:"]
89 #[doc = "0x20 - Scaler n"]
90 #[inline(always)]
91 pub fn scaler_iter(&self) -> impl Iterator<Item = &Scaler> {
92 self.scaler.iter()
93 }
94}
95#[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`]
96module"]
97#[doc(alias = "CTRLA")]
98pub type Ctrla = crate::Reg<ctrla::CtrlaSpec>;
99#[doc = "Control A"]
100pub mod ctrla;
101#[doc = "CTRLB (w) register accessor: Control B\n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ctrlb::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@ctrlb`]
102module"]
103#[doc(alias = "CTRLB")]
104pub type Ctrlb = crate::Reg<ctrlb::CtrlbSpec>;
105#[doc = "Control B"]
106pub mod ctrlb;
107#[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`]
108module"]
109#[doc(alias = "EVCTRL")]
110pub type Evctrl = crate::Reg<evctrl::EvctrlSpec>;
111#[doc = "Event Control"]
112pub mod evctrl;
113#[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`]
114module"]
115#[doc(alias = "INTENCLR")]
116pub type Intenclr = crate::Reg<intenclr::IntenclrSpec>;
117#[doc = "Interrupt Enable Clear"]
118pub mod intenclr;
119#[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`]
120module"]
121#[doc(alias = "INTENSET")]
122pub type Intenset = crate::Reg<intenset::IntensetSpec>;
123#[doc = "Interrupt Enable Set"]
124pub mod intenset;
125#[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`]
126module"]
127#[doc(alias = "INTFLAG")]
128pub type Intflag = crate::Reg<intflag::IntflagSpec>;
129#[doc = "Interrupt Flag Status and Clear"]
130pub mod intflag;
131#[doc = "STATUSA (r) register accessor: Status A\n\nYou can [`read`](crate::Reg::read) this register and get [`statusa::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@statusa`]
132module"]
133#[doc(alias = "STATUSA")]
134pub type Statusa = crate::Reg<statusa::StatusaSpec>;
135#[doc = "Status A"]
136pub mod statusa;
137#[doc = "STATUSB (r) register accessor: Status B\n\nYou can [`read`](crate::Reg::read) this register and get [`statusb::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@statusb`]
138module"]
139#[doc(alias = "STATUSB")]
140pub type Statusb = crate::Reg<statusb::StatusbSpec>;
141#[doc = "Status B"]
142pub mod statusb;
143#[doc = "STATUSC (r) register accessor: Status C\n\nYou can [`read`](crate::Reg::read) this register and get [`statusc::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@statusc`]
144module"]
145#[doc(alias = "STATUSC")]
146pub type Statusc = crate::Reg<statusc::StatuscSpec>;
147#[doc = "Status C"]
148pub mod statusc;
149#[doc = "WINCTRL (rw) register accessor: Window Control\n\nYou can [`read`](crate::Reg::read) this register and get [`winctrl::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`winctrl::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@winctrl`]
150module"]
151#[doc(alias = "WINCTRL")]
152pub type Winctrl = crate::Reg<winctrl::WinctrlSpec>;
153#[doc = "Window Control"]
154pub mod winctrl;
155#[doc = "COMPCTRL (rw) register accessor: Comparator Control n\n\nYou can [`read`](crate::Reg::read) this register and get [`compctrl::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`compctrl::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@compctrl`]
156module"]
157#[doc(alias = "COMPCTRL")]
158pub type Compctrl = crate::Reg<compctrl::CompctrlSpec>;
159#[doc = "Comparator Control n"]
160pub mod compctrl;
161#[doc = "SCALER (rw) register accessor: Scaler n\n\nYou can [`read`](crate::Reg::read) this register and get [`scaler::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`scaler::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@scaler`]
162module"]
163#[doc(alias = "SCALER")]
164pub type Scaler = crate::Reg<scaler::ScalerSpec>;
165#[doc = "Scaler n"]
166pub mod scaler;