UL EV1: initial working version

This commit is contained in:
dev_zzo
2017-11-17 18:58:54 +01:00
parent 154383ec66
commit d8e67a18c3
4 changed files with 361 additions and 123 deletions
File diff suppressed because it is too large Load Diff
@@ -12,9 +12,15 @@
#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)
void MifareUltralightAppInit(void);
void MifareUltralightEV11AppInit(void);
void MifareUltralightEV12AppInit(void);
void MifareUltralightAppReset(void);
void MifareUltralightAppTask(void);
+31
View File
@@ -16,6 +16,7 @@ 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" },
#endif
#ifdef CONFIG_MF_CLASSIC_1K_SUPPORT
{ .Id = CONFIG_MF_CLASSIC_1K, .Text = "MF_CLASSIC_1K" },
@@ -85,6 +86,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_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_MEM_SIZE,
.ReadOnly = false
},
#endif
#ifdef CONFIG_MF_CLASSIC_1K_SUPPORT
[CONFIG_MF_CLASSIC_1K] = {
+2
View File
@@ -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,