mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-02-27 12:16:34 +00:00
Enable aborting blocking commands (e.g. TgInitAsTarget) and refactor
*_check_communication() as pn53x_check_communication().
This commit is contained in:
@@ -72,6 +72,7 @@ typedef struct {
|
||||
int iLastError;
|
||||
/** Last sent command */
|
||||
int iLastCommand;
|
||||
int iAbortFds[2];
|
||||
} nfc_device_t;
|
||||
// TODO: Move chip's specifics in a chips structure (e.g. iLastCommand, ui8Parameters, ui8TxBits)
|
||||
|
||||
|
||||
@@ -63,6 +63,7 @@ extern "C" {
|
||||
/* NFC Device/Hardware manipulation */
|
||||
NFC_EXPORT nfc_device_t *nfc_connect (nfc_device_desc_t * pndd);
|
||||
NFC_EXPORT void nfc_disconnect (nfc_device_t * pnd);
|
||||
NFC_EXPORT void nfc_abort_command (nfc_device_t * pnd);
|
||||
NFC_EXPORT void nfc_list_devices (nfc_device_desc_t pnddDevices[], size_t szDevices, size_t * pszDeviceFound);
|
||||
NFC_EXPORT bool nfc_configure (nfc_device_t * pnd, const nfc_device_option_t ndo, const bool bEnable);
|
||||
|
||||
@@ -147,6 +148,7 @@ extern "C" {
|
||||
#define DEIO 0x1000 /* Input/output error */
|
||||
#define DEINVAL 0x2000 /* Invalid argument */
|
||||
#define DETIMEOUT 0x3000 /* Operation timeout */
|
||||
#define DEABORT 0x4000 /* Operation aborted */
|
||||
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user