Loading...
Searching...
No Matches
nfc_poller.h
Go to the documentation of this file.
1
15#pragma once
16
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
27typedef struct NfcPoller NfcPoller;
28
37typedef struct {
40 parent_event_data ;
42
52typedef NfcCommand (*NfcGenericCallbackEx)(NfcGenericEventEx event, void* context);
53
64
70void nfc_poller_free(NfcPoller* instance);
71
83void nfc_poller_start(NfcPoller* instance, NfcGenericCallback callback, void* context);
84
95void nfc_poller_start_ex(NfcPoller* instance, NfcGenericCallbackEx callback, void* context);
96
104void nfc_poller_stop(NfcPoller* instance);
105
121bool nfc_poller_detect(NfcPoller* instance);
122
130
137const NfcDeviceData* nfc_poller_get_data(const NfcPoller* instance);
138
139#ifdef __cplusplus
140}
141#endif
NfcCommand
Enumeration of possible Nfc commands.
Definition nfc.h:71
Common top-level types for the NFC protocol stack.
void NfcDeviceData
Generic opaque type for protocol-specific NFC device data.
Definition nfc_device_base.h:22
Generic Nfc stack event definitions.
void NfcGenericEventData
Generic Nfc event data type.
Definition nfc_generic_event.h:44
NfcCommand(* NfcGenericCallback)(NfcGenericEvent event, void *context)
Generic Nfc event callback type.
Definition nfc_generic_event.h:75
void NfcGenericInstance
Generic Nfc instance type.
Definition nfc_generic_event.h:36
bool nfc_poller_detect(NfcPoller *instance)
Detect whether there is a card supporting a particular protocol in the vicinity.
Definition nfc_poller.c:249
void nfc_poller_start(NfcPoller *instance, NfcGenericCallback callback, void *context)
Start an NfcPoller instance.
Definition nfc_poller.c:121
void nfc_poller_stop(NfcPoller *instance)
Stop an NfcPoller instance.
Definition nfc_poller.c:203
NfcProtocol nfc_poller_get_protocol(const NfcPoller *instance)
Get the protocol identifier an NfcPoller instance was created with.
Definition nfc_poller.c:274
const NfcDeviceData * nfc_poller_get_data(const NfcPoller *instance)
Get the data that was that was gathered during the reading process.
Definition nfc_poller.c:280
NfcCommand(* NfcGenericCallbackEx)(NfcGenericEventEx event, void *context)
Extended generic Nfc event callback type.
Definition nfc_poller.h:52
NfcPoller * nfc_poller_alloc(Nfc *nfc, NfcProtocol protocol)
Allocate an NfcPoller instance.
Definition nfc_poller.c:77
void nfc_poller_free(NfcPoller *instance)
Delete an NfcPoller instance.
Definition nfc_poller.c:90
void nfc_poller_start_ex(NfcPoller *instance, NfcGenericCallbackEx callback, void *context)
Start an NfcPoller instance in extended mode.
Definition nfc_poller.c:182
NfcProtocol
Enumeration of all available NFC protocols.
Definition nfc_protocol.h:178
Extended generic Nfc event type.
Definition nfc_poller.h:37
NfcGenericInstance * poller
Pointer to the protocol poller.
Definition nfc_poller.h:38
Definition nfc.c:41
Definition nfc_poller.c:25