diff --git a/libnfc/chips/pn53x.c b/libnfc/chips/pn53x.c index ae5259c..aa21f77 100644 --- a/libnfc/chips/pn53x.c +++ b/libnfc/chips/pn53x.c @@ -1160,18 +1160,14 @@ pn53x_initiator_transceive_bits_timed (nfc_device_t * pnd, const byte_t * pbtTx, // E.g. on SCL3711 timer settings are reset by 0x42 InCommunicateThru command to: // 631a=82 631b=a5 631c=02 631d=00 // Prepare FIFO - pn53x_write_register (pnd, REG_CIU_COMMAND, 0xFF, SYMBOL_COMMAND & SYMBOL_COMMAND_TRANSCEIVE); - pn53x_writeback_register(pnd); - pn53x_write_register (pnd, REG_CIU_FIFOLEVEL, 0xFF, SYMBOL_FLUSH_BUFFER); - pn53x_writeback_register(pnd); + pn53x_WriteRegister (pnd, REG_CIU_COMMAND, SYMBOL_COMMAND & SYMBOL_COMMAND_TRANSCEIVE); + pn53x_WriteRegister (pnd, REG_CIU_FIFOLEVEL, SYMBOL_FLUSH_BUFFER); for (i=0; i< ((szTxBits / 8) + 1); i++) { - pn53x_write_register (pnd, REG_CIU_FIFODATA, 0xFF, pbtTx[i]); - pn53x_writeback_register(pnd); + pn53x_WriteRegister (pnd, REG_CIU_FIFODATA, pbtTx[i]); } // Send data - pn53x_write_register (pnd, REG_CIU_BIT_FRAMING, 0xFF, SYMBOL_START_SEND | ((szTxBits % 8) & SYMBOL_TX_LAST_BITS)); - pn53x_writeback_register(pnd); + pn53x_WriteRegister (pnd, REG_CIU_BIT_FRAMING, SYMBOL_START_SEND | ((szTxBits % 8) & SYMBOL_TX_LAST_BITS)); // Recv data *pszRxBits = 0; @@ -1226,18 +1222,14 @@ pn53x_initiator_transceive_bytes_timed (nfc_device_t * pnd, const byte_t * pbtTx // E.g. on SCL3711 timer settings are reset by 0x42 InCommunicateThru command to: // 631a=82 631b=a5 631c=02 631d=00 // Prepare FIFO - pn53x_write_register (pnd, REG_CIU_COMMAND, 0xFF, SYMBOL_COMMAND & SYMBOL_COMMAND_TRANSCEIVE); - pn53x_writeback_register(pnd); - pn53x_write_register (pnd, REG_CIU_FIFOLEVEL, 0xFF, SYMBOL_FLUSH_BUFFER); - pn53x_writeback_register(pnd); + pn53x_WriteRegister (pnd, REG_CIU_COMMAND, SYMBOL_COMMAND & SYMBOL_COMMAND_TRANSCEIVE); + pn53x_WriteRegister (pnd, REG_CIU_FIFOLEVEL, SYMBOL_FLUSH_BUFFER); for (i=0; i< szTx; i++) { - pn53x_write_register (pnd, REG_CIU_FIFODATA, 0xFF, pbtTx[i]); - pn53x_writeback_register(pnd); + pn53x_WriteRegister (pnd, REG_CIU_FIFODATA, pbtTx[i]); } // Send data - pn53x_write_register (pnd, REG_CIU_BIT_FRAMING, 0xFF, SYMBOL_START_SEND); - pn53x_writeback_register(pnd); + pn53x_WriteRegister (pnd, REG_CIU_BIT_FRAMING, SYMBOL_START_SEND); // Recv data *pszRx = 0;