rename lastCommand by last_command.

This commit is contained in:
Audrey Diacre 2012-01-06 13:07:37 +00:00
parent 48e92149e4
commit e15f2eedbb
5 changed files with 8 additions and 8 deletions

View file

@ -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 // 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 // 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 if ((CHIP_DATA (pnd)->type == PN532) && (TgInitAsTarget == pbtTx[0])) { // PN532 automatically goes into PowerDown mode when TgInitAsTarget command will be sent

View file

@ -153,7 +153,7 @@ struct pn53x_data {
/** Register cache for SetParameters function. */ /** Register cache for SetParameters function. */
uint8_t ui8Parameters; uint8_t ui8Parameters;
/** Last sent command */ /** Last sent command */
uint8_t lastCommand; uint8_t last_command;
/** Interframe timer correction */ /** Interframe timer correction */
int16_t timer_correction; int16_t timer_correction;
/** Timer prescaler */ /** Timer prescaler */

View file

@ -442,7 +442,7 @@ arygon_tama_receive (nfc_device *pnd, uint8_t *pbtData, const size_t szDataLen,
return pnd->last_error; 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"); log_put (LOG_CATEGORY, NFC_PRIORITY_ERROR, "%s", "Command Code verification failed");
pnd->last_error = NFC_EIO; pnd->last_error = NFC_EIO;
return pnd->last_error; 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); 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++) { for (size_t szPos = 0; szPos < len; szPos++) {
btDCS -= pbtData[szPos]; btDCS -= pbtData[szPos];
} }

View file

@ -428,7 +428,7 @@ pn532_uart_receive (nfc_device *pnd, uint8_t *pbtData, const size_t szDataLen, i
return pnd->last_error; 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"); log_put (LOG_CATEGORY, NFC_PRIORITY_ERROR, "%s", "Command Code verification failed");
pnd->last_error = NFC_EIO; pnd->last_error = NFC_EIO;
return pnd->last_error; 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); 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++) { for (size_t szPos = 0; szPos < len; szPos++) {
btDCS -= pbtData[szPos]; btDCS -= pbtData[szPos];
} }

View file

@ -655,7 +655,7 @@ read:
} }
offset += 1; 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"); log_put (LOG_CATEGORY, NFC_PRIORITY_ERROR, "%s", "Command Code verification failed");
pnd->last_error = NFC_EIO; pnd->last_error = NFC_EIO;
return pnd->last_error; return pnd->last_error;
@ -666,7 +666,7 @@ read:
offset += len; offset += len;
uint8_t btDCS = (256 - 0xD5); 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++) { for (size_t szPos = 0; szPos < len; szPos++) {
btDCS -= pbtData[szPos]; btDCS -= pbtData[szPos];
} }