Fix typo, add a minor XXX

This commit is contained in:
Romuald Conty 2010-09-22 12:42:14 +00:00
parent 0e40b6f7dd
commit 0e37a1e9e9
2 changed files with 4 additions and 4 deletions

View file

@ -134,7 +134,7 @@ pn53x_transceive (nfc_device_t * pnd, const byte_t * pbtTx, const size_t szTxLen
// Call the tranceive callback function of the current device // Call the tranceive callback function of the current device
if (!pnd->pdc->transceive (pnd, pbtTx, szTxLen, pbtRx, pszRxLen)) if (!pnd->pdc->transceive (pnd, pbtTx, szTxLen, pbtRx, pszRxLen))
return false; return false;
// XXX Should we put all these numbers behind a human-readable #define ?
switch (pbtTx[1]) { switch (pbtTx[1]) {
case 0x16: // PowerDown case 0x16: // PowerDown
case 0x40: // InDataExchange case 0x40: // InDataExchange
@ -174,7 +174,7 @@ pn53x_get_reg (nfc_device_t * pnd, uint16_t ui16Reg, uint8_t * ui8Value)
} }
bool bool
pn53x_set_reg (nfc_device_t * pnd, uint16_t ui16Reg, uint8_t ui8SybmolMask, uint8_t ui8Value) pn53x_set_reg (nfc_device_t * pnd, uint16_t ui16Reg, uint8_t ui8SymbolMask, uint8_t ui8Value)
{ {
uint8_t ui8Current; uint8_t ui8Current;
byte_t abtCmd[sizeof (pncmd_set_register)]; byte_t abtCmd[sizeof (pncmd_set_register)];
@ -185,7 +185,7 @@ pn53x_set_reg (nfc_device_t * pnd, uint16_t ui16Reg, uint8_t ui8SybmolMask, uint
if (!pn53x_get_reg (pnd, ui16Reg, &ui8Current)) if (!pn53x_get_reg (pnd, ui16Reg, &ui8Current))
return false; return false;
abtCmd[4] = ui8Value | (ui8Current & (~ui8SybmolMask)); abtCmd[4] = ui8Value | (ui8Current & (~ui8SymbolMask));
return pn53x_transceive (pnd, abtCmd, 5, NULL, NULL); return pn53x_transceive (pnd, abtCmd, 5, NULL, NULL);
} }

View file

@ -85,7 +85,7 @@ bool pn53x_transceive_check_error_frame_callback (nfc_device_t * pnd, const b
bool pn53x_transceive (nfc_device_t * pnd, const byte_t * pbtTx, const size_t szTxLen, byte_t * pbtRx, bool pn53x_transceive (nfc_device_t * pnd, const byte_t * pbtTx, const size_t szTxLen, byte_t * pbtRx,
size_t * pszRxLen); size_t * pszRxLen);
bool pn53x_get_reg (nfc_device_t * pnd, uint16_t ui16Reg, uint8_t * ui8Value); bool pn53x_get_reg (nfc_device_t * pnd, uint16_t ui16Reg, uint8_t * ui8Value);
bool pn53x_set_reg (nfc_device_t * pnd, uint16_t ui16Reg, uint8_t ui8SybmolMask, uint8_t ui8Value); bool pn53x_set_reg (nfc_device_t * pnd, uint16_t ui16Reg, uint8_t ui8SymbolMask, uint8_t ui8Value);
bool pn53x_set_parameters (nfc_device_t * pnd, uint8_t ui8Value); bool pn53x_set_parameters (nfc_device_t * pnd, uint8_t ui8Value);
bool pn53x_set_tx_bits (nfc_device_t * pnd, uint8_t ui8Bits); bool pn53x_set_tx_bits (nfc_device_t * pnd, uint8_t ui8Bits);
bool pn53x_wrap_frame (const byte_t * pbtTx, const size_t szTxBits, const byte_t * pbtTxPar, byte_t * pbtFrame, bool pn53x_wrap_frame (const byte_t * pbtTx, const size_t szTxBits, const byte_t * pbtTxPar, byte_t * pbtFrame,