Skip to content

Commit

Permalink
Update blinky code
Browse files Browse the repository at this point in the history
  • Loading branch information
SFrijters committed Dec 29, 2024
1 parent b938364 commit d34745e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions blinky/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// Based on https://github.com/esp-rs/esp-hal/blob/v0.21.1/examples/src/bin/blinky.rs
// Based on https://github.com/esp-rs/esp-hal/blob/fbc57542a8f4b71e30f0dcea4045c508ce753139/examples/src/bin/blinky.rs
// The example was removed in 0.22.0
// See: https://github.com/esp-rs/esp-hal/pull/2538

//! Blinks an LED
//!
Expand All @@ -14,7 +16,7 @@ use esp_backtrace as _;
use esp_println::println;
use esp_hal::{
delay::Delay,
gpio::{Io, Level, Output},
gpio::{Level, Output},
prelude::*,
};

Expand All @@ -25,8 +27,7 @@ fn main() -> ! {
println!("Hello world!");

// Set GPIO10 as an output, and set its state high initially.
let io = Io::new(peripherals.GPIO, peripherals.IO_MUX);
let mut led = Output::new(io.pins.gpio10, Level::High);
let mut led = Output::new(peripherals.GPIO10, Level::High);

let delay = Delay::new();

Expand Down

0 comments on commit d34745e

Please sign in to comment.