Skip to content

Commit a4b03e5

Browse files
committed
update rtic examples
1 parent 258758d commit a4b03e5

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

examples/rtic.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,10 @@ mod app {
3939
timer.listen();
4040

4141
let mut exti = ctx.device.EXTI;
42-
gpioa.pa2.into_pull_up_input().listen(SignalEdge::Falling, &mut exti);
42+
gpioa
43+
.pa2
44+
.into_pull_up_input()
45+
.listen(SignalEdge::Falling, &mut exti);
4346

4447
let mut rtc = ctx.device.RTC.constrain(&mut rcc);
4548
rtc.set_date(&Date::new(2019.year(), 11.month(), 24.day()));

examples/rtic_low_power.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ mod app {
3434

3535
let gpioa = ctx.device.GPIOA.split(&mut rcc);
3636
let led = gpioa.pa15.into_push_pull_output();
37-
let mut button = gpioa.pa2.into_pull_up_input().listen(SignalEdge::Falling, &mut exti);
37+
let mut button = gpioa
38+
.pa2
39+
.into_pull_up_input()
40+
.listen(SignalEdge::Falling, &mut exti);
3841

3942
let mut power = ctx.device.PWR.constrain(&mut rcc);
4043
power.set_mode(PowerMode::UltraLowPower(LowPowerMode::StopMode2));

0 commit comments

Comments
 (0)