Add convenience library infrastructure and move the print_nfc_iso14443a_info() function away from bitutils.
This commit is contained in:
parent
2714180227
commit
ee3715e267
6 changed files with 51 additions and 14 deletions
15
examples/nfc-utils.c
Normal file
15
examples/nfc-utils.c
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#include <nfc/nfc.h>
|
||||
|
||||
#include "bitutils.h"
|
||||
#include "nfc-utils.h"
|
||||
|
||||
void print_nfc_iso14443a_info(const nfc_iso14443a_info_t nai)
|
||||
{
|
||||
printf(" ATQA (SENS_RES): "); print_hex(nai.abtAtqa,2);
|
||||
printf(" UID (NFCID%c): ",(nai.abtUid[0]==0x08?'3':'1')); print_hex(nai.abtUid, nai.szUidLen);
|
||||
printf(" SAK (SEL_RES): "); print_hex(&nai.btSak,1);
|
||||
if (nai.szAtsLen) {
|
||||
printf(" ATS (ATR): ");
|
||||
print_hex(nai.abtAts, nai.szAtsLen);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue