mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-03-01 02:27:21 +08:00
less checks for dataavailable
This commit is contained in:
parent
91a79c2318
commit
9639ee8e81
1 changed files with 11 additions and 1 deletions
|
@ -529,11 +529,21 @@ void Mifare1ksim(uint16_t flags, uint8_t exitAfterNReads, uint8_t *datain, uint1
|
|||
LED_D_ON();
|
||||
ResetSspClk();
|
||||
|
||||
int counter = 0;
|
||||
bool finished = false;
|
||||
bool button_pushed = BUTTON_PRESS();
|
||||
while (!button_pushed && !finished) {
|
||||
|
||||
while (!button_pushed && !finished && !data_available()) {
|
||||
WDT_HIT();
|
||||
|
||||
if (counter == 2000) {
|
||||
if (data_available()) {
|
||||
break;
|
||||
}
|
||||
counter = 0;
|
||||
} else {
|
||||
counter++;
|
||||
}
|
||||
|
||||
// find reader field
|
||||
if (cardSTATE == MFEMUL_NOFIELD) {
|
||||
|
|
Loading…
Reference in a new issue