rename lastCommand by last_command.
This commit is contained in:
parent
48e92149e4
commit
e15f2eedbb
5 changed files with 8 additions and 8 deletions
|
@ -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
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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];
|
||||
}
|
||||
|
|
|
@ -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];
|
||||
}
|
||||
|
|
|
@ -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];
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue