nfc_abort_command() function returns now 0 on success and libnfc error code on failure and fix some warnings.

This commit is contained in:
Audrey Diacre 2012-01-05 14:49:02 +00:00
parent 8b07a5f4c7
commit c80ebdca25
10 changed files with 14 additions and 14 deletions

View file

@ -538,7 +538,7 @@ arygon_reset_tama (nfc_device *pnd)
return NFC_SUCCESS;
}
bool
int
arygon_abort_command (nfc_device *pnd)
{
if (pnd) {
@ -549,7 +549,7 @@ arygon_abort_command (nfc_device *pnd)
DRIVER_DATA (pnd)->abort_flag = true;
#endif
}
return true;
return NFC_SUCCESS;
}

View file

@ -481,7 +481,7 @@ pn532_uart_ack (nfc_device *pnd)
return (uart_send (DRIVER_DATA(pnd)->port, pn53x_ack_frame, sizeof (pn53x_ack_frame), 0));
}
bool
int
pn532_uart_abort_command (nfc_device *pnd)
{
if (pnd) {
@ -492,7 +492,7 @@ pn532_uart_abort_command (nfc_device *pnd)
DRIVER_DATA (pnd)->abort_flag = true;
#endif
}
return true;
return NFC_SUCCESS;
}
const struct pn53x_io pn532_uart_io = {

View file

@ -781,11 +781,11 @@ pn53x_usb_set_property_bool (nfc_device *pnd, const nfc_property property, const
return NFC_SUCCESS;
}
bool
int
pn53x_usb_abort_command (nfc_device *pnd)
{
DRIVER_DATA (pnd)->abort_flag = true;
return true;
return NFC_SUCCESS;
}
const struct pn53x_io pn53x_usb_io = {

View file

@ -151,7 +151,7 @@ struct nfc_driver_t {
int (*device_set_property_bool) (struct nfc_device *pnd, const nfc_property property, const bool bEnable);
int (*device_set_property_int) (struct nfc_device *pnd, const nfc_property property, const int value);
bool (*abort_command) (struct nfc_device *pnd);
int (*abort_command) (struct nfc_device *pnd);
int (*idle) (struct nfc_device *pnd);
};

View file

@ -676,7 +676,7 @@ nfc_idle (nfc_device *pnd)
/**
* @brief Abort current running command
* @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
*
@ -685,7 +685,7 @@ nfc_idle (nfc_device *pnd)
*
* @note The blocking function (ie. nfc_target_init()) will failed with DEABORT error.
*/
bool
int
nfc_abort_command (nfc_device *pnd)
{
HAL (abort_command, pnd);