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