From: Tilman Sauerbeck Date: Sun, 5 Jan 2020 18:51:22 +0000 (+0100) Subject: bootloader: Stay in bootloader when the middle left push button is held. X-Git-Url: http://git.code-monkey.de/?a=commitdiff_plain;h=451b8e1950510db8c8779455bae50879b172e872;p=gps-watch.git bootloader: Stay in bootloader when the middle left push button is held. --- 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();