Skip to content

Commit c3d97ff

Browse files
Fix the examples
1 parent 16de589 commit c3d97ff

File tree

5 files changed

+0
-15
lines changed

5 files changed

+0
-15
lines changed

examples/button_irq.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,7 @@ fn main() -> ! {
3939
// Configure PB2 as input.
4040
let button = gpiob.pb2.into_pull_up_input();
4141

42-
#[cfg(feature = "stm32l0x1")]
4342
let mut syscfg = SYSCFG::new(dp.SYSCFG, &mut rcc);
44-
#[cfg(any(feature = "stm32l0x2", feature = "stm32l0x3"))]
45-
let mut syscfg = SYSCFG::new(dp.SYSCFG_COMP, &mut rcc);
4643

4744
// Configure the external interrupt on the falling edge for the pin 0.
4845
let exti = dp.EXTI;

examples/button_irq_rtfm.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,7 @@ const APP: () = {
2828
// Configure PB2 as input.
2929
let button = gpiob.pb2.into_pull_up_input();
3030

31-
#[cfg(feature = "stm32l0x1")]
3231
let mut syscfg = SYSCFG::new(device.SYSCFG, &mut rcc);
33-
#[cfg(any(feature = "stm32l0x2", feature = "stm32l0x3"))]
34-
let mut syscfg = SYSCFG::new(device.SYSCFG_COMP, &mut rcc);
3532

3633
// Configure the external interrupt on the falling edge for the pin 0.
3734
let exti = device.EXTI;

examples/exti_wakeup.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,7 @@ fn main() -> ! {
2929
let button = gpiob.pb2.into_floating_input();
3030
let mut led = gpiob.pb6.into_push_pull_output();
3131

32-
#[cfg(feature = "stm32l0x1")]
3332
let mut syscfg = SYSCFG::new(dp.SYSCFG, &mut rcc);
34-
#[cfg(any(feature = "stm32l0x2", feature = "stm32l0x3"))]
35-
let mut syscfg = SYSCFG::new(dp.SYSCFG_COMP, &mut rcc);
3633

3734
exti.listen(
3835
&mut syscfg,

examples/pwr.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,7 @@ fn main() -> ! {
4444

4545
let mut led = gpiob.pb2.into_push_pull_output().downgrade();
4646

47-
#[cfg(feature = "stm32l0x1")]
4847
let mut syscfg = SYSCFG::new(dp.SYSCFG, &mut rcc);
49-
#[cfg(any(feature = "stm32l0x2", feature = "stm32l0x3"))]
50-
let mut syscfg = SYSCFG::new(dp.SYSCFG_COMP, &mut rcc);
5148

5249
let instant = Instant::new()
5350
.set_year(19)

examples/rtc_wakeup.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,7 @@ fn main() -> ! {
3232
let mut exti = dp.EXTI;
3333
let mut pwr = PWR::new(dp.PWR, &mut rcc);
3434

35-
#[cfg(feature = "stm32l0x1")]
3635
let mut syscfg = SYSCFG::new(dp.SYSCFG, &mut rcc);
37-
#[cfg(any(feature = "stm32l0x2", feature = "stm32l0x3"))]
38-
let mut syscfg = SYSCFG::new(dp.SYSCFG_COMP, &mut rcc);
3936

4037
let instant = Instant::new()
4138
.set_year(19)

0 commit comments

Comments
 (0)