Skip to content

Commit 65e8998

Browse files
committed
Remove all feature gates, based on disccusion of irc, some l4x6 DO have the hsi, instead we should feature gate devices per chip
1 parent cf4c538 commit 65e8998

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/rcc.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ impl RccExt for RCC {
5454
apb2: APB2 { _0: () },
5555
bdcr: BDCR { _0: () },
5656
csr: CSR { _0: () },
57-
#[cfg(not(feature = "stm32l4x6"))]
5857
crrcr: CRRCR { _0: () },
5958
cfgr: CFGR {
6059
hclk: None,
@@ -91,7 +90,6 @@ pub struct Rcc {
9190
/// Control/Status Register
9291
pub csr: CSR,
9392
/// Clock recovery RC register
94-
#[cfg(not(feature = "stm32l4x6"))]
9593
pub crrcr: CRRCR,
9694
}
9795

@@ -110,12 +108,10 @@ impl CSR {
110108
}
111109

112110
/// Clock recovery RC register
113-
#[cfg(not(feature = "stm32l4x6"))]
114111
pub struct CRRCR {
115112
_0: (),
116113
}
117114

118-
#[cfg(not(feature = "stm32l4x6"))]
119115
impl CRRCR {
120116
// TODO remove `allow`
121117
#[allow(dead_code)]
@@ -281,8 +277,7 @@ impl CFGR {
281277
self
282278
}
283279

284-
/// Enable the 48Mh USB, RNG, SDMMC clock source. Not available on stm32l4x6 series
285-
#[cfg(not(feature = "stm32l4x6"))]
280+
/// Enable the 48Mh USB, RNG, SDMMC clock source. Not available on all stm32l4x6 series
286281
pub fn hsi48(mut self, on: bool) -> Self
287282
{
288283
self.hsi48 = on;
@@ -504,7 +499,6 @@ impl CFGR {
504499
while rcc.cr.read().msirdy().bit_is_clear() {}
505500
}
506501

507-
#[cfg(not(feature = "stm32l4x6"))]
508502
{
509503
// Turn on USB, RNG Clock using the HSI48 CLK source (default)
510504
if self.hsi48 {

0 commit comments

Comments
 (0)