From 2b13098443cf6e4db5541e548f16b88197d2bca1 Mon Sep 17 00:00:00 2001 From: Evan Feenstra Date: Tue, 9 May 2023 21:49:49 +0100 Subject: [PATCH] set_pull(Pull::Up) --- sphinx-key/src/periph/button.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sphinx-key/src/periph/button.rs b/sphinx-key/src/periph/button.rs index 5b0ad86..91793e7 100644 --- a/sphinx-key/src/periph/button.rs +++ b/sphinx-key/src/periph/button.rs @@ -12,7 +12,7 @@ const PAUSE: u16 = 15; pub fn button_loop(gpio8: gpio::Gpio8, tx: mpsc::Sender) { thread::spawn(move || { let mut button = PinDriver::input(gpio8).unwrap(); - button.set_pull(Pull::Down).unwrap(); + button.set_pull(Pull::Up).unwrap(); let mut high = false; let mut high_times = 0; let mut low_times = 0;