atsamd51j/
ac.rs

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    statusa: Statusa,
11    statusb: Statusb,
12    dbgctrl: Dbgctrl,
13    winctrl: Winctrl,
14    _reserved10: [u8; 0x01],
15    scaler: [Scaler; 2],
16    _reserved11: [u8; 0x02],
17    compctrl: [Compctrl; 2],
18    _reserved12: [u8; 0x08],
19    syncbusy: Syncbusy,
20    calib: Calib,
21}
22impl RegisterBlock {
23    #[doc = "0x00 - Control A"]
24    #[inline(always)]
25    pub const fn ctrla(&self) -> &Ctrla {
26        &self.ctrla
27    }
28    #[doc = "0x01 - Control B"]
29    #[inline(always)]
30    pub const fn ctrlb(&self) -> &Ctrlb {
31        &self.ctrlb
32    }
33    #[doc = "0x02 - Event Control"]
34    #[inline(always)]
35    pub const fn evctrl(&self) -> &Evctrl {
36        &self.evctrl
37    }
38    #[doc = "0x04 - Interrupt Enable Clear"]
39    #[inline(always)]
40    pub const fn intenclr(&self) -> &Intenclr {
41        &self.intenclr
42    }
43    #[doc = "0x05 - Interrupt Enable Set"]
44    #[inline(always)]
45    pub const fn intenset(&self) -> &Intenset {
46        &self.intenset
47    }
48    #[doc = "0x06 - Interrupt Flag Status and Clear"]
49    #[inline(always)]
50    pub const fn intflag(&self) -> &Intflag {
51        &self.intflag
52    }
53    #[doc = "0x07 - Status A"]
54    #[inline(always)]
55    pub const fn statusa(&self) -> &Statusa {
56        &self.statusa
57    }
58    #[doc = "0x08 - Status B"]
59    #[inline(always)]
60    pub const fn statusb(&self) -> &Statusb {
61        &self.statusb
62    }
63    #[doc = "0x09 - Debug Control"]
64    #[inline(always)]
65    pub const fn dbgctrl(&self) -> &Dbgctrl {
66        &self.dbgctrl
67    }
68    #[doc = "0x0a - Window Control"]
69    #[inline(always)]
70    pub const fn winctrl(&self) -> &Winctrl {
71        &self.winctrl
72    }
73    #[doc = "0x0c - Scaler n"]
74    #[inline(always)]
75    pub const fn scaler(&self, n: usize) -> &Scaler {
76        &self.scaler[n]
77    }
78    #[doc = "Iterator for array of:"]
79    #[doc = "0x0c - Scaler n"]
80    #[inline(always)]
81    pub fn scaler_iter(&self) -> impl Iterator<Item = &Scaler> {
82        self.scaler.iter()
83    }
84    #[doc = "0x10..0x18 - Comparator Control n"]
85    #[inline(always)]
86    pub const fn compctrl(&self, n: usize) -> &Compctrl {
87        &self.compctrl[n]
88    }
89    #[doc = "Iterator for array of:"]
90    #[doc = "0x10..0x18 - Comparator Control n"]
91    #[inline(always)]
92    pub fn compctrl_iter(&self) -> impl Iterator<Item = &Compctrl> {
93        self.compctrl.iter()
94    }
95    #[doc = "0x20 - Synchronization Busy"]
96    #[inline(always)]
97    pub const fn syncbusy(&self) -> &Syncbusy {
98        &self.syncbusy
99    }
100    #[doc = "0x24 - Calibration"]
101    #[inline(always)]
102    pub const fn calib(&self) -> &Calib {
103        &self.calib
104    }
105}
106#[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`]
107module"]
108#[doc(alias = "CTRLA")]
109pub type Ctrla = crate::Reg<ctrla::CtrlaSpec>;
110#[doc = "Control A"]
111pub mod ctrla;
112#[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`]
113module"]
114#[doc(alias = "CTRLB")]
115pub type Ctrlb = crate::Reg<ctrlb::CtrlbSpec>;
116#[doc = "Control B"]
117pub mod ctrlb;
118#[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`]
119module"]
120#[doc(alias = "EVCTRL")]
121pub type Evctrl = crate::Reg<evctrl::EvctrlSpec>;
122#[doc = "Event Control"]
123pub mod evctrl;
124#[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`]
125module"]
126#[doc(alias = "INTENCLR")]
127pub type Intenclr = crate::Reg<intenclr::IntenclrSpec>;
128#[doc = "Interrupt Enable Clear"]
129pub mod intenclr;
130#[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`]
131module"]
132#[doc(alias = "INTENSET")]
133pub type Intenset = crate::Reg<intenset::IntensetSpec>;
134#[doc = "Interrupt Enable Set"]
135pub mod intenset;
136#[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`]
137module"]
138#[doc(alias = "INTFLAG")]
139pub type Intflag = crate::Reg<intflag::IntflagSpec>;
140#[doc = "Interrupt Flag Status and Clear"]
141pub mod intflag;
142#[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`]
143module"]
144#[doc(alias = "STATUSA")]
145pub type Statusa = crate::Reg<statusa::StatusaSpec>;
146#[doc = "Status A"]
147pub mod statusa;
148#[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`]
149module"]
150#[doc(alias = "STATUSB")]
151pub type Statusb = crate::Reg<statusb::StatusbSpec>;
152#[doc = "Status B"]
153pub mod statusb;
154#[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`]
155module"]
156#[doc(alias = "DBGCTRL")]
157pub type Dbgctrl = crate::Reg<dbgctrl::DbgctrlSpec>;
158#[doc = "Debug Control"]
159pub mod dbgctrl;
160#[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`]
161module"]
162#[doc(alias = "WINCTRL")]
163pub type Winctrl = crate::Reg<winctrl::WinctrlSpec>;
164#[doc = "Window Control"]
165pub mod winctrl;
166#[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`]
167module"]
168#[doc(alias = "SCALER")]
169pub type Scaler = crate::Reg<scaler::ScalerSpec>;
170#[doc = "Scaler n"]
171pub mod scaler;
172#[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`]
173module"]
174#[doc(alias = "COMPCTRL")]
175pub type Compctrl = crate::Reg<compctrl::CompctrlSpec>;
176#[doc = "Comparator Control n"]
177pub mod compctrl;
178#[doc = "SYNCBUSY (r) register accessor: Synchronization Busy\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`]
179module"]
180#[doc(alias = "SYNCBUSY")]
181pub type Syncbusy = crate::Reg<syncbusy::SyncbusySpec>;
182#[doc = "Synchronization Busy"]
183pub mod syncbusy;
184#[doc = "CALIB (rw) register accessor: Calibration\n\nYou can [`read`](crate::Reg::read) this register and get [`calib::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`calib::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@calib`]
185module"]
186#[doc(alias = "CALIB")]
187pub type Calib = crate::Reg<calib::CalibSpec>;
188#[doc = "Calibration"]
189pub mod calib;