mirror of
https://github.com/RfidResearchGroup/ChameleonMini.git
synced 2026-05-12 11:20:37 -07:00
Added Mifare Ultralight C support.
Changed SettingsSetActiveById() to first MemoryRecall() before initializing Application.
This commit is contained in:
@@ -18,6 +18,7 @@ static const MapEntryType PROGMEM ConfigurationMap[] = {
|
||||
{ .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" },
|
||||
{.Id = CONFIG_MF_ULTRALIGHT_C, .Text = "MF_ULTRALIGHT_C"},
|
||||
#endif
|
||||
#ifdef CONFIG_MF_CLASSIC_MINI_4B_SUPPORT
|
||||
{ .Id = CONFIG_MF_CLASSIC_MINI_4B, .Text = "MF_CLASSIC_MINI_4B" },
|
||||
@@ -107,6 +108,22 @@ static const PROGMEM ConfigurationType ConfigurationTable[] = {
|
||||
.ReadOnly = false,
|
||||
.TagFamily = TAG_FAMILY_ISO14443A
|
||||
},
|
||||
[CONFIG_MF_ULTRALIGHT_C] ={
|
||||
.CodecInitFunc = ISO14443ACodecInit,
|
||||
.CodecDeInitFunc = ISO14443ACodecDeInit,
|
||||
.CodecTaskFunc = ISO14443ACodecTask,
|
||||
.ApplicationInitFunc = MifareUltralightCAppInit,
|
||||
.ApplicationResetFunc = MifareUltralightCAppReset,
|
||||
.ApplicationTaskFunc = MifareUltralightAppTask,
|
||||
.ApplicationTickFunc = ApplicationTickDummy,
|
||||
.ApplicationProcessFunc = MifareUltralightAppProcess,
|
||||
.ApplicationGetUidFunc = MifareUltralightGetUid,
|
||||
.ApplicationSetUidFunc = MifareUltralightSetUid,
|
||||
.UidSize = MIFARE_ULTRALIGHT_UID_SIZE,
|
||||
.MemorySize = MIFARE_ULTRALIGHTC_MEM_SIZE,
|
||||
.ReadOnly = false,
|
||||
.TagFamily = TAG_FAMILY_ISO14443A
|
||||
},
|
||||
[CONFIG_MF_ULTRALIGHT_EV1_80B] = {
|
||||
.CodecInitFunc = ISO14443ACodecInit,
|
||||
.CodecDeInitFunc = ISO14443ACodecDeInit,
|
||||
|
||||
@@ -22,6 +22,7 @@ typedef enum {
|
||||
|
||||
#ifdef CONFIG_MF_ULTRALIGHT_SUPPORT
|
||||
CONFIG_MF_ULTRALIGHT,
|
||||
CONFIG_MF_ULTRALIGHT_C,
|
||||
CONFIG_MF_ULTRALIGHT_EV1_80B,
|
||||
CONFIG_MF_ULTRALIGHT_EV1_164B,
|
||||
#endif
|
||||
|
||||
@@ -72,12 +72,13 @@ bool SettingsSetActiveById(uint8_t Setting) {
|
||||
GlobalSettings.ActiveSettingPtr =
|
||||
&GlobalSettings.Settings[SettingIdx];
|
||||
|
||||
/* Recall new memory contents ( Moved this to allow for Access to new Memory in Application init())*/
|
||||
MemoryRecall();
|
||||
|
||||
/* Settings have changed. Progress changes through system */
|
||||
ConfigurationSetById(GlobalSettings.ActiveSettingPtr->Configuration);
|
||||
LogSetModeById(GlobalSettings.ActiveSettingPtr->LogMode);
|
||||
|
||||
/* Recall new memory contents */
|
||||
MemoryRecall();
|
||||
|
||||
SETTING_UPDATE(GlobalSettings.ActiveSettingIdx);
|
||||
SETTING_UPDATE(GlobalSettings.ActiveSettingPtr);
|
||||
|
||||
Reference in New Issue
Block a user