From 331234713df6e3da0ab5d9a25732e34842ff1270 Mon Sep 17 00:00:00 2001 From: Audrey Diacre Date: Thu, 5 Jan 2012 08:57:16 +0000 Subject: [PATCH] nfc_idle() function returns now 0 on success and libnfc error code on failure. --- include/nfc/nfc.h | 2 +- libnfc/nfc.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/nfc/nfc.h b/include/nfc/nfc.h index a39d4ae..3b1bb4b 100644 --- a/include/nfc/nfc.h +++ b/include/nfc/nfc.h @@ -68,7 +68,7 @@ extern "C" { NFC_EXPORT void nfc_disconnect (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 bool nfc_idle (nfc_device *pnd); + NFC_EXPORT int nfc_idle (nfc_device *pnd); /* NFC initiator: act as "reader" */ NFC_EXPORT int nfc_initiator_init (nfc_device *pnd); diff --git a/libnfc/nfc.c b/libnfc/nfc.c index ce1f8f8..8c61ea0 100644 --- a/libnfc/nfc.c +++ b/libnfc/nfc.c @@ -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 - * @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 * @@ -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 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) { HAL (idle, pnd);