mirror of
https://github.com/RfidResearchGroup/ChameleonMini.git
synced 2026-05-12 11:20:37 -07:00
Merge pull request #152 from dev-zzo/feature-MF0ULx1
Implement Ultralight EV1 functionality
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -12,9 +12,17 @@
|
||||
#include "ISO14443-3A.h"
|
||||
|
||||
#define MIFARE_ULTRALIGHT_UID_SIZE ISO14443A_UID_SIZE_DOUBLE
|
||||
#define MIFARE_ULTRALIGHT_MEM_SIZE 64
|
||||
#define MIFARE_ULTRALIGHT_PAGE_SIZE 4
|
||||
#define MIFARE_ULTRALIGHT_PAGES 16
|
||||
#define MIFARE_ULTRALIGHT_EV11_PAGES 20
|
||||
#define MIFARE_ULTRALIGHT_EV12_PAGES 41
|
||||
#define MIFARE_ULTRALIGHT_MEM_SIZE (MIFARE_ULTRALIGHT_PAGES * MIFARE_ULTRALIGHT_PAGE_SIZE)
|
||||
#define MIFARE_ULTRALIGHT_EV11_MEM_SIZE (MIFARE_ULTRALIGHT_EV11_PAGES * MIFARE_ULTRALIGHT_PAGE_SIZE)
|
||||
#define MIFARE_ULTRALIGHT_EV12_MEM_SIZE (MIFARE_ULTRALIGHT_EV12_PAGES * MIFARE_ULTRALIGHT_PAGE_SIZE)
|
||||
|
||||
void MifareUltralightAppInit(void);
|
||||
void MifareUltralightEV11AppInit(void);
|
||||
void MifareUltralightEV12AppInit(void);
|
||||
void MifareUltralightAppReset(void);
|
||||
void MifareUltralightAppTask(void);
|
||||
|
||||
|
||||
@@ -16,6 +16,8 @@ static const MapEntryType PROGMEM ConfigurationMap[] = {
|
||||
{ .Id = CONFIG_NONE, .Text = "NONE" },
|
||||
#ifdef CONFIG_MF_ULTRALIGHT_SUPPORT
|
||||
{ .Id = CONFIG_MF_ULTRALIGHT, .Text = "MF_ULTRALIGHT" },
|
||||
{ .Id = CONFIG_MF_ULTRALIGHT_EV1_80B, .Text = "MF_ULTRALIGHT_EV1_80B" },
|
||||
{ .Id = CONFIG_MF_ULTRALIGHT_EV1_164B, .Text = "MF_ULTRALIGHT_EV1_164B" },
|
||||
#endif
|
||||
#ifdef CONFIG_MF_CLASSIC_1K_SUPPORT
|
||||
{ .Id = CONFIG_MF_CLASSIC_1K, .Text = "MF_CLASSIC_1K" },
|
||||
@@ -85,6 +87,36 @@ static const PROGMEM ConfigurationType ConfigurationTable[] = {
|
||||
.MemorySize = MIFARE_ULTRALIGHT_MEM_SIZE,
|
||||
.ReadOnly = false
|
||||
},
|
||||
[CONFIG_MF_ULTRALIGHT_EV1_80B] = {
|
||||
.CodecInitFunc = ISO14443ACodecInit,
|
||||
.CodecDeInitFunc = ISO14443ACodecDeInit,
|
||||
.CodecTaskFunc = ISO14443ACodecTask,
|
||||
.ApplicationInitFunc = MifareUltralightEV11AppInit,
|
||||
.ApplicationResetFunc = MifareUltralightAppReset,
|
||||
.ApplicationTaskFunc = MifareUltralightAppTask,
|
||||
.ApplicationTickFunc = ApplicationTickDummy,
|
||||
.ApplicationProcessFunc = MifareUltralightAppProcess,
|
||||
.ApplicationGetUidFunc = MifareUltralightGetUid,
|
||||
.ApplicationSetUidFunc = MifareUltralightSetUid,
|
||||
.UidSize = MIFARE_ULTRALIGHT_UID_SIZE,
|
||||
.MemorySize = MIFARE_ULTRALIGHT_EV11_MEM_SIZE,
|
||||
.ReadOnly = false
|
||||
},
|
||||
[CONFIG_MF_ULTRALIGHT_EV1_164B] = {
|
||||
.CodecInitFunc = ISO14443ACodecInit,
|
||||
.CodecDeInitFunc = ISO14443ACodecDeInit,
|
||||
.CodecTaskFunc = ISO14443ACodecTask,
|
||||
.ApplicationInitFunc = MifareUltralightEV12AppInit,
|
||||
.ApplicationResetFunc = MifareUltralightAppReset,
|
||||
.ApplicationTaskFunc = MifareUltralightAppTask,
|
||||
.ApplicationTickFunc = ApplicationTickDummy,
|
||||
.ApplicationProcessFunc = MifareUltralightAppProcess,
|
||||
.ApplicationGetUidFunc = MifareUltralightGetUid,
|
||||
.ApplicationSetUidFunc = MifareUltralightSetUid,
|
||||
.UidSize = MIFARE_ULTRALIGHT_UID_SIZE,
|
||||
.MemorySize = MIFARE_ULTRALIGHT_EV12_MEM_SIZE,
|
||||
.ReadOnly = false
|
||||
},
|
||||
#endif
|
||||
#ifdef CONFIG_MF_CLASSIC_1K_SUPPORT
|
||||
[CONFIG_MF_CLASSIC_1K] = {
|
||||
|
||||
@@ -22,6 +22,8 @@ typedef enum {
|
||||
|
||||
#ifdef CONFIG_MF_ULTRALIGHT_SUPPORT
|
||||
CONFIG_MF_ULTRALIGHT,
|
||||
CONFIG_MF_ULTRALIGHT_EV1_80B,
|
||||
CONFIG_MF_ULTRALIGHT_EV1_164B,
|
||||
#endif
|
||||
#ifdef CONFIG_MF_CLASSIC_1K_SUPPORT
|
||||
CONFIG_MF_CLASSIC_1K,
|
||||
|
||||
Reference in New Issue
Block a user