diff --git a/libnfc/chips/pn53x.c b/libnfc/chips/pn53x.c index 5e10fbb..805265e 100644 --- a/libnfc/chips/pn53x.c +++ b/libnfc/chips/pn53x.c @@ -139,7 +139,7 @@ pn53x_transceive (struct nfc_device *pnd, const uint8_t *pbtTx, const size_t szT } // Command is sent, we store the command - CHIP_DATA (pnd)->lastCommand = pbtTx[0]; + CHIP_DATA (pnd)->last_command = pbtTx[0]; // Handle power mode for PN532 if ((CHIP_DATA (pnd)->type == PN532) && (TgInitAsTarget == pbtTx[0])) { // PN532 automatically goes into PowerDown mode when TgInitAsTarget command will be sent diff --git a/libnfc/chips/pn53x.h b/libnfc/chips/pn53x.h index 95fe620..fc4cea7 100644 --- a/libnfc/chips/pn53x.h +++ b/libnfc/chips/pn53x.h @@ -153,7 +153,7 @@ struct pn53x_data { /** Register cache for SetParameters function. */ uint8_t ui8Parameters; /** Last sent command */ - uint8_t lastCommand; + uint8_t last_command; /** Interframe timer correction */ int16_t timer_correction; /** Timer prescaler */ diff --git a/libnfc/drivers/arygon.c b/libnfc/drivers/arygon.c index 7220fef..45eec13 100644 --- a/libnfc/drivers/arygon.c +++ b/libnfc/drivers/arygon.c @@ -442,7 +442,7 @@ arygon_tama_receive (nfc_device *pnd, uint8_t *pbtData, const size_t szDataLen, return pnd->last_error; } - if (abtRxBuf[1] != CHIP_DATA (pnd)->lastCommand + 1) { + if (abtRxBuf[1] != CHIP_DATA (pnd)->last_command + 1) { log_put (LOG_CATEGORY, NFC_PRIORITY_ERROR, "%s", "Command Code verification failed"); pnd->last_error = NFC_EIO; return pnd->last_error; @@ -463,7 +463,7 @@ arygon_tama_receive (nfc_device *pnd, uint8_t *pbtData, const size_t szDataLen, } uint8_t btDCS = (256 - 0xD5); - btDCS -= CHIP_DATA (pnd)->lastCommand + 1; + btDCS -= CHIP_DATA (pnd)->last_command + 1; for (size_t szPos = 0; szPos < len; szPos++) { btDCS -= pbtData[szPos]; } diff --git a/libnfc/drivers/pn532_uart.c b/libnfc/drivers/pn532_uart.c index 75c1d31..87648c8 100644 --- a/libnfc/drivers/pn532_uart.c +++ b/libnfc/drivers/pn532_uart.c @@ -428,7 +428,7 @@ pn532_uart_receive (nfc_device *pnd, uint8_t *pbtData, const size_t szDataLen, i return pnd->last_error; } - if (abtRxBuf[1] != CHIP_DATA (pnd)->lastCommand + 1) { + if (abtRxBuf[1] != CHIP_DATA (pnd)->last_command + 1) { log_put (LOG_CATEGORY, NFC_PRIORITY_ERROR, "%s", "Command Code verification failed"); pnd->last_error = NFC_EIO; return pnd->last_error; @@ -449,7 +449,7 @@ pn532_uart_receive (nfc_device *pnd, uint8_t *pbtData, const size_t szDataLen, i } uint8_t btDCS = (256 - 0xD5); - btDCS -= CHIP_DATA (pnd)->lastCommand + 1; + btDCS -= CHIP_DATA (pnd)->last_command + 1; for (size_t szPos = 0; szPos < len; szPos++) { btDCS -= pbtData[szPos]; } diff --git a/libnfc/drivers/pn53x_usb.c b/libnfc/drivers/pn53x_usb.c index e03e31a..205b670 100644 --- a/libnfc/drivers/pn53x_usb.c +++ b/libnfc/drivers/pn53x_usb.c @@ -655,7 +655,7 @@ read: } offset += 1; - if (abtRxBuf[offset] != CHIP_DATA (pnd)->lastCommand + 1) { + if (abtRxBuf[offset] != CHIP_DATA (pnd)->last_command + 1) { log_put (LOG_CATEGORY, NFC_PRIORITY_ERROR, "%s", "Command Code verification failed"); pnd->last_error = NFC_EIO; return pnd->last_error; @@ -666,7 +666,7 @@ read: offset += len; uint8_t btDCS = (256 - 0xD5); - btDCS -= CHIP_DATA (pnd)->lastCommand + 1; + btDCS -= CHIP_DATA (pnd)->last_command + 1; for (size_t szPos = 0; szPos < len; szPos++) { btDCS -= pbtData[szPos]; }