add context to nfc_init(), nfc_exit(), nfc_open() and nfc_list_devices() functions.
This commit is contained in:
parent
86c8ce536b
commit
4c011279ff
29 changed files with 142 additions and 138 deletions
|
|
@ -32,6 +32,8 @@
|
|||
# include <stdbool.h>
|
||||
# include <stdio.h>
|
||||
|
||||
typedef void *nfc_context;
|
||||
|
||||
/**
|
||||
* NFC device
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -63,15 +63,15 @@ extern "C" {
|
|||
# endif // __cplusplus
|
||||
|
||||
/* Library initialization/deinitialization */
|
||||
NFC_EXPORT void nfc_init();
|
||||
NFC_EXPORT void nfc_exit();
|
||||
NFC_EXPORT void nfc_init(nfc_context *context);
|
||||
NFC_EXPORT void nfc_exit(nfc_context *context);
|
||||
|
||||
/* NFC Device/Hardware manipulation */
|
||||
NFC_EXPORT bool nfc_get_default_device (nfc_connstring *connstring);
|
||||
NFC_EXPORT nfc_device *nfc_open (const nfc_connstring connstring);
|
||||
NFC_EXPORT nfc_device *nfc_open (nfc_context *context, const nfc_connstring connstring);
|
||||
NFC_EXPORT void nfc_close (nfc_device *pnd);
|
||||
NFC_EXPORT int nfc_abort_command (nfc_device *pnd);
|
||||
NFC_EXPORT size_t nfc_list_devices (nfc_connstring connstrings[], size_t connstrings_len);
|
||||
NFC_EXPORT size_t nfc_list_devices (nfc_context *context, nfc_connstring connstrings[], size_t connstrings_len);
|
||||
NFC_EXPORT int nfc_idle (nfc_device *pnd);
|
||||
|
||||
/* NFC initiator: act as "reader" */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue