mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2024-12-25 17:42:48 +08:00
Ignore button jitters in bootloader mode
This commit is contained in:
parent
6f49cc0224
commit
00686a91d0
2 changed files with 10 additions and 2 deletions
|
@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file.
|
|||
This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log...
|
||||
|
||||
## [unreleased][unreleased]
|
||||
- Fixed bootloader - Ignore jitters when pressing the button (@wh201906)
|
||||
|
||||
## [Steamboat Willie.4.17768][2024-01-03]
|
||||
- Changed `mem spiffs dump -t` - now supports downloading direct into trace buffer (@hazardousvoltage)
|
||||
|
|
|
@ -252,10 +252,17 @@ static void flash_mode(void) {
|
|||
}
|
||||
}
|
||||
|
||||
if (g_common_area.flags.button_pressed && BUTTON_PRESS() == false) {
|
||||
bool button_state = BUTTON_PRESS();
|
||||
// ~10ms, prevent jitter
|
||||
delay_loop(3333);
|
||||
if (button_state != BUTTON_PRESS()) {
|
||||
// in jitter state, ignore
|
||||
continue;
|
||||
}
|
||||
if (g_common_area.flags.button_pressed && button_state == false) {
|
||||
g_common_area.flags.button_pressed = 0;
|
||||
}
|
||||
if (!g_common_area.flags.button_pressed && BUTTON_PRESS()) {
|
||||
if (!g_common_area.flags.button_pressed && button_state) {
|
||||
/* Perform a reset to leave flash mode */
|
||||
g_common_area.flags.button_pressed = 1;
|
||||
usb_disable();
|
||||
|
|
Loading…
Reference in a new issue