Skip to content

Commit

Permalink
Fix pico_rtic_monotonic
Browse files Browse the repository at this point in the history
  • Loading branch information
jannic committed Dec 24, 2023
1 parent 13e54af commit 70be390
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions boards/rp-pico/examples/pico_rtic_monotonic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ mod app {

#[shared]
struct Shared {
led: hal::gpio::Pin<hal::gpio::pin::bank0::Gpio25, hal::gpio::PushPullOutput>,
led: hal::gpio::Pin<
hal::gpio::bank0::Gpio25,
hal::gpio::FunctionSioOutput,
hal::gpio::PullNone,
>,
}

#[monotonic(binds = TIMER_IRQ_0, default = true)]
Expand All @@ -39,7 +43,7 @@ mod app {
}
let mut resets = c.device.RESETS;
let mut watchdog = Watchdog::new(c.device.WATCHDOG);
let _clocks = init_clocks_and_plls(
let clocks = init_clocks_and_plls(
XOSC_CRYSTAL_FREQ,
c.device.XOSC,
c.device.CLOCKS,
Expand All @@ -58,10 +62,10 @@ mod app {
sio.gpio_bank0,
&mut resets,
);
let mut led = pins.led.into_push_pull_output();
let mut led = pins.led.reconfigure();
led.set_low().unwrap();

let mut timer = hal::Timer::new(c.device.TIMER, &mut resets);
let mut timer = hal::Timer::new(c.device.TIMER, &mut resets, &clocks);
let alarm = timer.alarm_0().unwrap();
blink_led::spawn_after(500.millis()).unwrap();

Expand Down

0 comments on commit 70be390

Please sign in to comment.