Revert "Revert "Merge branch 'pr/450' into 420""

This reverts commit 076b11e872.
This commit is contained in:
RogueMaster
2022-11-26 17:05:26 -05:00
parent 076b11e872
commit 16a037fc4e
6 changed files with 159 additions and 87 deletions

View File

@@ -6,17 +6,26 @@
#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)) {
if((nfc_data->uid[0] == 0xE0)
&& (nfc_data->uid[1] == 0x04)
&& (nfc_data->uid[2] == 0x01)
&& slix_get_ti(nfc_data) == 2) {
return true;
}
return false;
}
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)) {
if((nfc_data->uid[0] == 0xE0)
&& (nfc_data->uid[1] == 0x04)
&& (nfc_data->uid[2] == 0x01)
&& slix_get_ti(nfc_data) == 1) {
return true;
}
return false;