Allow mifare to recover after usb disconnection

This commit is contained in:
Mistial Developer
2026-07-24 03:07:36 -07:00
parent 4c6e1e84a7
commit bc289cf436
+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;
}