mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-25 03:29:58 -07:00
Added naming for DESFire cards + fix MF3ICD40 cards unable to be read (#4058)
* Fixed MF3ICD40 DESFire cards soft-locking NFC application due to read free memory being an unsupported function, added naming for DESFire cards * NFC: slightly more granular desfire card type resolution Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
@@ -29,6 +29,28 @@ extern "C" {
|
||||
#define MF_DESFIRE_APP_ID_SIZE (3)
|
||||
#define MF_DESFIRE_VALUE_SIZE (4)
|
||||
|
||||
typedef enum {
|
||||
MfDesfireTypeMF3ICD40,
|
||||
MfDesfireTypeEV1,
|
||||
MfDesfireTypeEV2,
|
||||
MfDesfireTypeEV2XL,
|
||||
MfDesfireTypeEV3,
|
||||
|
||||
MfDesfireTypeUnknown,
|
||||
MfDesfireTypeNum,
|
||||
} MfDesfireType;
|
||||
|
||||
typedef enum {
|
||||
MfDesfireSize2k,
|
||||
MfDesfireSize4k,
|
||||
MfDesfireSize8k,
|
||||
MfDesfireSize16k,
|
||||
MfDesfireSize32k,
|
||||
|
||||
MfDesfireSizeUnknown,
|
||||
MfDesfireSizeNum,
|
||||
} MfDesfireSize;
|
||||
|
||||
typedef struct {
|
||||
uint8_t hw_vendor;
|
||||
uint8_t hw_type;
|
||||
@@ -131,6 +153,7 @@ typedef enum {
|
||||
MfDesfireErrorProtocol,
|
||||
MfDesfireErrorTimeout,
|
||||
MfDesfireErrorAuthentication,
|
||||
MfDesfireErrorCommandNotSupported,
|
||||
} MfDesfireError;
|
||||
|
||||
typedef struct {
|
||||
@@ -141,6 +164,7 @@ typedef struct {
|
||||
SimpleArray* master_key_versions;
|
||||
SimpleArray* application_ids;
|
||||
SimpleArray* applications;
|
||||
FuriString* device_name;
|
||||
} MfDesfireData;
|
||||
|
||||
extern const NfcDeviceBase nfc_device_mf_desfire;
|
||||
|
||||
Reference in New Issue
Block a user