Loading...
Searching...
No Matches
nfc_scanner.h
Go to the documentation of this file.
1
15#pragma once
16
17#include <nfc/nfc.h>
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
27typedef struct NfcScanner NfcScanner;
28
35
43
51
60typedef void (*NfcScannerCallback)(NfcScannerEvent event, void* context);
61
71
77void nfc_scanner_free(NfcScanner* instance);
78
86void nfc_scanner_start(NfcScanner* instance, NfcScannerCallback callback, void* context);
87
93void nfc_scanner_stop(NfcScanner* instance);
94
95#ifdef __cplusplus
96}
97#endif
Transport layer Nfc library.
Top-level NFC protocol definitions.
NfcProtocol
Enumeration of all available NFC protocols.
Definition nfc_protocol.h:178
NfcScannerEventType
Event type passed to the user callback.
Definition nfc_scanner.h:32
@ NfcScannerEventTypeDetected
One or more protocols have been detected.
Definition nfc_scanner.h:33
void nfc_scanner_start(NfcScanner *instance, NfcScannerCallback callback, void *context)
Start an NfcScanner.
Definition nfc_scanner.c:236
void(* NfcScannerCallback)(NfcScannerEvent event, void *context)
User callback function signature.
Definition nfc_scanner.h:60
void nfc_scanner_free(NfcScanner *instance)
Delete an NfcScanner instance.
Definition nfc_scanner.c:229
NfcScanner * nfc_scanner_alloc(Nfc *nfc)
Allocate an NfcScanner instance.
Definition nfc_scanner.c:220
void nfc_scanner_stop(NfcScanner *instance)
Stop an NfcScanner.
Definition nfc_scanner.c:255
Definition nfc.c:41
Event data passed to the user callback.
Definition nfc_scanner.h:39
NfcProtocol * protocols
Pointer to the array of detected protocol identifiers.
Definition nfc_scanner.h:41
size_t protocol_num
Number of detected protocols (one or more).
Definition nfc_scanner.h:40
Event passed to the user callback.
Definition nfc_scanner.h:47
NfcScannerEventData data
Event-specific data.
Definition nfc_scanner.h:49
NfcScannerEventType type
Type of event.
Definition nfc_scanner.h:48
Definition nfc_scanner.c:26