Loading...
Searching...
No Matches
mf_desfire_poller.h
1#pragma once
2
3#include "mf_desfire.h"
4
5#include <lib/nfc/protocols/iso14443_4a/iso14443_4a_poller.h>
6
7#ifdef __cplusplus
8extern "C" {
9#endif
10
14typedef struct MfDesfirePoller MfDesfirePoller;
15
19typedef enum {
20 MfDesfirePollerEventTypeReadSuccess,
21 MfDesfirePollerEventTypeReadFailed,
22} MfDesfirePollerEventType;
23
27typedef union {
28 MfDesfireError error;
30
36typedef struct {
37 MfDesfirePollerEventType type;
40
54MfDesfireError mf_desfire_send_chunks(
55 MfDesfirePoller* instance,
56 const BitBuffer* tx_buffer,
57 BitBuffer* rx_buffer);
58
68MfDesfireError mf_desfire_poller_read_version(MfDesfirePoller* instance, MfDesfireVersion* data);
69
79MfDesfireError
80 mf_desfire_poller_read_free_memory(MfDesfirePoller* instance, MfDesfireFreeMemory* data);
81
91MfDesfireError
92 mf_desfire_poller_read_key_settings(MfDesfirePoller* instance, MfDesfireKeySettings* data);
93
104MfDesfireError mf_desfire_poller_read_key_version(
105 MfDesfirePoller* instance,
106 uint8_t key_num,
107 MfDesfireKeyVersion* data);
108
119MfDesfireError mf_desfire_poller_read_key_versions(
120 MfDesfirePoller* instance,
121 SimpleArray* data,
122 uint32_t count);
123
133MfDesfireError
134 mf_desfire_poller_read_application_ids(MfDesfirePoller* instance, SimpleArray* data);
135
145MfDesfireError mf_desfire_poller_select_application(
146 MfDesfirePoller* instance,
147 const MfDesfireApplicationId* id);
148
158MfDesfireError mf_desfire_poller_read_file_ids(MfDesfirePoller* instance, SimpleArray* data);
159
170MfDesfireError mf_desfire_poller_read_file_settings(
171 MfDesfirePoller* instance,
172 MfDesfireFileId id,
174
185MfDesfireError mf_desfire_poller_read_file_settings_multi(
186 MfDesfirePoller* instance,
187 const SimpleArray* file_ids,
188 SimpleArray* data);
189
202MfDesfireError mf_desfire_poller_read_file_data(
203 MfDesfirePoller* instance,
204 MfDesfireFileId id,
205 uint32_t offset,
206 size_t size,
207 MfDesfireFileData* data);
208
219MfDesfireError mf_desfire_poller_read_file_value(
220 MfDesfirePoller* instance,
221 MfDesfireFileId id,
222 MfDesfireFileData* data);
223
236MfDesfireError mf_desfire_poller_read_file_records(
237 MfDesfirePoller* instance,
238 MfDesfireFileId id,
239 uint32_t offset,
240 size_t size,
241 MfDesfireFileData* data);
242
254MfDesfireError mf_desfire_poller_read_file_data_multi(
255 MfDesfirePoller* instance,
256 const SimpleArray* file_ids,
257 const SimpleArray* file_settings,
258 SimpleArray* data);
259
269MfDesfireError
270 mf_desfire_poller_read_application(MfDesfirePoller* instance, MfDesfireApplication* data);
271
282MfDesfireError mf_desfire_poller_read_applications(
283 MfDesfirePoller* instance,
284 const SimpleArray* app_ids,
285 SimpleArray* data);
286
287#ifdef __cplusplus
288}
289#endif
Definition bit_buffer.c:7
Definition mf_desfire.h:120
Definition mf_desfire.h:116
Definition mf_desfire.h:112
Definition mf_desfire.h:89
Definition mf_desfire.h:55
Definition mf_desfire.h:60
MfDesfire poller event structure.
Definition mf_desfire_poller.h:36
MfDesfirePollerEventType type
Type of emmitted event.
Definition mf_desfire_poller.h:37
MfDesfirePollerEventData * data
Pointer to event specific data.
Definition mf_desfire_poller.h:38
Definition mf_desfire_poller_i.h:31
Definition mf_desfire.h:32
Definition simple_array.c:5
MfDesfire poller event data.
Definition mf_desfire_poller.h:27
MfDesfireError error
Error code indicating card reading fail reason.
Definition mf_desfire_poller.h:28