Fix Issue 45: nfc_target_init doesn't correctly reset the parity during initalization. Thanks to Mike Auty.

This commit is contained in:
Romuald Conty 2009-11-02 17:06:55 +00:00
parent 49ca2acf91
commit 9d7369e234

View file

@ -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;
}