Loading...
Searching...
No Matches
mf_desfire_poller_i.h
1#pragma once
2
3#include "mf_desfire_poller.h"
4
5#include <lib/nfc/protocols/iso14443_4a/iso14443_4a_poller_i.h>
6
7#ifdef __cplusplus
8extern "C" {
9#endif
10
11typedef enum {
12 MfDesfirePollerStateIdle,
13 MfDesfirePollerStateReadVersion,
14 MfDesfirePollerStateReadFreeMemory,
15 MfDesfirePollerStateReadMasterKeySettings,
16 MfDesfirePollerStateReadMasterKeyVersion,
17 MfDesfirePollerStateReadApplicationIds,
18 MfDesfirePollerStateReadApplications,
19 MfDesfirePollerStateReadFailed,
20 MfDesfirePollerStateReadSuccess,
21
22 MfDesfirePollerStateNum,
23} MfDesfirePollerState;
24
25typedef enum {
26 MfDesfirePollerSessionStateIdle,
27 MfDesfirePollerSessionStateActive,
28 MfDesfirePollerSessionStateStopRequest,
29} MfDesfirePollerSessionState;
30
32 Iso14443_4aPoller* iso14443_4a_poller;
33 MfDesfirePollerSessionState session_state;
34 MfDesfirePollerState state;
35 MfDesfireError error;
36 MfDesfireData* data;
37 BitBuffer* tx_buffer;
38 BitBuffer* rx_buffer;
39 BitBuffer* input_buffer;
40 BitBuffer* result_buffer;
41 MfDesfirePollerEventData mf_desfire_event_data;
42 MfDesfirePollerEvent mf_desfire_event;
43 NfcGenericEvent general_event;
44 NfcGenericCallback callback;
45 void* context;
46};
47
48MfDesfireError mf_desfire_process_error(Iso14443_4aError error);
49
50MfDesfireError mf_desfire_process_status_code(uint8_t status_code);
51
52const MfDesfireData* mf_desfire_poller_get_data(MfDesfirePoller* 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_desfire.h:136
MfDesfire poller event structure.
Definition mf_desfire_poller.h:36
Definition mf_desfire_poller_i.h:31
Generic Nfc event type.
Definition nfc_generic_event.h:58
MfDesfire poller event data.
Definition mf_desfire_poller.h:27