diff --git a/src/libnfc.c b/src/libnfc.c index 22c3e98..7be8e43 100644 --- a/src/libnfc.c +++ b/src/libnfc.c @@ -832,7 +832,7 @@ bool nfc_target_init(const dev_info* pdi, byte_t* pbtRx, size_t* pszRxBits) // Make sure the CRC & parity are handled by the device, this is needed for target_init to work properly if (!bCrc) nfc_configure((dev_info*)pdi,DCO_HANDLE_CRC,true); - if (!bPar) nfc_configure((dev_info*)pdi,DCO_HANDLE_CRC,true); + if (!bPar) nfc_configure((dev_info*)pdi,DCO_HANDLE_PARITY,true); // Let the PN53X be activated by the RF level detector from power down mode if (!pn53x_set_reg(pdi,REG_CIU_TX_AUTO, SYMBOL_INITIAL_RF_ON,0x04)) return false; @@ -852,7 +852,7 @@ bool nfc_target_init(const dev_info* pdi, byte_t* pbtRx, size_t* pszRxBits) // Restore the CRC & parity setting to the original value (if needed) if (!bCrc) nfc_configure((dev_info*)pdi,DCO_HANDLE_CRC,false); - if (!bPar) nfc_configure((dev_info*)pdi,DCO_HANDLE_CRC,false); + if (!bPar) nfc_configure((dev_info*)pdi,DCO_HANDLE_PARITY,false); return true; }