nfc_idle() function returns now 0 on success and libnfc error code on failure.

This commit is contained in:
Audrey Diacre 2012-01-05 08:57:16 +00:00
parent 6ad07c3efb
commit 331234713d
2 changed files with 3 additions and 3 deletions

View file

@ -68,7 +68,7 @@ extern "C" {
NFC_EXPORT void nfc_disconnect (nfc_device *pnd); NFC_EXPORT void nfc_disconnect (nfc_device *pnd);
NFC_EXPORT bool nfc_abort_command (nfc_device *pnd); NFC_EXPORT bool nfc_abort_command (nfc_device *pnd);
NFC_EXPORT void nfc_list_devices (nfc_connstring connstrings[], size_t connstrings_len, size_t *pszDeviceFound); NFC_EXPORT void nfc_list_devices (nfc_connstring connstrings[], size_t connstrings_len, size_t *pszDeviceFound);
NFC_EXPORT bool nfc_idle (nfc_device *pnd); NFC_EXPORT int nfc_idle (nfc_device *pnd);
/* NFC initiator: act as "reader" */ /* NFC initiator: act as "reader" */
NFC_EXPORT int nfc_initiator_init (nfc_device *pnd); NFC_EXPORT int nfc_initiator_init (nfc_device *pnd);

View file

@ -660,7 +660,7 @@ nfc_target_init (nfc_device *pnd, nfc_target *pnt, uint8_t *pbtRx, size_t * pszR
/** /**
* @brief Turn NFC device in idle mode * @brief Turn NFC device in idle mode
* @return Returns \c true if action was successfully performed; otherwise returns \c false. * @return Returns 0 on success, otherwise returns libnfc's error code.
* *
* @param pnd \a nfc_device struct pointer that represent currently used device * @param pnd \a nfc_device struct pointer that represent currently used device
* *
@ -668,7 +668,7 @@ nfc_target_init (nfc_device *pnd, nfc_target *pnt, uint8_t *pbtRx, size_t * pszR
* In initiator mode, the RF field is turned off and the device is set to low power mode (if avaible); * In initiator mode, the RF field is turned off and the device is set to low power mode (if avaible);
* In target mode, the emulation is stoped (no target available from external initiator) and the device is set to low power mode (if avaible). * In target mode, the emulation is stoped (no target available from external initiator) and the device is set to low power mode (if avaible).
*/ */
bool int
nfc_idle (nfc_device *pnd) nfc_idle (nfc_device *pnd)
{ {
HAL (idle, pnd); HAL (idle, pnd);