@@ -6,18 +6,17 @@ use crate::rcc;
6
6
use crate :: stm32;
7
7
8
8
use crate :: gpio:: {
9
- gpioa:: { PA11 , PA12 } ,
9
+ gpioa:: { PA11 , PA12 , PA3 , PA5 } ,
10
+ gpiob:: { PB0 , PB1 , PB10 , PB11 , PB12 , PB13 , PB5 } ,
11
+ gpioc:: { PC0 , PC2 , PC3 } ,
12
+ gpioh:: PH4 ,
13
+ gpioi:: PI11 ,
10
14
Alternate , AF10 ,
11
15
} ;
12
16
13
17
#[ cfg( not( feature = "rm0455" ) ) ]
14
18
use crate :: gpio:: {
15
- gpioa:: { PA3 , PA5 } ,
16
- gpiob:: { PB0 , PB1 , PB10 , PB11 , PB12 , PB13 , PB14 , PB15 , PB5 } ,
17
- gpioc:: PC0 ,
18
- gpioc:: { PC2 , PC3 } ,
19
- gpioh:: PH4 ,
20
- gpioi:: PI11 ,
19
+ gpiob:: { PB14 , PB15 } ,
21
20
AF12 ,
22
21
} ;
23
22
@@ -110,7 +109,6 @@ usb_peripheral! {
110
109
#[ cfg( not( feature = "rm0455" ) ) ]
111
110
pub type Usb2BusType = UsbBus < USB2 > ;
112
111
113
- #[ cfg( not( feature = "rm0455" ) ) ]
114
112
pub struct USB1_ULPI {
115
113
pub usb_global : stm32:: OTG1_HS_GLOBAL ,
116
114
pub usb_device : stm32:: OTG1_HS_DEVICE ,
@@ -131,50 +129,42 @@ pub struct USB1_ULPI {
131
129
pub ulpi_d7 : PB5 < Alternate < AF10 > > ,
132
130
}
133
131
134
- #[ cfg( not( feature = "rm0455" ) ) ]
135
132
pub enum Usb1UlpiDirPin {
136
133
PC2 ( PC2 < Alternate < AF10 > > ) ,
137
134
PI11 ( PI11 < Alternate < AF10 > > ) ,
138
135
}
139
136
140
- #[ cfg( not( feature = "rm0455" ) ) ]
141
137
impl From < PI11 < Alternate < AF10 > > > for Usb1UlpiDirPin {
142
138
fn from ( v : PI11 < Alternate < AF10 > > ) -> Self {
143
139
Usb1UlpiDirPin :: PI11 ( v)
144
140
}
145
141
}
146
142
147
- #[ cfg( not( feature = "rm0455" ) ) ]
148
143
impl From < PC2 < Alternate < AF10 > > > for Usb1UlpiDirPin {
149
144
fn from ( v : PC2 < Alternate < AF10 > > ) -> Self {
150
145
Usb1UlpiDirPin :: PC2 ( v)
151
146
}
152
147
}
153
148
154
- #[ cfg( not( feature = "rm0455" ) ) ]
155
149
pub enum Usb1UlpiNxtPin {
156
150
PC3 ( PC3 < Alternate < AF10 > > ) ,
157
151
PH4 ( PH4 < Alternate < AF10 > > ) ,
158
152
}
159
153
160
- #[ cfg( not( feature = "rm0455" ) ) ]
161
154
impl From < PH4 < Alternate < AF10 > > > for Usb1UlpiNxtPin {
162
155
fn from ( v : PH4 < Alternate < AF10 > > ) -> Self {
163
156
Usb1UlpiNxtPin :: PH4 ( v)
164
157
}
165
158
}
166
159
167
- #[ cfg( not( feature = "rm0455" ) ) ]
168
160
impl From < PC3 < Alternate < AF10 > > > for Usb1UlpiNxtPin {
169
161
fn from ( v : PC3 < Alternate < AF10 > > ) -> Self {
170
162
Usb1UlpiNxtPin :: PC3 ( v)
171
163
}
172
164
}
173
165
174
- #[ cfg( not( feature = "rm0455" ) ) ]
175
166
unsafe impl Sync for USB1_ULPI { }
176
167
177
- #[ cfg( not( feature = "rm0455" ) ) ]
178
168
unsafe impl UsbPeripheral for USB1_ULPI {
179
169
const REGISTERS : * const ( ) = stm32:: OTG1_HS_GLOBAL :: ptr ( ) as * const ( ) ;
180
170
@@ -206,5 +196,4 @@ unsafe impl UsbPeripheral for USB1_ULPI {
206
196
synopsys_usb_otg:: PhyType :: ExternalHighSpeed
207
197
}
208
198
}
209
- #[ cfg( not( feature = "rm0455" ) ) ]
210
199
pub type Usb1UlpiBusType = UsbBus < USB1_ULPI > ;
0 commit comments