Enable aborting blocking commands (e.g. TgInitAsTarget) and refactor
*_check_communication() as pn53x_check_communication().
This commit is contained in:
parent
7ed71a1501
commit
4b6060aeeb
10 changed files with 118 additions and 43 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue