xmc4400/
usb0_ep1.rs

1#[repr(C)]
2#[doc = "Register block"]
3pub struct RegisterBlock {
4    _reserved_0_diepctl: [u8; 0x04],
5    _reserved1: [u8; 0x04],
6    diepint: DIEPINT,
7    _reserved2: [u8; 0x04],
8    dieptsiz: DIEPTSIZ,
9    diepdma: DIEPDMA,
10    dtxfsts: DTXFSTS,
11    diepdmab: DIEPDMAB,
12    _reserved6: [u8; 0x01e0],
13    _reserved_6_doepctl: [u8; 0x04],
14    _reserved7: [u8; 0x04],
15    doepint: DOEPINT,
16    _reserved8: [u8; 0x04],
17    _reserved_8_doeptsiz: [u8; 0x04],
18    doepdma: DOEPDMA,
19    _reserved10: [u8; 0x04],
20    doepdmab: DOEPDMAB,
21}
22impl RegisterBlock {
23    #[doc = "0x00 - Device Endpoint Control Register \\[INTBULK\\]"]
24    #[inline(always)]
25    pub const fn diepctl_intbulk(&self) -> &DIEPCTL_INTBULK {
26        unsafe { &*core::ptr::from_ref(self).cast::<u8>().cast() }
27    }
28    #[doc = "0x00 - Device Endpoint Control Register \\[ISOCONT\\]"]
29    #[inline(always)]
30    pub const fn diepctl_isocont(&self) -> &DIEPCTL_ISOCONT {
31        unsafe { &*core::ptr::from_ref(self).cast::<u8>().cast() }
32    }
33    #[doc = "0x08 - Device Endpoint Interrupt Register"]
34    #[inline(always)]
35    pub const fn diepint(&self) -> &DIEPINT {
36        &self.diepint
37    }
38    #[doc = "0x10 - Device Endpoint Transfer Size Register"]
39    #[inline(always)]
40    pub const fn dieptsiz(&self) -> &DIEPTSIZ {
41        &self.dieptsiz
42    }
43    #[doc = "0x14 - Device Endpoint DMA Address Register"]
44    #[inline(always)]
45    pub const fn diepdma(&self) -> &DIEPDMA {
46        &self.diepdma
47    }
48    #[doc = "0x18 - Device IN Endpoint Transmit FIFO Status Register"]
49    #[inline(always)]
50    pub const fn dtxfsts(&self) -> &DTXFSTS {
51        &self.dtxfsts
52    }
53    #[doc = "0x1c - Device Endpoint DMA Buffer Address Register"]
54    #[inline(always)]
55    pub const fn diepdmab(&self) -> &DIEPDMAB {
56        &self.diepdmab
57    }
58    #[doc = "0x200 - Device Endpoint Control Register \\[INTBULK\\]"]
59    #[inline(always)]
60    pub const fn doepctl_intbulk(&self) -> &DOEPCTL_INTBULK {
61        unsafe { &*core::ptr::from_ref(self).cast::<u8>().add(512).cast() }
62    }
63    #[doc = "0x200 - Device Endpoint Control Register \\[ISOCONT\\]"]
64    #[inline(always)]
65    pub const fn doepctl_isocont(&self) -> &DOEPCTL_ISOCONT {
66        unsafe { &*core::ptr::from_ref(self).cast::<u8>().add(512).cast() }
67    }
68    #[doc = "0x208 - Device Endpoint Interrupt Register"]
69    #[inline(always)]
70    pub const fn doepint(&self) -> &DOEPINT {
71        &self.doepint
72    }
73    #[doc = "0x210 - Device Endpoint Transfer Size Register \\[CONT\\]"]
74    #[inline(always)]
75    pub const fn doeptsiz_control(&self) -> &DOEPTSIZ_CONTROL {
76        unsafe { &*core::ptr::from_ref(self).cast::<u8>().add(528).cast() }
77    }
78    #[doc = "0x210 - Device Endpoint Transfer Size Register \\[ISO\\]"]
79    #[inline(always)]
80    pub const fn doeptsiz_iso(&self) -> &DOEPTSIZ_ISO {
81        unsafe { &*core::ptr::from_ref(self).cast::<u8>().add(528).cast() }
82    }
83    #[doc = "0x214 - Device Endpoint DMA Address Register"]
84    #[inline(always)]
85    pub const fn doepdma(&self) -> &DOEPDMA {
86        &self.doepdma
87    }
88    #[doc = "0x21c - Device Endpoint DMA Buffer Address Register"]
89    #[inline(always)]
90    pub const fn doepdmab(&self) -> &DOEPDMAB {
91        &self.doepdmab
92    }
93}
94#[doc = "DIEPCTL_ISOCONT (rw) register accessor: Device Endpoint Control Register \\[ISOCONT\\]\n\nYou can [`read`](crate::Reg::read) this register and get [`diepctl_isocont::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`diepctl_isocont::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@diepctl_isocont`]
95module"]
96pub type DIEPCTL_ISOCONT = crate::Reg<diepctl_isocont::DIEPCTL_ISOCONT_SPEC>;
97#[doc = "Device Endpoint Control Register \\[ISOCONT\\]"]
98pub mod diepctl_isocont;
99#[doc = "DIEPCTL_INTBULK (rw) register accessor: Device Endpoint Control Register \\[INTBULK\\]\n\nYou can [`read`](crate::Reg::read) this register and get [`diepctl_intbulk::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`diepctl_intbulk::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@diepctl_intbulk`]
100module"]
101pub type DIEPCTL_INTBULK = crate::Reg<diepctl_intbulk::DIEPCTL_INTBULK_SPEC>;
102#[doc = "Device Endpoint Control Register \\[INTBULK\\]"]
103pub mod diepctl_intbulk;
104#[doc = "DIEPINT (rw) register accessor: Device Endpoint Interrupt Register\n\nYou can [`read`](crate::Reg::read) this register and get [`diepint::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`diepint::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@diepint`]
105module"]
106pub type DIEPINT = crate::Reg<diepint::DIEPINT_SPEC>;
107#[doc = "Device Endpoint Interrupt Register"]
108pub mod diepint;
109#[doc = "DIEPTSIZ (rw) register accessor: Device Endpoint Transfer Size Register\n\nYou can [`read`](crate::Reg::read) this register and get [`dieptsiz::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`dieptsiz::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@dieptsiz`]
110module"]
111pub type DIEPTSIZ = crate::Reg<dieptsiz::DIEPTSIZ_SPEC>;
112#[doc = "Device Endpoint Transfer Size Register"]
113pub mod dieptsiz;
114#[doc = "DIEPDMA (rw) register accessor: Device Endpoint DMA Address Register\n\nYou can [`read`](crate::Reg::read) this register and get [`diepdma::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`diepdma::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\n<div class=\"warning\">One or more dependent resources other than the current register are immediately affected by a read operation.</div>\n\nFor information about available fields see [`mod@diepdma`]
115module"]
116pub type DIEPDMA = crate::Reg<diepdma::DIEPDMA_SPEC>;
117#[doc = "Device Endpoint DMA Address Register"]
118pub mod diepdma;
119#[doc = "DTXFSTS (r) register accessor: Device IN Endpoint Transmit FIFO Status Register\n\nYou can [`read`](crate::Reg::read) this register and get [`dtxfsts::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@dtxfsts`]
120module"]
121pub type DTXFSTS = crate::Reg<dtxfsts::DTXFSTS_SPEC>;
122#[doc = "Device IN Endpoint Transmit FIFO Status Register"]
123pub mod dtxfsts;
124#[doc = "DIEPDMAB (r) register accessor: Device Endpoint DMA Buffer Address Register\n\nYou can [`read`](crate::Reg::read) this register and get [`diepdmab::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@diepdmab`]
125module"]
126pub type DIEPDMAB = crate::Reg<diepdmab::DIEPDMAB_SPEC>;
127#[doc = "Device Endpoint DMA Buffer Address Register"]
128pub mod diepdmab;
129#[doc = "DOEPCTL_ISOCONT (rw) register accessor: Device Endpoint Control Register \\[ISOCONT\\]\n\nYou can [`read`](crate::Reg::read) this register and get [`doepctl_isocont::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`doepctl_isocont::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@doepctl_isocont`]
130module"]
131pub type DOEPCTL_ISOCONT = crate::Reg<doepctl_isocont::DOEPCTL_ISOCONT_SPEC>;
132#[doc = "Device Endpoint Control Register \\[ISOCONT\\]"]
133pub mod doepctl_isocont;
134#[doc = "DOEPCTL_INTBULK (rw) register accessor: Device Endpoint Control Register \\[INTBULK\\]\n\nYou can [`read`](crate::Reg::read) this register and get [`doepctl_intbulk::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`doepctl_intbulk::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@doepctl_intbulk`]
135module"]
136pub type DOEPCTL_INTBULK = crate::Reg<doepctl_intbulk::DOEPCTL_INTBULK_SPEC>;
137#[doc = "Device Endpoint Control Register \\[INTBULK\\]"]
138pub mod doepctl_intbulk;
139#[doc = "DOEPINT (rw) register accessor: Device Endpoint Interrupt Register\n\nYou can [`read`](crate::Reg::read) this register and get [`doepint::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`doepint::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@doepint`]
140module"]
141pub type DOEPINT = crate::Reg<doepint::DOEPINT_SPEC>;
142#[doc = "Device Endpoint Interrupt Register"]
143pub mod doepint;
144#[doc = "DOEPTSIZ_ISO (rw) register accessor: Device Endpoint Transfer Size Register \\[ISO\\]\n\nYou can [`read`](crate::Reg::read) this register and get [`doeptsiz_iso::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`doeptsiz_iso::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@doeptsiz_iso`]
145module"]
146pub type DOEPTSIZ_ISO = crate::Reg<doeptsiz_iso::DOEPTSIZ_ISO_SPEC>;
147#[doc = "Device Endpoint Transfer Size Register \\[ISO\\]"]
148pub mod doeptsiz_iso;
149#[doc = "DOEPTSIZ_CONTROL (rw) register accessor: Device Endpoint Transfer Size Register \\[CONT\\]\n\nYou can [`read`](crate::Reg::read) this register and get [`doeptsiz_control::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`doeptsiz_control::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@doeptsiz_control`]
150module"]
151pub type DOEPTSIZ_CONTROL = crate::Reg<doeptsiz_control::DOEPTSIZ_CONTROL_SPEC>;
152#[doc = "Device Endpoint Transfer Size Register \\[CONT\\]"]
153pub mod doeptsiz_control;
154#[doc = "DOEPDMA (rw) register accessor: Device Endpoint DMA Address Register\n\nYou can [`read`](crate::Reg::read) this register and get [`doepdma::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`doepdma::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\n<div class=\"warning\">One or more dependent resources other than the current register are immediately affected by a read operation.</div>\n\nFor information about available fields see [`mod@doepdma`]
155module"]
156pub type DOEPDMA = crate::Reg<doepdma::DOEPDMA_SPEC>;
157#[doc = "Device Endpoint DMA Address Register"]
158pub mod doepdma;
159#[doc = "DOEPDMAB (r) register accessor: Device Endpoint DMA Buffer Address Register\n\nYou can [`read`](crate::Reg::read) this register and get [`doepdmab::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@doepdmab`]
160module"]
161pub type DOEPDMAB = crate::Reg<doepdmab::DOEPDMAB_SPEC>;
162#[doc = "Device Endpoint DMA Buffer Address Register"]
163pub mod doepdmab;