mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-20 13:23:25 -07:00
Allow clean Legic simulation exit without button press (#668)
This commit is contained in:
parent
1b902aa01a
commit
53edb044c0
1 changed files with 2 additions and 1 deletions
|
@ -19,6 +19,7 @@
|
|||
#include "legic_prng.h"
|
||||
#include "legic.h"
|
||||
#include "crc.h"
|
||||
#include "usb_cdc.h" // for usb_poll_validate_length
|
||||
|
||||
static uint8_t* legic_mem; /* card memory, used for sim */
|
||||
static legic_card_select_t card;/* metadata of currently selected card */
|
||||
|
@ -439,7 +440,7 @@ void LegicRfSimulate(uint8_t cardtype) {
|
|||
|
||||
LED_A_ON();
|
||||
DbpString("Starting Legic emulator, press button to end");
|
||||
while(!BUTTON_PRESS()) {
|
||||
while(!BUTTON_PRESS() && !usb_poll_validate_length()) {
|
||||
WDT_HIT();
|
||||
|
||||
// wait for carrier, restart after timeout
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue