mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-02-28 04:36:41 +00:00
nfc_initiator_deselect__target() function returns now libnf error code.
This commit is contained in:
@@ -1518,10 +1518,10 @@ pn53x_initiator_transceive_bytes_timed (struct nfc_device *pnd, const uint8_t *p
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
int
|
||||
pn53x_initiator_deselect_target (struct nfc_device *pnd)
|
||||
{
|
||||
return ((pn53x_InDeselect (pnd, 0) < 0 ) ? 0 : 1 ); // 0 mean deselect all selected targets
|
||||
return pn53x_InDeselect (pnd, 0); // 0 mean deselect all selected targets
|
||||
}
|
||||
|
||||
#define SAK_ISO14443_4_COMPLIANT 0x20
|
||||
|
||||
@@ -309,7 +309,7 @@ bool pn53x_initiator_transceive_bits_timed (struct nfc_device *pnd, const uin
|
||||
uint8_t *pbtRxPar, uint32_t *cycles);
|
||||
bool pn53x_initiator_transceive_bytes_timed (struct nfc_device *pnd, const uint8_t *pbtTx, const size_t szTx,
|
||||
uint8_t *pbtRx, size_t *pszRx, uint32_t *cycles);
|
||||
bool pn53x_initiator_deselect_target (struct nfc_device *pnd);
|
||||
int pn53x_initiator_deselect_target (struct nfc_device *pnd);
|
||||
|
||||
// NFC device as Target functions
|
||||
int pn53x_target_init (struct nfc_device *pnd, nfc_target *pnt, uint8_t *pbtRx, size_t *pszRx);
|
||||
|
||||
@@ -136,7 +136,7 @@ struct nfc_driver_t {
|
||||
int (*initiator_select_passive_target) (struct nfc_device *pnd, const nfc_modulation nm, const uint8_t * pbtInitData, const size_t szInitData, nfc_target * pnt);
|
||||
int (*initiator_poll_target) (struct nfc_device *pnd, const nfc_modulation * pnmModulations, const size_t szModulations, const uint8_t uiPollNr, const uint8_t btPeriod, nfc_target * pnt);
|
||||
int (*initiator_select_dep_target) (struct nfc_device *pnd, const nfc_dep_mode ndm, const nfc_baud_rate nbr, const nfc_dep_info * pndiInitiator, nfc_target * pnt, const int timeout);
|
||||
bool (*initiator_deselect_target) (struct nfc_device *pnd);
|
||||
int (*initiator_deselect_target) (struct nfc_device *pnd);
|
||||
int (*initiator_transceive_bytes) (struct nfc_device *pnd, const uint8_t * pbtTx, const size_t szTx, uint8_t * pbtRx, size_t * pszRx, int timeout);
|
||||
bool (*initiator_transceive_bits) (struct nfc_device *pnd, const uint8_t * pbtTx, const size_t szTxBits, const uint8_t * pbtTxPar, uint8_t * pbtRx, size_t * pszRxBits, uint8_t * pbtRxPar);
|
||||
bool (*initiator_transceive_bytes_timed) (struct nfc_device *pnd, const uint8_t * pbtTx, const size_t szTx, uint8_t * pbtRx, size_t * pszRx, uint32_t * cycles);
|
||||
|
||||
@@ -456,7 +456,7 @@ nfc_initiator_select_dep_target (nfc_device *pnd,
|
||||
|
||||
/**
|
||||
* @brief Deselect a selected passive or emulated tag
|
||||
* @return Returns \c true if action was successfully performed; otherwise returns \c false.
|
||||
* @return Returns 0 on success, otherwise returns libnfc's error code (negative value).
|
||||
* @param pnd \a nfc_device struct pointer that represents currently used device
|
||||
*
|
||||
* After selecting and communicating with a passive tag, this function could be
|
||||
@@ -466,7 +466,7 @@ nfc_initiator_select_dep_target (nfc_device *pnd,
|
||||
* tag, test it for the available features and support, deselect it and skip to
|
||||
* the next tag until the correct tag is found.
|
||||
*/
|
||||
bool
|
||||
int
|
||||
nfc_initiator_deselect_target (nfc_device *pnd)
|
||||
{
|
||||
HAL (initiator_deselect_target, pnd);
|
||||
|
||||
Reference in New Issue
Block a user