diff --git a/sphinx-key/src/btn.rs b/sphinx-key/src/btn.rs index c7c5ac2..4b4bd4c 100644 --- a/sphinx-key/src/btn.rs +++ b/sphinx-key/src/btn.rs @@ -28,7 +28,7 @@ fn main() -> anyhow::Result<()> { periph::led::led_control_loop(pins.gpio0, peripherals.rmt.channel0, led_rx); // BUTTON thread - periph::button::button_loop(pins.gpio8, led_tx.clone()); + periph::button::button_loop(pins.gpio9, led_tx.clone()); loop { thread::sleep(Duration::from_millis(1000)); diff --git a/sphinx-key/src/main.rs b/sphinx-key/src/main.rs index 37b511e..42e385b 100644 --- a/sphinx-key/src/main.rs +++ b/sphinx-key/src/main.rs @@ -44,7 +44,7 @@ fn main() -> Result<()> { led_control_loop(pins.gpio0, peripherals.rmt.channel0, led_rx); // BUTTON thread - // button_loop(pins.gpio8, led_tx.clone()); + // button_loop(pins.gpio9, led_tx.clone()); // thread::sleep(Duration::from_secs(100)); diff --git a/sphinx-key/src/periph/button.rs b/sphinx-key/src/periph/button.rs index 8b9958c..12c514a 100644 --- a/sphinx-key/src/periph/button.rs +++ b/sphinx-key/src/periph/button.rs @@ -9,9 +9,9 @@ const MILLIS: u16 = 10_000; const PAUSE: u16 = 50; -pub fn button_loop(gpio8: gpio::Gpio8, tx: mpsc::Sender) { +pub fn button_loop(gpio9: gpio::Gpio9, tx: mpsc::Sender) { thread::spawn(move || { - let mut button = PinDriver::input(gpio8).unwrap(); + let mut button = PinDriver::input(gpio9).unwrap(); button.set_pull(Pull::Up).unwrap(); let mut pressed = false; let mut up_times = 0;