atsam3s2a/
udp.rs

1#[repr(C)]
2#[doc = "Register block"]
3pub struct RegisterBlock {
4    frm_num: FrmNum,
5    glb_stat: GlbStat,
6    faddr: Faddr,
7    _reserved3: [u8; 0x04],
8    ier: Ier,
9    idr: Idr,
10    imr: Imr,
11    isr: Isr,
12    icr: Icr,
13    _reserved8: [u8; 0x04],
14    rst_ep: RstEp,
15    _reserved9: [u8; 0x04],
16    _reserved_9_csr0: [u8; 0x04],
17    csr1: Csr1,
18    csr2: Csr2,
19    csr3: Csr3,
20    csr4: Csr4,
21    csr5: Csr5,
22    csr6: Csr6,
23    csr7: Csr7,
24    fdr0: Fdr0,
25    fdr1: Fdr1,
26    fdr2: Fdr2,
27    fdr3: Fdr3,
28    fdr4: Fdr4,
29    fdr5: Fdr5,
30    fdr6: Fdr6,
31    fdr7: Fdr7,
32    _reserved25: [u8; 0x04],
33    txvc: Txvc,
34}
35impl RegisterBlock {
36    #[doc = "0x00 - Frame Number Register"]
37    #[inline(always)]
38    pub const fn frm_num(&self) -> &FrmNum {
39        &self.frm_num
40    }
41    #[doc = "0x04 - Global State Register"]
42    #[inline(always)]
43    pub const fn glb_stat(&self) -> &GlbStat {
44        &self.glb_stat
45    }
46    #[doc = "0x08 - Function Address Register"]
47    #[inline(always)]
48    pub const fn faddr(&self) -> &Faddr {
49        &self.faddr
50    }
51    #[doc = "0x10 - Interrupt Enable Register"]
52    #[inline(always)]
53    pub const fn ier(&self) -> &Ier {
54        &self.ier
55    }
56    #[doc = "0x14 - Interrupt Disable Register"]
57    #[inline(always)]
58    pub const fn idr(&self) -> &Idr {
59        &self.idr
60    }
61    #[doc = "0x18 - Interrupt Mask Register"]
62    #[inline(always)]
63    pub const fn imr(&self) -> &Imr {
64        &self.imr
65    }
66    #[doc = "0x1c - Interrupt Status Register"]
67    #[inline(always)]
68    pub const fn isr(&self) -> &Isr {
69        &self.isr
70    }
71    #[doc = "0x20 - Interrupt Clear Register"]
72    #[inline(always)]
73    pub const fn icr(&self) -> &Icr {
74        &self.icr
75    }
76    #[doc = "0x28 - Reset Endpoint Register"]
77    #[inline(always)]
78    pub const fn rst_ep(&self) -> &RstEp {
79        &self.rst_ep
80    }
81    #[doc = "0x30 - Endpoint Control and Status Register"]
82    #[inline(always)]
83    pub const fn isoendpt_csr0_isoendpt(&self) -> &IsoendptCsr0Isoendpt {
84        unsafe { &*(self as *const Self).cast::<u8>().add(48).cast() }
85    }
86    #[doc = "0x30 - Endpoint Control and Status Register 0"]
87    #[inline(always)]
88    pub const fn csr0(&self) -> &Csr0 {
89        unsafe { &*(self as *const Self).cast::<u8>().add(48).cast() }
90    }
91    #[doc = "0x34 - Endpoint Control and Status Register 1"]
92    #[inline(always)]
93    pub const fn csr1(&self) -> &Csr1 {
94        &self.csr1
95    }
96    #[doc = "0x38 - Endpoint Control and Status Register 2"]
97    #[inline(always)]
98    pub const fn csr2(&self) -> &Csr2 {
99        &self.csr2
100    }
101    #[doc = "0x3c - Endpoint Control and Status Register 3"]
102    #[inline(always)]
103    pub const fn csr3(&self) -> &Csr3 {
104        &self.csr3
105    }
106    #[doc = "0x40 - Endpoint Control and Status Register 4"]
107    #[inline(always)]
108    pub const fn csr4(&self) -> &Csr4 {
109        &self.csr4
110    }
111    #[doc = "0x44 - Endpoint Control and Status Register 5"]
112    #[inline(always)]
113    pub const fn csr5(&self) -> &Csr5 {
114        &self.csr5
115    }
116    #[doc = "0x48 - Endpoint Control and Status Register 6"]
117    #[inline(always)]
118    pub const fn csr6(&self) -> &Csr6 {
119        &self.csr6
120    }
121    #[doc = "0x4c - Endpoint Control and Status Register 7"]
122    #[inline(always)]
123    pub const fn csr7(&self) -> &Csr7 {
124        &self.csr7
125    }
126    #[doc = "0x50 - Endpoint FIFO Data Register 0"]
127    #[inline(always)]
128    pub const fn fdr0(&self) -> &Fdr0 {
129        &self.fdr0
130    }
131    #[doc = "0x54 - Endpoint FIFO Data Register 1"]
132    #[inline(always)]
133    pub const fn fdr1(&self) -> &Fdr1 {
134        &self.fdr1
135    }
136    #[doc = "0x58 - Endpoint FIFO Data Register 2"]
137    #[inline(always)]
138    pub const fn fdr2(&self) -> &Fdr2 {
139        &self.fdr2
140    }
141    #[doc = "0x5c - Endpoint FIFO Data Register 3"]
142    #[inline(always)]
143    pub const fn fdr3(&self) -> &Fdr3 {
144        &self.fdr3
145    }
146    #[doc = "0x60 - Endpoint FIFO Data Register 4"]
147    #[inline(always)]
148    pub const fn fdr4(&self) -> &Fdr4 {
149        &self.fdr4
150    }
151    #[doc = "0x64 - Endpoint FIFO Data Register 5"]
152    #[inline(always)]
153    pub const fn fdr5(&self) -> &Fdr5 {
154        &self.fdr5
155    }
156    #[doc = "0x68 - Endpoint FIFO Data Register 6"]
157    #[inline(always)]
158    pub const fn fdr6(&self) -> &Fdr6 {
159        &self.fdr6
160    }
161    #[doc = "0x6c - Endpoint FIFO Data Register 7"]
162    #[inline(always)]
163    pub const fn fdr7(&self) -> &Fdr7 {
164        &self.fdr7
165    }
166    #[doc = "0x74 - Transceiver Control Register"]
167    #[inline(always)]
168    pub const fn txvc(&self) -> &Txvc {
169        &self.txvc
170    }
171}
172#[doc = "FRM_NUM (r) register accessor: Frame Number Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`frm_num::R`].  See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@frm_num`]
173module"]
174#[doc(alias = "FRM_NUM")]
175pub type FrmNum = crate::Reg<frm_num::FrmNumSpec>;
176#[doc = "Frame Number Register"]
177pub mod frm_num;
178#[doc = "GLB_STAT (rw) register accessor: Global State Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`glb_stat::R`].  You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`glb_stat::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@glb_stat`]
179module"]
180#[doc(alias = "GLB_STAT")]
181pub type GlbStat = crate::Reg<glb_stat::GlbStatSpec>;
182#[doc = "Global State Register"]
183pub mod glb_stat;
184#[doc = "FADDR (rw) register accessor: Function Address Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`faddr::R`].  You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`faddr::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@faddr`]
185module"]
186#[doc(alias = "FADDR")]
187pub type Faddr = crate::Reg<faddr::FaddrSpec>;
188#[doc = "Function Address Register"]
189pub mod faddr;
190#[doc = "IER (w) register accessor: Interrupt Enable Register\n\nYou can [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`ier::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@ier`]
191module"]
192#[doc(alias = "IER")]
193pub type Ier = crate::Reg<ier::IerSpec>;
194#[doc = "Interrupt Enable Register"]
195pub mod ier;
196#[doc = "IDR (w) register accessor: Interrupt Disable Register\n\nYou can [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`idr::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@idr`]
197module"]
198#[doc(alias = "IDR")]
199pub type Idr = crate::Reg<idr::IdrSpec>;
200#[doc = "Interrupt Disable Register"]
201pub mod idr;
202#[doc = "IMR (r) register accessor: Interrupt Mask Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`imr::R`].  See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@imr`]
203module"]
204#[doc(alias = "IMR")]
205pub type Imr = crate::Reg<imr::ImrSpec>;
206#[doc = "Interrupt Mask Register"]
207pub mod imr;
208#[doc = "ISR (r) register accessor: Interrupt Status Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`isr::R`].  See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@isr`]
209module"]
210#[doc(alias = "ISR")]
211pub type Isr = crate::Reg<isr::IsrSpec>;
212#[doc = "Interrupt Status Register"]
213pub mod isr;
214#[doc = "ICR (w) register accessor: Interrupt Clear Register\n\nYou can [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`icr::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@icr`]
215module"]
216#[doc(alias = "ICR")]
217pub type Icr = crate::Reg<icr::IcrSpec>;
218#[doc = "Interrupt Clear Register"]
219pub mod icr;
220#[doc = "RST_EP (rw) register accessor: Reset Endpoint Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`rst_ep::R`].  You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`rst_ep::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@rst_ep`]
221module"]
222#[doc(alias = "RST_EP")]
223pub type RstEp = crate::Reg<rst_ep::RstEpSpec>;
224#[doc = "Reset Endpoint Register"]
225pub mod rst_ep;
226#[doc = "CSR0 (rw) register accessor: Endpoint Control and Status Register 0\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`csr0::R`].  You can [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`csr0::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@csr0`]
227module"]
228#[doc(alias = "CSR0")]
229pub type Csr0 = crate::Reg<csr0::Csr0Spec>;
230#[doc = "Endpoint Control and Status Register 0"]
231pub mod csr0;
232#[doc = "CSR1 (rw) register accessor: Endpoint Control and Status Register 1\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`csr1::R`].  You can [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`csr1::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@csr1`]
233module"]
234#[doc(alias = "CSR1")]
235pub type Csr1 = crate::Reg<csr1::Csr1Spec>;
236#[doc = "Endpoint Control and Status Register 1"]
237pub mod csr1;
238#[doc = "CSR2 (rw) register accessor: Endpoint Control and Status Register 2\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`csr2::R`].  You can [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`csr2::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@csr2`]
239module"]
240#[doc(alias = "CSR2")]
241pub type Csr2 = crate::Reg<csr2::Csr2Spec>;
242#[doc = "Endpoint Control and Status Register 2"]
243pub mod csr2;
244#[doc = "CSR3 (rw) register accessor: Endpoint Control and Status Register 3\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`csr3::R`].  You can [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`csr3::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@csr3`]
245module"]
246#[doc(alias = "CSR3")]
247pub type Csr3 = crate::Reg<csr3::Csr3Spec>;
248#[doc = "Endpoint Control and Status Register 3"]
249pub mod csr3;
250#[doc = "CSR4 (rw) register accessor: Endpoint Control and Status Register 4\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`csr4::R`].  You can [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`csr4::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@csr4`]
251module"]
252#[doc(alias = "CSR4")]
253pub type Csr4 = crate::Reg<csr4::Csr4Spec>;
254#[doc = "Endpoint Control and Status Register 4"]
255pub mod csr4;
256#[doc = "CSR5 (rw) register accessor: Endpoint Control and Status Register 5\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`csr5::R`].  You can [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`csr5::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@csr5`]
257module"]
258#[doc(alias = "CSR5")]
259pub type Csr5 = crate::Reg<csr5::Csr5Spec>;
260#[doc = "Endpoint Control and Status Register 5"]
261pub mod csr5;
262#[doc = "CSR6 (rw) register accessor: Endpoint Control and Status Register 6\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`csr6::R`].  You can [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`csr6::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@csr6`]
263module"]
264#[doc(alias = "CSR6")]
265pub type Csr6 = crate::Reg<csr6::Csr6Spec>;
266#[doc = "Endpoint Control and Status Register 6"]
267pub mod csr6;
268#[doc = "CSR7 (rw) register accessor: Endpoint Control and Status Register 7\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`csr7::R`].  You can [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`csr7::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@csr7`]
269module"]
270#[doc(alias = "CSR7")]
271pub type Csr7 = crate::Reg<csr7::Csr7Spec>;
272#[doc = "Endpoint Control and Status Register 7"]
273pub mod csr7;
274#[doc = "ISOENDPT_CSR0_ISOENDPT (rw) register accessor: Endpoint Control and Status Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`isoendpt_csr0_isoendpt::R`].  You can [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`isoendpt_csr0_isoendpt::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@isoendpt_csr0_isoendpt`]
275module"]
276#[doc(alias = "ISOENDPT_CSR0_ISOENDPT")]
277pub type IsoendptCsr0Isoendpt = crate::Reg<isoendpt_csr0_isoendpt::IsoendptCsr0IsoendptSpec>;
278#[doc = "Endpoint Control and Status Register"]
279pub mod isoendpt_csr0_isoendpt;
280#[doc = "FDR0 (rw) register accessor: Endpoint FIFO Data Register 0\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`fdr0::R`].  You can [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`fdr0::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@fdr0`]
281module"]
282#[doc(alias = "FDR0")]
283pub type Fdr0 = crate::Reg<fdr0::Fdr0Spec>;
284#[doc = "Endpoint FIFO Data Register 0"]
285pub mod fdr0;
286#[doc = "FDR1 (rw) register accessor: Endpoint FIFO Data Register 1\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`fdr1::R`].  You can [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`fdr1::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@fdr1`]
287module"]
288#[doc(alias = "FDR1")]
289pub type Fdr1 = crate::Reg<fdr1::Fdr1Spec>;
290#[doc = "Endpoint FIFO Data Register 1"]
291pub mod fdr1;
292#[doc = "FDR2 (rw) register accessor: Endpoint FIFO Data Register 2\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`fdr2::R`].  You can [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`fdr2::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@fdr2`]
293module"]
294#[doc(alias = "FDR2")]
295pub type Fdr2 = crate::Reg<fdr2::Fdr2Spec>;
296#[doc = "Endpoint FIFO Data Register 2"]
297pub mod fdr2;
298#[doc = "FDR3 (rw) register accessor: Endpoint FIFO Data Register 3\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`fdr3::R`].  You can [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`fdr3::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@fdr3`]
299module"]
300#[doc(alias = "FDR3")]
301pub type Fdr3 = crate::Reg<fdr3::Fdr3Spec>;
302#[doc = "Endpoint FIFO Data Register 3"]
303pub mod fdr3;
304#[doc = "FDR4 (rw) register accessor: Endpoint FIFO Data Register 4\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`fdr4::R`].  You can [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`fdr4::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@fdr4`]
305module"]
306#[doc(alias = "FDR4")]
307pub type Fdr4 = crate::Reg<fdr4::Fdr4Spec>;
308#[doc = "Endpoint FIFO Data Register 4"]
309pub mod fdr4;
310#[doc = "FDR5 (rw) register accessor: Endpoint FIFO Data Register 5\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`fdr5::R`].  You can [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`fdr5::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@fdr5`]
311module"]
312#[doc(alias = "FDR5")]
313pub type Fdr5 = crate::Reg<fdr5::Fdr5Spec>;
314#[doc = "Endpoint FIFO Data Register 5"]
315pub mod fdr5;
316#[doc = "FDR6 (rw) register accessor: Endpoint FIFO Data Register 6\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`fdr6::R`].  You can [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`fdr6::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@fdr6`]
317module"]
318#[doc(alias = "FDR6")]
319pub type Fdr6 = crate::Reg<fdr6::Fdr6Spec>;
320#[doc = "Endpoint FIFO Data Register 6"]
321pub mod fdr6;
322#[doc = "FDR7 (rw) register accessor: Endpoint FIFO Data Register 7\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`fdr7::R`].  You can [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`fdr7::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@fdr7`]
323module"]
324#[doc(alias = "FDR7")]
325pub type Fdr7 = crate::Reg<fdr7::Fdr7Spec>;
326#[doc = "Endpoint FIFO Data Register 7"]
327pub mod fdr7;
328#[doc = "TXVC (rw) register accessor: Transceiver Control Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`txvc::R`].  You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`txvc::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@txvc`]
329module"]
330#[doc(alias = "TXVC")]
331pub type Txvc = crate::Reg<txvc::TxvcSpec>;
332#[doc = "Transceiver Control Register"]
333pub mod txvc;