3#include <lib/nfc/protocols/iso14443_4a/iso14443_4a.h>
11#define MF_DESFIRE_CMD_GET_VERSION (0x60)
12#define MF_DESFIRE_CMD_GET_FREE_MEMORY (0x6E)
13#define MF_DESFIRE_CMD_GET_KEY_SETTINGS (0x45)
14#define MF_DESFIRE_CMD_GET_KEY_VERSION (0x64)
15#define MF_DESFIRE_CMD_GET_APPLICATION_IDS (0x6A)
16#define MF_DESFIRE_CMD_SELECT_APPLICATION (0x5A)
17#define MF_DESFIRE_CMD_GET_FILE_IDS (0x6F)
18#define MF_DESFIRE_CMD_GET_FILE_SETTINGS (0xF5)
20#define MF_DESFIRE_CMD_READ_DATA (0xBD)
21#define MF_DESFIRE_CMD_GET_VALUE (0x6C)
22#define MF_DESFIRE_CMD_READ_RECORDS (0xBB)
24#define MF_DESFIRE_MAX_KEYS (14)
25#define MF_DESFIRE_MAX_FILES (32)
27#define MF_DESFIRE_UID_SIZE (7)
28#define MF_DESFIRE_BATCH_SIZE (5)
29#define MF_DESFIRE_APP_ID_SIZE (3)
30#define MF_DESFIRE_VALUE_SIZE (4)
49 uint8_t uid[MF_DESFIRE_UID_SIZE];
50 uint8_t batch[MF_DESFIRE_BATCH_SIZE];
61 bool is_master_key_changeable;
62 bool is_free_directory_list;
63 bool is_free_create_delete;
64 bool is_config_changeable;
65 uint8_t change_key_id;
70typedef uint8_t MfDesfireKeyVersion;
73 MfDesfireFileTypeStandard = 0,
74 MfDesfireFileTypeBackup = 1,
75 MfDesfireFileTypeValue = 2,
76 MfDesfireFileTypeLinearRecord = 3,
77 MfDesfireFileTypeCyclicRecord = 4,
81 MfDesfireFileCommunicationSettingsPlaintext = 0,
82 MfDesfireFileCommunicationSettingsAuthenticated = 1,
83 MfDesfireFileCommunicationSettingsEnciphered = 3,
84} MfDesfireFileCommunicationSettings;
86typedef uint8_t MfDesfireFileId;
87typedef uint16_t MfDesfireFileAccessRights;
90 MfDesfireFileType type;
91 MfDesfireFileCommunicationSettings comm;
92 MfDesfireFileAccessRights access_rights[MF_DESFIRE_MAX_KEYS];
93 uint8_t access_rights_len;
101 uint32_t limited_credit_value;
102 bool limited_credit_enabled;
117 uint8_t data[MF_DESFIRE_APP_ID_SIZE];
130 MfDesfireErrorNotPresent,
131 MfDesfireErrorProtocol,
132 MfDesfireErrorTimeout,
133 MfDesfireErrorAuthentication,
168const uint8_t* mf_desfire_get_uid(
const MfDesfireData* data,
size_t* uid_len);
170bool mf_desfire_set_uid(
MfDesfireData* data,
const uint8_t* uid,
size_t uid_len);
NfcDeviceNameType
Verbosity level of the displayed NFC device name.
Definition nfc_device_base.h:14
This file provides a simple (non-type safe) array for elements with (optional) in-place construction ...
Definition iso14443_4a.h:42
Definition mf_desfire.h:120
Definition mf_desfire.h:116
Definition mf_desfire.h:136
Definition mf_desfire.h:112
Definition mf_desfire.h:89
Definition mf_desfire.h:55
Definition mf_desfire.h:60
Definition mf_desfire.h:32
Generic NFC device interface.
Definition nfc_device_base_i.h:142
Definition simple_array.c:5