mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-10 06:54:19 +00:00
[FL-3803] NFC: Fix mf desfire detect (#3548)
This commit is contained in:
parent
21e7c46033
commit
74cda02368
1 changed files with 11 additions and 3 deletions
|
@ -225,9 +225,17 @@ static bool mf_desfire_poller_detect(NfcGenericEvent event, void* context) {
|
|||
bool protocol_detected = false;
|
||||
|
||||
if(iso14443_4a_event->type == Iso14443_4aPollerEventTypeReady) {
|
||||
MfDesfireKeyVersion key_version = {0};
|
||||
MfDesfireError error = mf_desfire_poller_read_key_version(instance, 0, &key_version);
|
||||
protocol_detected = (error == MfDesfireErrorNone);
|
||||
do {
|
||||
MfDesfireKeyVersion key_version = 0;
|
||||
MfDesfireError error = mf_desfire_poller_read_key_version(instance, 0, &key_version);
|
||||
if(error != MfDesfireErrorNone) break;
|
||||
|
||||
MfDesfireVersion version = {};
|
||||
error = mf_desfire_poller_read_version(instance, &version);
|
||||
if(error != MfDesfireErrorNone) break;
|
||||
|
||||
protocol_detected = true;
|
||||
} while(false);
|
||||
}
|
||||
|
||||
return protocol_detected;
|
||||
|
|
Loading…
Reference in a new issue