Extend max length for firmware description & fix typo
This commit is contained in:
parent
17c63aebb5
commit
96538d052b
10 changed files with 14 additions and 14 deletions
|
@ -15,7 +15,7 @@ main (int argc, const char *argv[])
|
|||
|
||||
// Display libnfc version
|
||||
const char *acLibnfcVersion = nfc_version ();
|
||||
printf ("%s use libnfc %s\n", argv[0], acLibnfcVersion);
|
||||
printf ("%s uses libnfc %s\n", argv[0], acLibnfcVersion);
|
||||
|
||||
// Connect using the first available NFC device
|
||||
pnd = nfc_connect (NULL);
|
||||
|
|
|
@ -184,7 +184,7 @@ main (int argc, char *argv[])
|
|||
|
||||
// Display libnfc version
|
||||
acLibnfcVersion = nfc_version ();
|
||||
printf ("%s use libnfc %s\n", argv[0], acLibnfcVersion);
|
||||
printf ("%s uses libnfc %s\n", argv[0], acLibnfcVersion);
|
||||
|
||||
if (pnd == NULL) {
|
||||
ERR("Unable to connect to NFC device");
|
||||
|
|
|
@ -71,7 +71,7 @@ main (int argc, const char *argv[])
|
|||
|
||||
// Display libnfc version
|
||||
acLibnfcVersion = nfc_version ();
|
||||
printf ("%s use libnfc %s\n", argv[0], acLibnfcVersion);
|
||||
printf ("%s uses libnfc %s\n", argv[0], acLibnfcVersion);
|
||||
|
||||
pnddDevices = parse_args (argc, argv, &szDeviceFound, &verbose);
|
||||
#ifdef HAVE_LIBUSB
|
||||
|
|
|
@ -81,7 +81,7 @@ main (int argc, const char *argv[])
|
|||
errx (1, "usage: %s", argv[0]);
|
||||
}
|
||||
|
||||
printf ("%s use libnfc %s\n", argv[0], acLibnfcVersion);
|
||||
printf ("%s uses libnfc %s\n", argv[0], acLibnfcVersion);
|
||||
|
||||
if (szFound == 0) {
|
||||
if (!(pnddDevices = malloc (MAX_DEVICE_COUNT * sizeof (*pnddDevices)))) {
|
||||
|
|
|
@ -195,7 +195,7 @@ main (int argc, char *argv[])
|
|||
}
|
||||
|
||||
// Display libnfc version
|
||||
printf ("%s use libnfc %s\n", argv[0], acLibnfcVersion);
|
||||
printf ("%s uses libnfc %s\n", argv[0], acLibnfcVersion);
|
||||
|
||||
#ifdef WIN32
|
||||
signal (SIGINT, (void (__cdecl *) (int)) intr_hdlr);
|
||||
|
|
|
@ -101,7 +101,7 @@ main (int argc, char *argv[])
|
|||
}
|
||||
|
||||
// Display libnfc version
|
||||
printf ("%s use libnfc %s\n", argv[0], acLibnfcVersion);
|
||||
printf ("%s uses libnfc %s\n", argv[0], acLibnfcVersion);
|
||||
|
||||
#ifdef WIN32
|
||||
signal (SIGINT, (void (__cdecl *) (int)) intr_hdlr);
|
||||
|
|
|
@ -64,7 +64,7 @@ main (int argc, const char *argv[])
|
|||
}
|
||||
// Display libnfc version
|
||||
acLibnfcVersion = nfc_version ();
|
||||
printf ("%s use libnfc %s\n", argv[0], acLibnfcVersion);
|
||||
printf ("%s uses libnfc %s\n", argv[0], acLibnfcVersion);
|
||||
|
||||
if (!(pnddDevices = malloc (MAX_DEVICE_COUNT * sizeof (*pnddDevices)))) {
|
||||
fprintf (stderr, "malloc() failed\n");
|
||||
|
|
|
@ -128,7 +128,7 @@ main (int argc, const char *argv[])
|
|||
|
||||
// Display libnfc version
|
||||
const char *acLibnfcVersion = nfc_version ();
|
||||
printf ("%s use libnfc %s\n", argv[0], acLibnfcVersion);
|
||||
printf ("%s uses libnfc %s\n", argv[0], acLibnfcVersion);
|
||||
|
||||
// Connect using the first available NFC device
|
||||
pnd = nfc_connect (NULL);
|
||||
|
|
|
@ -64,7 +64,7 @@ bool
|
|||
pn53x_init(nfc_device_t * pnd)
|
||||
{
|
||||
// GetFirmwareVersion command is used to set PN53x chips type (PN531, PN532 or PN533)
|
||||
char abtFirmwareText[18];
|
||||
char abtFirmwareText[22];
|
||||
if (!pn53x_get_firmware_version (pnd, abtFirmwareText)) {
|
||||
return false;
|
||||
}
|
||||
|
@ -579,7 +579,7 @@ pn53x_writeback_register (nfc_device_t * pnd)
|
|||
}
|
||||
|
||||
bool
|
||||
pn53x_get_firmware_version (nfc_device_t * pnd, char abtFirmwareText[18])
|
||||
pn53x_get_firmware_version (nfc_device_t * pnd, char abtFirmwareText[22])
|
||||
{
|
||||
const byte_t abtCmd[] = { GetFirmwareVersion };
|
||||
byte_t abtFw[4];
|
||||
|
@ -606,15 +606,15 @@ pn53x_get_firmware_version (nfc_device_t * pnd, char abtFirmwareText[18])
|
|||
// Convert firmware info in text, PN531 gives 2 bytes info, but PN532 and PN533 gives 4
|
||||
switch (CHIP_DATA(pnd)->type) {
|
||||
case PN531:
|
||||
snprintf (abtFirmwareText, 18, "PN531 v%d.%d", abtFw[0], abtFw[1]);
|
||||
snprintf (abtFirmwareText, 22, "PN531 v%d.%d", abtFw[0], abtFw[1]);
|
||||
pnd->btSupportByte = SUPPORT_ISO14443A | SUPPORT_ISO18092;
|
||||
break;
|
||||
case PN532:
|
||||
snprintf (abtFirmwareText, 18, "PN532 v%d.%d (0x%02x)", abtFw[1], abtFw[2], abtFw[3]);
|
||||
snprintf (abtFirmwareText, 22, "PN532 v%d.%d (0x%02x)", abtFw[1], abtFw[2], abtFw[3]);
|
||||
pnd->btSupportByte = abtFw[3];
|
||||
break;
|
||||
case PN533:
|
||||
snprintf (abtFirmwareText, 18, "PN533 v%d.%d (0x%02x)", abtFw[1], abtFw[2], abtFw[3]);
|
||||
snprintf (abtFirmwareText, 22, "PN533 v%d.%d (0x%02x)", abtFw[1], abtFw[2], abtFw[3]);
|
||||
pnd->btSupportByte = abtFw[3];
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -264,7 +264,7 @@ bool pn53x_decode_target_data (const byte_t * pbtRawData, size_t szRawData,
|
|||
nfc_target_info_t * pnti);
|
||||
bool pn53x_read_register (nfc_device_t * pnd, uint16_t ui16Reg, uint8_t * ui8Value);
|
||||
bool pn53x_write_register (nfc_device_t * pnd, uint16_t ui16Reg, uint8_t ui8SymbolMask, uint8_t ui8Value);
|
||||
bool pn53x_get_firmware_version (nfc_device_t * pnd, char abtFirmwareText[18]);
|
||||
bool pn53x_get_firmware_version (nfc_device_t * pnd, char abtFirmwareText[22]);
|
||||
bool pn53x_configure (nfc_device_t * pnd, const nfc_device_option_t ndo, const bool bEnable);
|
||||
bool pn53x_check_communication (nfc_device_t *pnd);
|
||||
bool pn53x_idle (nfc_device_t * pnd);
|
||||
|
|
Loading…
Reference in a new issue