Add print_nfc_felica_info() and print_nfc_iso14443b_info() functions to nfc-utils (used by examples)

This commit is contained in:
Romuald Conty 2010-08-18 12:50:40 +00:00
parent 43694183ff
commit 3dd2257b57
2 changed files with 20 additions and 0 deletions

View file

@ -103,6 +103,22 @@ void print_nfc_iso14443a_info(const nfc_iso14443a_info_t nai)
printf("\n");
}
}
void print_nfc_felica_info(const nfc_felica_info_t nfi)
{
printf(" ID (NFCID2): "); print_hex(nfi.abtId,8);
printf(" Parameter (PAD): "); print_hex(nfi.abtPad,8);
}
void print_nfc_iso14443b_info(const nfc_iso14443b_info_t nbi)
{
printf(" ATQB: "); print_hex(nbi.abtAtqb,12);
printf(" ID: "); print_hex(nbi.abtId,4);
printf(" CID: %02x\n",nbi.btCid);
if (nbi.szInfLen>0) {
printf(" INF: "); print_hex(nbi.abtInf,nbi.szInfLen);
}
printf(" PARAMS: %02x %02x %02x %02x\n",nbi.btParam1,nbi.btParam2,nbi.btParam3,nbi.btParam4);
}
/**
* @brief Tries to parse arguments to find device descriptions.

View file

@ -31,7 +31,11 @@
void print_hex(const byte_t* pbtData, const size_t szLen);
void print_hex_bits(const byte_t* pbtData, const size_t szBits);
void print_hex_par(const byte_t* pbtData, const size_t szBits, const byte_t* pbtDataPar);
void print_nfc_iso14443a_info(const nfc_iso14443a_info_t nai);
void print_nfc_iso14443b_info(const nfc_iso14443b_info_t nbi);
void print_nfc_felica_info(const nfc_felica_info_t nfi);
nfc_device_desc_t* parse_device_desc(int argc, const char *argv[], size_t* szFound);
#endif