File tree Expand file tree Collapse file tree 1 file changed +16
-24
lines changed Expand file tree Collapse file tree 1 file changed +16
-24
lines changed Original file line number Diff line number Diff line change @@ -112,34 +112,26 @@ pub use crate::pac as stm32;
112
112
#[ cfg( feature = "rt" ) ]
113
113
pub use crate :: pac:: interrupt;
114
114
115
+ cfg_if:: cfg_if! {
116
+ if #[ cfg( feature = "device-selected" ) ] {
117
+ pub mod delay;
118
+ pub mod flash;
119
+ pub mod gpio;
120
+ pub mod i2c;
121
+ pub mod prelude;
122
+ pub mod pwm;
123
+ pub mod rcc;
124
+ pub mod rtc;
125
+ pub mod serial;
126
+ pub mod spi;
127
+ pub mod time;
128
+ pub mod timer;
129
+ }
130
+ }
115
131
#[ cfg( feature = "stm32f303" ) ]
116
132
pub mod adc;
117
- #[ cfg( feature = "device-selected" ) ]
118
- pub mod delay;
119
133
#[ cfg( any( feature = "stm32f302" , feature = "stm32f303" ) ) ]
120
134
pub mod dma;
121
- #[ cfg( feature = "device-selected" ) ]
122
- pub mod flash;
123
- #[ cfg( feature = "device-selected" ) ]
124
- pub mod gpio;
125
- #[ cfg( feature = "device-selected" ) ]
126
- pub mod i2c;
127
- #[ cfg( feature = "device-selected" ) ]
128
- pub mod prelude;
129
- #[ cfg( feature = "device-selected" ) ]
130
- pub mod pwm;
131
- #[ cfg( feature = "device-selected" ) ]
132
- pub mod rcc;
133
- #[ cfg( feature = "device-selected" ) ]
134
- pub mod rtc;
135
- #[ cfg( feature = "device-selected" ) ]
136
- pub mod serial;
137
- #[ cfg( feature = "device-selected" ) ]
138
- pub mod spi;
139
- #[ cfg( feature = "device-selected" ) ]
140
- pub mod time;
141
- #[ cfg( feature = "device-selected" ) ]
142
- pub mod timer;
143
135
#[ cfg( all(
144
136
feature = "stm32-usbd" ,
145
137
any(
You can’t perform that action at this time.
0 commit comments