Merge pull request #3428 from mistial-dev/fix-mifare-usb-recovery

Allow mifare to recover after usb disconnection
This commit is contained in:
Iceman authored and GitHub committed 2026-07-24 21:53:15 +07:00
commit ab5e2d14f1
1 file changed
+6
+6
View File
@@ -37,6 +37,7 @@
#include "desfire_crypto.h" // UL-C authentication helpers
#include "mifare.h" // for iso14a_polling_frame_t structure
#include "cmac_calc.h"
#include "usb_cdc.h"
// Forward declaration: HID Config Card jam support (implemented in secc.c).
// Called from SniffIso14443a when param bit 0x04 is set.
@@ -2790,6 +2791,11 @@ int EmGetCmd(uint8_t *received, uint16_t received_max_len, uint16_t *len, uint8_
return 1;
}
// Keep USB enumeration alive while this real-time loop waits for RF.
if (Uart.state == STATE_14A_UNSYNCD) {
usb_check();
}
flip++;
checker = 4000;
}