mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-02-19 08:16:35 +00:00
Add SAK decoding for compliance with ISO/IEC.
This commit is contained in:
@@ -84,6 +84,9 @@ void print_hex_par(const byte_t* pbtData, const size_t szBits, const byte_t* pbt
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
#define SAK_ISO14443_4_COMPLIANT 0x20
|
||||
#define SAK_ISO18092_COMPLIANT 0x40
|
||||
|
||||
void print_nfc_iso14443a_info(const nfc_iso14443a_info_t nai)
|
||||
{
|
||||
printf(" ATQA (SENS_RES): "); print_hex(nai.abtAtqa,2);
|
||||
@@ -93,6 +96,12 @@ void print_nfc_iso14443a_info(const nfc_iso14443a_info_t nai)
|
||||
printf(" ATS (ATR): ");
|
||||
print_hex(nai.abtAts, nai.szAtsLen);
|
||||
}
|
||||
if ( (nai.btSak & SAK_ISO14443_4_COMPLIANT) || (nai.btSak & SAK_ISO18092_COMPLIANT) ) {
|
||||
printf(" Compliant with: ");
|
||||
if (nai.btSak & SAK_ISO14443_4_COMPLIANT) printf("ISO/IEC 14443-4 ");
|
||||
if (nai.btSak & SAK_ISO18092_COMPLIANT) printf("ISO/IEC 18092");
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user