Merge pull request #3274 from gentilkiwi/patch-1

Update mifaredesfire.c to support DESELECT response
This commit is contained in:
Iceman
2026-04-28 08:11:41 +07:00
committed by GitHub
+10 -2
View File
@@ -756,11 +756,19 @@ size_t CreateAPDU(uint8_t *datain, size_t len, uint8_t *dataout) {
// uint32_t crc = crc_finish(&desfire_crc32);
void OnSuccess(void) {
size_t len = 0;
uint8_t resp[MAX_FRAME_SIZE];
uint8_t par[MAX_PARITY_SIZE];
pcb_blocknum = 0;
ReaderTransmit(deselect_cmd, 3, NULL);
if (mifare_ultra_halt()) {
if (g_dbglevel >= DBG_ERROR) Dbprintf("Halt error");
len = ReaderReceive(resp, sizeof(resp), par);
if (len == 0) {
if (mifare_ultra_halt()) {
if (g_dbglevel >= DBG_ERROR) Dbprintf("Halt error");
}
}
switch_off();
}