stm32f3_staging/stm32f302/
usb.rs

1#[repr(C)]
2#[derive(Debug)]
3///Register block
4pub struct RegisterBlock {
5    ep0r: EP0R,
6    ep1r: EP1R,
7    ep2r: EP2R,
8    ep3r: EP3R,
9    ep4r: EP4R,
10    ep5r: EP5R,
11    ep6r: EP6R,
12    ep7r: EP7R,
13    _reserved8: [u8; 0x20],
14    cntr: CNTR,
15    istr: ISTR,
16    fnr: FNR,
17    daddr: DADDR,
18    btable: BTABLE,
19}
20impl RegisterBlock {
21    ///0x00 - endpoint 0 register
22    #[inline(always)]
23    pub const fn ep0r(&self) -> &EP0R {
24        &self.ep0r
25    }
26    ///0x04 - endpoint 1 register
27    #[inline(always)]
28    pub const fn ep1r(&self) -> &EP1R {
29        &self.ep1r
30    }
31    ///0x08 - endpoint 2 register
32    #[inline(always)]
33    pub const fn ep2r(&self) -> &EP2R {
34        &self.ep2r
35    }
36    ///0x0c - endpoint 3 register
37    #[inline(always)]
38    pub const fn ep3r(&self) -> &EP3R {
39        &self.ep3r
40    }
41    ///0x10 - endpoint 4 register
42    #[inline(always)]
43    pub const fn ep4r(&self) -> &EP4R {
44        &self.ep4r
45    }
46    ///0x14 - endpoint 5 register
47    #[inline(always)]
48    pub const fn ep5r(&self) -> &EP5R {
49        &self.ep5r
50    }
51    ///0x18 - endpoint 6 register
52    #[inline(always)]
53    pub const fn ep6r(&self) -> &EP6R {
54        &self.ep6r
55    }
56    ///0x1c - endpoint 7 register
57    #[inline(always)]
58    pub const fn ep7r(&self) -> &EP7R {
59        &self.ep7r
60    }
61    ///0x40 - control register
62    #[inline(always)]
63    pub const fn cntr(&self) -> &CNTR {
64        &self.cntr
65    }
66    ///0x44 - interrupt status register
67    #[inline(always)]
68    pub const fn istr(&self) -> &ISTR {
69        &self.istr
70    }
71    ///0x48 - frame number register
72    #[inline(always)]
73    pub const fn fnr(&self) -> &FNR {
74        &self.fnr
75    }
76    ///0x4c - device address
77    #[inline(always)]
78    pub const fn daddr(&self) -> &DADDR {
79        &self.daddr
80    }
81    ///0x50 - Buffer table address
82    #[inline(always)]
83    pub const fn btable(&self) -> &BTABLE {
84        &self.btable
85    }
86}
87/**EP0R (rw) register accessor: endpoint 0 register
88
89You can [`read`](crate::Reg::read) this register and get [`ep0r::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ep0r::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
90
91See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F302.html#USB:EP0R)
92
93For information about available fields see [`mod@ep0r`]
94module*/
95pub type EP0R = crate::Reg<ep0r::EP0Rrs>;
96///endpoint 0 register
97pub mod ep0r;
98/**EP1R (rw) register accessor: endpoint 1 register
99
100You can [`read`](crate::Reg::read) this register and get [`ep1r::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ep1r::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
101
102See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F302.html#USB:EP1R)
103
104For information about available fields see [`mod@ep1r`]
105module*/
106pub type EP1R = crate::Reg<ep1r::EP1Rrs>;
107///endpoint 1 register
108pub mod ep1r;
109/**EP2R (rw) register accessor: endpoint 2 register
110
111You can [`read`](crate::Reg::read) this register and get [`ep2r::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ep2r::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
112
113See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F302.html#USB:EP2R)
114
115For information about available fields see [`mod@ep2r`]
116module*/
117pub type EP2R = crate::Reg<ep2r::EP2Rrs>;
118///endpoint 2 register
119pub mod ep2r;
120/**EP3R (rw) register accessor: endpoint 3 register
121
122You can [`read`](crate::Reg::read) this register and get [`ep3r::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ep3r::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
123
124See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F302.html#USB:EP3R)
125
126For information about available fields see [`mod@ep3r`]
127module*/
128pub type EP3R = crate::Reg<ep3r::EP3Rrs>;
129///endpoint 3 register
130pub mod ep3r;
131/**EP4R (rw) register accessor: endpoint 4 register
132
133You can [`read`](crate::Reg::read) this register and get [`ep4r::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ep4r::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
134
135See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F302.html#USB:EP4R)
136
137For information about available fields see [`mod@ep4r`]
138module*/
139pub type EP4R = crate::Reg<ep4r::EP4Rrs>;
140///endpoint 4 register
141pub mod ep4r;
142/**EP5R (rw) register accessor: endpoint 5 register
143
144You can [`read`](crate::Reg::read) this register and get [`ep5r::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ep5r::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
145
146See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F302.html#USB:EP5R)
147
148For information about available fields see [`mod@ep5r`]
149module*/
150pub type EP5R = crate::Reg<ep5r::EP5Rrs>;
151///endpoint 5 register
152pub mod ep5r;
153/**EP6R (rw) register accessor: endpoint 6 register
154
155You can [`read`](crate::Reg::read) this register and get [`ep6r::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ep6r::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
156
157See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F302.html#USB:EP6R)
158
159For information about available fields see [`mod@ep6r`]
160module*/
161pub type EP6R = crate::Reg<ep6r::EP6Rrs>;
162///endpoint 6 register
163pub mod ep6r;
164/**EP7R (rw) register accessor: endpoint 7 register
165
166You can [`read`](crate::Reg::read) this register and get [`ep7r::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ep7r::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
167
168See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F302.html#USB:EP7R)
169
170For information about available fields see [`mod@ep7r`]
171module*/
172pub type EP7R = crate::Reg<ep7r::EP7Rrs>;
173///endpoint 7 register
174pub mod ep7r;
175/**CNTR (rw) register accessor: control register
176
177You can [`read`](crate::Reg::read) this register and get [`cntr::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`cntr::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
178
179See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F302.html#USB:CNTR)
180
181For information about available fields see [`mod@cntr`]
182module*/
183pub type CNTR = crate::Reg<cntr::CNTRrs>;
184///control register
185pub mod cntr;
186/**ISTR (rw) register accessor: interrupt status register
187
188You can [`read`](crate::Reg::read) this register and get [`istr::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`istr::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
189
190See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F302.html#USB:ISTR)
191
192For information about available fields see [`mod@istr`]
193module*/
194pub type ISTR = crate::Reg<istr::ISTRrs>;
195///interrupt status register
196pub mod istr;
197/**FNR (r) register accessor: frame number register
198
199You can [`read`](crate::Reg::read) this register and get [`fnr::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
200
201See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F302.html#USB:FNR)
202
203For information about available fields see [`mod@fnr`]
204module*/
205pub type FNR = crate::Reg<fnr::FNRrs>;
206///frame number register
207pub mod fnr;
208/**DADDR (rw) register accessor: device address
209
210You can [`read`](crate::Reg::read) this register and get [`daddr::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`daddr::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
211
212See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F302.html#USB:DADDR)
213
214For information about available fields see [`mod@daddr`]
215module*/
216pub type DADDR = crate::Reg<daddr::DADDRrs>;
217///device address
218pub mod daddr;
219/**BTABLE (rw) register accessor: Buffer table address
220
221You can [`read`](crate::Reg::read) this register and get [`btable::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`btable::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
222
223See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F302.html#USB:BTABLE)
224
225For information about available fields see [`mod@btable`]
226module*/
227pub type BTABLE = crate::Reg<btable::BTABLErs>;
228///Buffer table address
229pub mod btable;