Topic: How to write CIU_TxContro in libnfc

Hi,

I am working with the PN532 amplifier. I need write 0x83 into the  CIU_TxContro register.

I try to write it like this, but it seems not work.

In the /libnfc-1.7.1/libnfc/chips/pn53x.c, Add writing code in the following fucntion,

int pn53x_reset_settings(struct nfc_device *pnd)
{
  int res = 0;
  // Reset the ending transmission bits register, it is unknown what the last tranmission used there
  CHIP_DATA(pnd)->ui8TxBits = 0;
  if ((res = pn53x_write_register(pnd, PN53X_REG_CIU_BitFraming, SYMBOL_TX_LAST_BITS, 0x00)) < 0) {
    return res;
  }
  // Make sure we reset the CRC and parity to chip handling.
  if ((res = pn53x_set_property_bool(pnd, NP_HANDLE_CRC, true)) < 0)
    return res;
  if ((res = pn53x_set_property_bool(pnd, NP_HANDLE_PARITY, true)) < 0)
    return res;
  // Activate "easy framing" feature by default
  if ((res = pn53x_set_property_bool(pnd, NP_EASY_FRAMING, true)) < 0)
    return res;
  // Deactivate the CRYPTO1 cipher, it may could cause problems when still active
  if ((res = pn53x_set_property_bool(pnd, NP_ACTIVATE_CRYPTO1, false)) < 0)
    return res;

  // ******************************************
  if ((res = pn53x_write_register(pnd, PN53X_REG_CIU_TxControl, 0xFF, 0x83)) < 0)
    return res;
  // ******************************************

  return NFC_SUCCESS;
}

Appreciate for any help.


Fei