Loading...
Searching...
No Matches
iso15693_3_listener_i.h
1#pragma once
2
4
5#include "iso15693_3_listener.h"
6
7#include "iso15693_3_i.h"
8
9#ifdef __cplusplus
10extern "C" {
11#endif
12
13typedef enum {
14 Iso15693_3ListenerStateReady,
15 Iso15693_3ListenerStateSelected,
16 Iso15693_3ListenerStateQuiet,
17} Iso15693_3ListenerState;
18
19typedef struct {
20 bool selected;
21 bool addressed;
22 bool wait_for_eof;
24
25typedef Iso15693_3Error (*Iso15693_3ExtensionHandler)(void* context, va_list args);
26
27typedef struct {
28 Iso15693_3ExtensionHandler mandatory[ISO15693_3_MANDATORY_COUNT];
29 Iso15693_3ExtensionHandler optional[ISO15693_3_OPTIONAL_COUNT];
31
33 Nfc* nfc;
34 Iso15693_3Data* data;
35 Iso15693_3ListenerState state;
37 BitBuffer* tx_buffer;
38
39 NfcGenericEvent generic_event;
40 Iso15693_3ListenerEvent iso15693_3_event;
41 Iso15693_3ListenerEventData iso15693_3_event_data;
42 NfcGenericCallback callback;
43 void* context;
44
45 const Iso15693_3ExtensionHandlerTable* extension_table;
46 void* extension_context;
47};
48
49Iso15693_3Error iso15693_3_listener_set_extension_handler_table(
50 Iso15693_3Listener* instance,
52 void* context);
53
54Iso15693_3Error iso15693_3_listener_ready(Iso15693_3Listener* instance);
55
56Iso15693_3Error
57 iso15693_3_listener_send_frame(Iso15693_3Listener* instance, const BitBuffer* tx_buffer);
58
59Iso15693_3Error
60 iso15693_3_listener_process_request(Iso15693_3Listener* instance, const BitBuffer* rx_buffer);
61
62Iso15693_3Error iso15693_3_listener_process_single_eof(Iso15693_3Listener* instance);
63
64Iso15693_3Error iso15693_3_listener_process_uid_mismatch(
65 Iso15693_3Listener* instance,
66 const BitBuffer* rx_buffer);
67
68#ifdef __cplusplus
69}
70#endif
Generic Nfc stack event definitions.
NfcCommand(* NfcGenericCallback)(NfcGenericEvent event, void *context)
Generic Nfc event callback type.
Definition nfc_generic_event.h:75
Definition bit_buffer.c:7
Definition iso15693_3.h:117
Definition iso15693_3_listener_i.h:27
Definition iso15693_3_listener.h:19
Definition iso15693_3_listener.h:23
Definition iso15693_3_listener_i.h:32
Definition iso15693_3_listener_i.h:19
Generic Nfc event type.
Definition nfc_generic_event.h:58
Definition nfc.c:41