Skip to content

Instantly share code, notes, and snippets.

@noahbliss
Last active November 23, 2023 19:29
Show Gist options
  • Save noahbliss/d86fcf8f64b6fa901330656636be31c3 to your computer and use it in GitHub Desktop.
Save noahbliss/d86fcf8f64b6fa901330656636be31c3 to your computer and use it in GitHub Desktop.
pindriver-unexpected-high.rs
use hal::delay::Delay;
use hal::gpio::*;
use hal::peripherals::Peripherals;
fn main() -> anyhow::Result<()> {
hal::sys::link_patches();
let delay = Delay::new_default();
let peripherals = Peripherals::take()?;
let mut led = PinDriver::output(peripherals.pins.gpio42)?;
led.set_low()?;
println!("pindriver run, waiting 1 second before loop.");
delay.delay_ms(1000);
loop {
println!("garbage");
delay.delay_ms(1000);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment