diff --git a/libnfc/chips/pn53x.c b/libnfc/chips/pn53x.c index 2ee216b..2431ea7 100644 --- a/libnfc/chips/pn53x.c +++ b/libnfc/chips/pn53x.c @@ -325,3 +325,13 @@ pn53x_InDeselect(const nfc_device_t* pnd, const uint8_t ui8Target) return(pn53x_transceive(pnd,abtCmd,sizeof(abtCmd),NULL,NULL)); } + +bool +pn53x_InRelease(nfc_device_t* pnd, const uint8_t ui8Target) +{ + byte_t abtCmd[sizeof(pncmd_initiator_release)]; + memcpy(abtCmd,pncmd_initiator_release,sizeof(pncmd_initiator_release)); + abtCmd[2] = ui8Target; + + return(pn53x_transceive(pnd,abtCmd,sizeof(abtCmd),NULL,NULL)); +} diff --git a/libnfc/chips/pn53x.h b/libnfc/chips/pn53x.h index cc6ce59..fbcc784 100644 --- a/libnfc/chips/pn53x.h +++ b/libnfc/chips/pn53x.h @@ -80,6 +80,7 @@ bool pn53x_decode_target_data(const byte_t* pbtRawData, size_t szDataLen, nfc_ch bool pn53x_InListPassiveTarget(const nfc_device_t* pnd, const nfc_modulation_t nmInitModulation, const byte_t szMaxTargets, const byte_t* pbtInitiatorData, const size_t szInitiatorDataLen, byte_t* pbtTargetsData, size_t* pszTargetsData); bool pn53x_InDeselect(const nfc_device_t* pnd, const uint8_t ui8Target); +bool pn53x_InRelease(nfc_device_t* pnd, const uint8_t ui8Target); #endif // __NFC_CHIPS_PN53X_H__