@@ -15,11 +15,13 @@ use crate::gpio::{
15
15
gpiob:: { PB0 , PB1 , PB10 , PB11 , PB12 , PB13 , PB5 } ,
16
16
gpioc:: { PC0 , PC2 , PC3 } ,
17
17
gpioh:: PH4 ,
18
- gpioi:: PI11 ,
19
18
Alternate , AF10 ,
20
19
} ;
21
20
22
- #[ cfg( not( feature = "rm0455" ) ) ]
21
+ #[ cfg( not( feature = "rm0468" ) ) ]
22
+ use crate :: gpio:: gpioi:: PI11 ;
23
+
24
+ #[ cfg( any( feature = "rm0433" , feature = "rm0399" ) ) ]
23
25
use crate :: gpio:: {
24
26
gpiob:: { PB14 , PB15 } ,
25
27
AF12 ,
@@ -38,7 +40,7 @@ pub struct USB1 {
38
40
pub hclk : Hertz ,
39
41
}
40
42
impl USB1 {
41
- #[ cfg( not ( feature = "rm0455 " ) ) ]
43
+ #[ cfg( any ( feature = "rm0433" , feature = "rm0399 ") ) ]
42
44
pub fn new (
43
45
usb_global : stm32:: OTG1_HS_GLOBAL ,
44
46
usb_device : stm32:: OTG1_HS_DEVICE ,
@@ -50,7 +52,7 @@ impl USB1 {
50
52
) -> Self {
51
53
Self :: new_unchecked ( usb_global, usb_device, usb_pwrclk, prec, clocks)
52
54
}
53
- #[ cfg( feature = "rm0455" ) ]
55
+ #[ cfg( any ( feature = "rm0455" , feature = "rm0468" ) ) ]
54
56
pub fn new (
55
57
usb_global : stm32:: OTG1_HS_GLOBAL ,
56
58
usb_device : stm32:: OTG1_HS_DEVICE ,
@@ -79,15 +81,15 @@ impl USB1 {
79
81
}
80
82
}
81
83
82
- #[ cfg( not ( feature = "rm0455 " ) ) ]
84
+ #[ cfg( any ( feature = "rm0433" , feature = "rm0399 ") ) ]
83
85
pub struct USB2 {
84
86
pub usb_global : stm32:: OTG2_HS_GLOBAL ,
85
87
pub usb_device : stm32:: OTG2_HS_DEVICE ,
86
88
pub usb_pwrclk : stm32:: OTG2_HS_PWRCLK ,
87
89
pub prec : rcc:: rec:: Usb2Otg ,
88
90
pub hclk : Hertz ,
89
91
}
90
- #[ cfg( not ( feature = "rm0455 " ) ) ]
92
+ #[ cfg( any ( feature = "rm0433" , feature = "rm0399 ") ) ]
91
93
impl USB2 {
92
94
pub fn new (
93
95
usb_global : stm32:: OTG2_HS_GLOBAL ,
@@ -161,11 +163,11 @@ usb_peripheral! {
161
163
}
162
164
pub type Usb1BusType = UsbBus < USB1 > ;
163
165
164
- #[ cfg( not ( feature = "rm0455 " ) ) ]
166
+ #[ cfg( any ( feature = "rm0433" , feature = "rm0399 ") ) ]
165
167
usb_peripheral ! {
166
168
USB2 , OTG2_HS_GLOBAL , usb2otgen, usb2otgrst
167
169
}
168
- #[ cfg( not ( feature = "rm0455 " ) ) ]
170
+ #[ cfg( any ( feature = "rm0433" , feature = "rm0399 ") ) ]
169
171
pub type Usb2BusType = UsbBus < USB2 > ;
170
172
171
173
pub struct USB1_ULPI {
@@ -178,9 +180,11 @@ pub struct USB1_ULPI {
178
180
179
181
pub enum Usb1UlpiDirPin {
180
182
PC2 ( PC2 < Alternate < AF10 > > ) ,
183
+ #[ cfg( not( feature = "rm0468" ) ) ]
181
184
PI11 ( PI11 < Alternate < AF10 > > ) ,
182
185
}
183
186
187
+ #[ cfg( not( feature = "rm0468" ) ) ]
184
188
impl From < PI11 < Alternate < AF10 > > > for Usb1UlpiDirPin {
185
189
fn from ( v : PI11 < Alternate < AF10 > > ) -> Self {
186
190
Usb1UlpiDirPin :: PI11 ( v)
0 commit comments