Loading...
Searching...
No Matches
mf_plus_poller_i.h
1#pragma once
2
3#include "mf_plus_poller.h"
4
5#include <lib/nfc/protocols/iso14443_4a/iso14443_4a_poller_i.h>
6
7#ifdef __cplusplus
8extern "C" {
9#endif
10
11#define MF_PLUS_FWT_FC (60000)
12
13typedef enum {
14 MfPlusCardStateDetected,
15 MfPlusCardStateLost,
16} MfPlusCardState;
17
18typedef enum {
19 MfPlusPollerStateIdle,
20 MfPlusPollerStateReadVersion,
21 MfPlusPollerStateParseVersion,
22 MfPlusPollerStateParseIso4,
23 MfPlusPollerStateReadFailed,
24 MfPlusPollerStateReadSuccess,
25
26 MfPlusPollerStateNum,
27} MfPlusPollerState;
28
30 Iso14443_4aPoller* iso14443_4a_poller;
31
32 MfPlusData* data;
33 MfPlusPollerState state;
34
35 BitBuffer* tx_buffer;
36 BitBuffer* rx_buffer;
37 BitBuffer* input_buffer;
38 BitBuffer* result_buffer;
39
40 MfPlusError error;
41 NfcGenericEvent general_event;
42 MfPlusPollerEvent mfp_event;
43 MfPlusPollerEventData mfp_event_data;
44 NfcGenericCallback callback;
45 void* context;
46};
47
48MfPlusError mf_plus_process_error(Iso14443_4aError error);
49
50MfPlusPoller* mf_plus_poller_alloc(Iso14443_4aPoller* iso14443_4a_poller);
51
52void mf_plus_poller_free(MfPlusPoller* instance);
53
54#ifdef __cplusplus
55}
56#endif
NfcCommand(* NfcGenericCallback)(NfcGenericEvent event, void *context)
Generic Nfc event callback type.
Definition nfc_generic_event.h:75
Definition bit_buffer.c:7
Definition iso14443_4a_poller_i.h:30
Definition mf_plus.h:78
MIFARE Plus poller event structure.
Definition mf_plus_poller.h:37
Definition mf_plus_poller_i.h:29
Generic Nfc event type.
Definition nfc_generic_event.h:58
MIFARE Plus poller event data.
Definition mf_plus_poller.h:28