Add SAK decoding for compliance with ISO/IEC.
This commit is contained in:
parent
6e84e757c7
commit
eeaad85151
1 changed files with 9 additions and 0 deletions
|
@ -84,6 +84,9 @@ void print_hex_par(const byte_t* pbtData, const size_t szBits, const byte_t* pbt
|
||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define SAK_ISO14443_4_COMPLIANT 0x20
|
||||||
|
#define SAK_ISO18092_COMPLIANT 0x40
|
||||||
|
|
||||||
void print_nfc_iso14443a_info(const nfc_iso14443a_info_t nai)
|
void print_nfc_iso14443a_info(const nfc_iso14443a_info_t nai)
|
||||||
{
|
{
|
||||||
printf(" ATQA (SENS_RES): "); print_hex(nai.abtAtqa,2);
|
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): ");
|
printf(" ATS (ATR): ");
|
||||||
print_hex(nai.abtAts, nai.szAtsLen);
|
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");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue