fix SLIX/SLIX2 type indicator bits

This commit is contained in:
g3gg0
2022-11-26 16:31:32 +01:00
parent 0cb784aadd
commit 4b18370dfa
+6 -2
View File
@@ -6,12 +6,16 @@
#include <furi.h>
#include "furi_hal_nfc.h"
uint8_t slix_get_ti(FuriHalNfcDevData* nfc_data) {
return (nfc_data->uid[3] >> 3) & 3;
}
bool slix_check_card_type(FuriHalNfcDevData* nfc_data) {
if((nfc_data->uid[0] == 0xE0)
&& (nfc_data->uid[1] == 0x04)
&& (nfc_data->uid[2] == 0x01)
&& (((nfc_data->uid[3] >> 4) & 3) == 2)) {
&& slix_get_ti(nfc_data) == 2) {
return true;
}
return false;
@@ -21,7 +25,7 @@ bool slix2_check_card_type(FuriHalNfcDevData* nfc_data) {
if((nfc_data->uid[0] == 0xE0)
&& (nfc_data->uid[1] == 0x04)
&& (nfc_data->uid[2] == 0x01)
&& (((nfc_data->uid[3] >> 4) & 3) == 1)) {
&& slix_get_ti(nfc_data) == 1) {
return true;
}
return false;