From 451b8e1950510db8c8779455bae50879b172e872 Mon Sep 17 00:00:00 2001 From: Tilman Sauerbeck Date: Sun, 5 Jan 2020 19:51:22 +0100 Subject: [PATCH] bootloader: Stay in bootloader when the middle left push button is held. --- src/bootloader/main.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/bootloader/main.rs b/src/bootloader/main.rs index 2ce5980..a775503 100644 --- a/src/bootloader/main.rs +++ b/src/bootloader/main.rs @@ -75,7 +75,7 @@ fn bootloader_requested() -> bool { let start_ticks = systick::now(); while !systick::has_timeout_ms(start_ticks, 3000) { - if (gpio::get(gpio::GPIOE) & (1 << 24)) == 0 { + if (gpio::get(gpio::GPIOE) & (1 << 31)) == 0 { return true; } } @@ -97,10 +97,10 @@ pub unsafe extern "C" fn _start() -> ! { systick::init(); port::init(); - // Configure lower left push button. - gpio::set_direction(gpio::GPIOE, 1 << 24, gpio::Direction::Input); - port::set_af(port::PORTE, 24, 1); - port::set_pull(port::PORTE, 24, port::Pull::Up); + // Configure middle left push button. + gpio::set_direction(gpio::GPIOE, 1 << 31, gpio::Direction::Input); + port::set_af(port::PORTE, 31, 1); + port::set_pull(port::PORTE, 31, port::Pull::Up); enable_interrupts(); -- 2.30.2