stm32f1_staging/stm32f101/
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/STM32F101.html#USB:EP0R)
92
93For information about available fields see [`mod@ep0r`] module*/
94pub type EP0R = crate::Reg<ep0r::EP0Rrs>;
95///endpoint 0 register
96pub mod ep0r;
97/**EP1R (rw) register accessor: endpoint 1 register
98
99You 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).
100
101See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F101.html#USB:EP1R)
102
103For information about available fields see [`mod@ep1r`] module*/
104pub type EP1R = crate::Reg<ep1r::EP1Rrs>;
105///endpoint 1 register
106pub mod ep1r;
107/**EP2R (rw) register accessor: endpoint 2 register
108
109You 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).
110
111See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F101.html#USB:EP2R)
112
113For information about available fields see [`mod@ep2r`] module*/
114pub type EP2R = crate::Reg<ep2r::EP2Rrs>;
115///endpoint 2 register
116pub mod ep2r;
117/**EP3R (rw) register accessor: endpoint 3 register
118
119You 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).
120
121See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F101.html#USB:EP3R)
122
123For information about available fields see [`mod@ep3r`] module*/
124pub type EP3R = crate::Reg<ep3r::EP3Rrs>;
125///endpoint 3 register
126pub mod ep3r;
127/**EP4R (rw) register accessor: endpoint 4 register
128
129You 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).
130
131See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F101.html#USB:EP4R)
132
133For information about available fields see [`mod@ep4r`] module*/
134pub type EP4R = crate::Reg<ep4r::EP4Rrs>;
135///endpoint 4 register
136pub mod ep4r;
137/**EP5R (rw) register accessor: endpoint 5 register
138
139You 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).
140
141See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F101.html#USB:EP5R)
142
143For information about available fields see [`mod@ep5r`] module*/
144pub type EP5R = crate::Reg<ep5r::EP5Rrs>;
145///endpoint 5 register
146pub mod ep5r;
147/**EP6R (rw) register accessor: endpoint 6 register
148
149You 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).
150
151See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F101.html#USB:EP6R)
152
153For information about available fields see [`mod@ep6r`] module*/
154pub type EP6R = crate::Reg<ep6r::EP6Rrs>;
155///endpoint 6 register
156pub mod ep6r;
157/**EP7R (rw) register accessor: endpoint 7 register
158
159You 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).
160
161See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F101.html#USB:EP7R)
162
163For information about available fields see [`mod@ep7r`] module*/
164pub type EP7R = crate::Reg<ep7r::EP7Rrs>;
165///endpoint 7 register
166pub mod ep7r;
167/**CNTR (rw) register accessor: control register
168
169You 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).
170
171See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F101.html#USB:CNTR)
172
173For information about available fields see [`mod@cntr`] module*/
174pub type CNTR = crate::Reg<cntr::CNTRrs>;
175///control register
176pub mod cntr;
177/**ISTR (rw) register accessor: interrupt status register
178
179You 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).
180
181See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F101.html#USB:ISTR)
182
183For information about available fields see [`mod@istr`] module*/
184pub type ISTR = crate::Reg<istr::ISTRrs>;
185///interrupt status register
186pub mod istr;
187/**FNR (r) register accessor: frame number register
188
189You can [`read`](crate::Reg::read) this register and get [`fnr::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
190
191See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F101.html#USB:FNR)
192
193For information about available fields see [`mod@fnr`] module*/
194pub type FNR = crate::Reg<fnr::FNRrs>;
195///frame number register
196pub mod fnr;
197/**DADDR (rw) register accessor: device address
198
199You 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).
200
201See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F101.html#USB:DADDR)
202
203For information about available fields see [`mod@daddr`] module*/
204pub type DADDR = crate::Reg<daddr::DADDRrs>;
205///device address
206pub mod daddr;
207/**BTABLE (rw) register accessor: Buffer table address
208
209You 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).
210
211See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F101.html#USB:BTABLE)
212
213For information about available fields see [`mod@btable`] module*/
214pub type BTABLE = crate::Reg<btable::BTABLErs>;
215///Buffer table address
216pub mod btable;