@@ -63,13 +63,8 @@ mod pll;
63
63
mod enable;
64
64
use crate :: pac:: rcc:: RegisterBlock as RccRB ;
65
65
66
- pub mod sealed {
67
- pub trait Sealed { }
68
- }
69
- pub ( crate ) use sealed:: Sealed ;
70
-
71
66
/// Bus associated to peripheral
72
- pub trait RccBus {
67
+ pub trait RccBus : crate :: Sealed {
73
68
/// Bus type;
74
69
type Bus ;
75
70
}
@@ -138,10 +133,12 @@ impl AHB1 {
138
133
}
139
134
140
135
/// AMBA High-performance Bus 2 (AHB2) registers
136
+ #[ cfg( not( feature = "stm32f410" ) ) ]
141
137
pub struct AHB2 {
142
138
_0 : ( ) ,
143
139
}
144
140
141
+ #[ cfg( not( feature = "stm32f410" ) ) ]
145
142
impl AHB2 {
146
143
#[ inline( always) ]
147
144
fn enr ( rcc : & RccRB ) -> & rcc:: AHB2ENR {
@@ -158,17 +155,22 @@ impl AHB2 {
158
155
}
159
156
160
157
/// AMBA High-performance Bus 3 (AHB3) registers
161
- #[ cfg( feature = "fsmc" ) ]
158
+ #[ cfg( any ( feature = "fsmc" , feature = "fmc" ) ) ]
162
159
pub struct AHB3 {
163
160
_0 : ( ) ,
164
161
}
165
162
166
- #[ cfg( feature = "fsmc" ) ]
163
+ #[ cfg( any ( feature = "fsmc" , feature = "fmc" ) ) ]
167
164
impl AHB3 {
168
165
#[ inline( always) ]
169
166
fn enr ( rcc : & RccRB ) -> & rcc:: AHB3ENR {
170
167
& rcc. ahb3enr
171
168
}
169
+ #[ cfg( feature = "fmc" ) ]
170
+ #[ inline( always) ]
171
+ fn lpenr ( rcc : & RccRB ) -> & rcc:: AHB3LPENR {
172
+ & rcc. ahb3lpenr
173
+ }
172
174
#[ inline( always) ]
173
175
fn rstr ( rcc : & RccRB ) -> & rcc:: AHB3RSTR {
174
176
& rcc. ahb3rstr
@@ -221,13 +223,14 @@ impl GetBusFreq for AHB1 {
221
223
}
222
224
}
223
225
226
+ #[ cfg( not( feature = "stm32f410" ) ) ]
224
227
impl GetBusFreq for AHB2 {
225
228
fn get_frequency ( clocks : & Clocks ) -> Hertz {
226
229
clocks. hclk
227
230
}
228
231
}
229
232
230
- #[ cfg( feature = "fsmc" ) ]
233
+ #[ cfg( any ( feature = "fsmc" , feature = "fmc" ) ) ]
231
234
impl GetBusFreq for AHB3 {
232
235
fn get_frequency ( clocks : & Clocks ) -> Hertz {
233
236
clocks. hclk
0 commit comments