From 93e77a27cdbac96b34a84a3fae0049f73d797f67 Mon Sep 17 00:00:00 2001 From: Maxie Dion Schmidt Date: Thu, 30 Jun 2022 22:42:22 -0400 Subject: [PATCH] Stashing changes to DESFire code -- No PSTR wrappers on command names as this doesn't change the ELF application size --- Doc/DESFireSupportReadme.md | 8 -- .../DESFire/DESFireChameleonTerminal.c | 126 +----------------- .../DESFire/DESFireChameleonTerminal.h | 18 +-- .../DESFire/DESFireChameleonTerminalInclude.c | 16 +-- .../Chameleon-Mini/Application/Reader14443A.c | 7 +- Firmware/Chameleon-Mini/Configuration.c | 7 +- .../Chameleon-Mini/Terminal/CommandLine.c | 14 +- Firmware/Chameleon-Mini/Terminal/Commands.c | 1 + Firmware/Chameleon-Mini/Terminal/Commands.h | 68 +++++----- 9 files changed, 62 insertions(+), 203 deletions(-) diff --git a/Doc/DESFireSupportReadme.md b/Doc/DESFireSupportReadme.md index e054c478..11f94670 100644 --- a/Doc/DESFireSupportReadme.md +++ b/Doc/DESFireSupportReadme.md @@ -226,14 +226,6 @@ DESFire emulation if things suddenly fail after a call to this terminal command. Putting the Chameleon through a full power recycle (battery off) should reset the setting to the defaults. -#### DF_LOGMODE -- Sets the depth of (LIVE) logging messages printed at runtime - -Syntax -- not guaranteeing that all of these are meaningful or distinct just yet: -```bash -DF_LOGMODE=0 -DF_LOGMODE=1 -``` - ## Supported functionality ### Tables of tested support for active commands diff --git a/Firmware/Chameleon-Mini/Application/DESFire/DESFireChameleonTerminal.c b/Firmware/Chameleon-Mini/Application/DESFire/DESFireChameleonTerminal.c index 948604f2..0fedeffa 100644 --- a/Firmware/Chameleon-Mini/Application/DESFire/DESFireChameleonTerminal.c +++ b/Firmware/Chameleon-Mini/Application/DESFire/DESFireChameleonTerminal.c @@ -35,27 +35,16 @@ This notice must be retained at the top of all source files where indicated. #include "DESFireLogging.h" bool IsDESFireConfiguration(void) { - return GlobalSettings.ActiveSettingPtr->Configuration == CONFIG_MF_DESFIRE; -} - -CommandStatusIdType ExitOnInvalidConfigurationError(char *OutParam) { - if (OutParam != NULL) { - sprintf_P(OutParam, PSTR("Invalid Configuration: Set `CONFIG=MF_DESFIRE`.\r\n")); - } - return COMMAND_ERR_INVALID_USAGE_ID; + return GlobalSettings.ActiveSettingPtr->Configuration == CONFIG_MF_DESFIRE || + GlobalSettings.ActiveSettingPtr->Configuration == CONFIG_MF_DESFIRE_2KEV1 || + GlobalSettings.ActiveSettingPtr->Configuration == CONFIG_MF_DESFIRE_4KEV1 || + GlobalSettings.ActiveSettingPtr->Configuration == CONFIG_MF_DESFIRE_4KEV2; } #ifndef DISABLE_PERMISSIVE_DESFIRE_SETTINGS -CommandStatusIdType CommandDESFireGetHeaderProperty(char *OutParam) { - snprintf_P(OutParam, TERMINAL_BUFFER_SIZE, - PSTR("%s "), - DFCOMMAND_SET_HEADER); - return COMMAND_INFO_OK_WITH_TEXT_ID; -} - CommandStatusIdType CommandDESFireSetHeaderProperty(char *OutParam, const char *InParams) { if (!IsDESFireConfiguration()) { - ExitOnInvalidConfigurationError(OutParam); + return COMMAND_ERR_INVALID_USAGE_ID; } char hdrPropSpecStr[24]; char propSpecBytesStr[16]; @@ -63,7 +52,6 @@ CommandStatusIdType CommandDESFireSetHeaderProperty(char *OutParam, const char * SIZET dataByteCount = 0x00; BYTE StatusError = 0x00; if (!sscanf_P(InParams, PSTR("%24s %12s"), hdrPropSpecStr, propSpecBytesStr)) { - CommandDESFireGetHeaderProperty(OutParam); return COMMAND_ERR_INVALID_PARAM_ID; } hdrPropSpecStr[23] = propSpecBytesStr[15] = '\0'; @@ -119,7 +107,6 @@ CommandStatusIdType CommandDESFireSetHeaderProperty(char *OutParam, const char * StatusError = 1; } if (StatusError) { - CommandDESFireGetHeaderProperty(OutParam); return COMMAND_ERR_INVALID_USAGE_ID; } SynchronizePICCInfo(); @@ -127,109 +114,9 @@ CommandStatusIdType CommandDESFireSetHeaderProperty(char *OutParam, const char * } #endif /* DISABLE_PERMISSIVE_DESFIRE_SETTINGS */ -CommandStatusIdType CommandDESFireGetLoggingMode(char *OutParam) { - if (!IsDESFireConfiguration()) { - ExitOnInvalidConfigurationError(OutParam); - } - switch (LocalLoggingMode) { - case OFF: - snprintf_P(OutParam, TERMINAL_BUFFER_SIZE, PSTR("OFF")); - break; - case NORMAL: - snprintf_P(OutParam, TERMINAL_BUFFER_SIZE, PSTR("NORMAL")); - break; - case VERBOSE: - snprintf_P(OutParam, TERMINAL_BUFFER_SIZE, PSTR("VERBOSE")); - break; - case DEBUGGING: - snprintf_P(OutParam, TERMINAL_BUFFER_SIZE, PSTR("DEBUGGING")); - break; - default: - break; - } - return COMMAND_INFO_OK_WITH_TEXT_ID; -} - -CommandStatusIdType CommandDESFireSetLoggingMode(char *OutParam, const char *InParams) { - if (!IsDESFireConfiguration()) { - ExitOnInvalidConfigurationError(OutParam); - } - char valueStr[16]; - if (!sscanf_P(InParams, PSTR("%15s"), valueStr)) { - return COMMAND_ERR_INVALID_PARAM_ID; - } - valueStr[15] = '\0'; - if (!strcasecmp_P(valueStr, PSTR("1")) || !strcasecmp_P(valueStr, PSTR("TRUE")) || - !strcasecmp_P(valueStr, PSTR("ON"))) { - LocalLoggingMode = NORMAL; - return COMMAND_INFO_OK_ID; - } else if (!strcasecmp_P(valueStr, PSTR("0")) || !strcasecmp_P(valueStr, PSTR("FALSE")) || - !strcasecmp_P(valueStr, PSTR("OFF"))) { - LocalLoggingMode = OFF; - return COMMAND_INFO_OK_ID; - } else if (!strcasecmp_P(valueStr, PSTR("VERBOSE"))) { - LocalLoggingMode = VERBOSE; - return COMMAND_INFO_OK_ID; - } else if (!strcasecmp_P(valueStr, PSTR("DEBUGGING"))) { - LocalLoggingMode = DEBUGGING; - return COMMAND_INFO_OK_ID; - } else { - snprintf_P(OutParam, TERMINAL_BUFFER_SIZE, PSTR("%s "), - DFCOMMAND_LOGGING_MODE); - return COMMAND_ERR_INVALID_USAGE_ID; - } -} - -CommandStatusIdType CommandDESFireGetTestingMode(char *OutParam) { - if (!IsDESFireConfiguration()) { - ExitOnInvalidConfigurationError(OutParam); - } else if (LocalTestingMode) { - return COMMAND_INFO_TRUE_ID; - } - return COMMAND_INFO_FALSE_ID; -} - -CommandStatusIdType CommandDESFireSetTestingMode(char *OutParam, const char *InParams) { - if (!IsDESFireConfiguration()) { - ExitOnInvalidConfigurationError(OutParam); - } - char valueStr[16]; - if (!sscanf_P(InParams, PSTR("%15s"), valueStr)) { - return COMMAND_ERR_INVALID_PARAM_ID; - } - valueStr[15] = '\0'; - if (!strcasecmp_P(valueStr, PSTR("1")) || !strcasecmp_P(valueStr, PSTR("TRUE")) || - !strcasecmp_P(valueStr, PSTR("ON"))) { - LocalTestingMode = 0x01; - return COMMAND_INFO_TRUE_ID; - } else if (!strcasecmp_P(valueStr, PSTR("0")) || !strcasecmp_P(valueStr, PSTR("FALSE")) || - !strcasecmp_P(valueStr, PSTR("OFF"))) { - LocalTestingMode = 0x00; - return COMMAND_INFO_FALSE_ID; - } - return COMMAND_ERR_INVALID_USAGE_ID; -} - -CommandStatusIdType CommandDESFireGetCommMode(char *OutParam) { - if (!IsDESFireConfiguration()) { - ExitOnInvalidConfigurationError(OutParam); - } else if (DesfireCommMode == DESFIRE_COMMS_PLAINTEXT) { - snprintf_P(OutParam, TERMINAL_BUFFER_SIZE, PSTR("Plaintext")); - } else if (DesfireCommMode == DESFIRE_COMMS_PLAINTEXT_MAC) { - snprintf_P(OutParam, TERMINAL_BUFFER_SIZE, PSTR("Plaintext/MAC")); - } else if (DesfireCommMode == DESFIRE_COMMS_CIPHERTEXT_DES) { - snprintf_P(OutParam, TERMINAL_BUFFER_SIZE, PSTR("Enciphered/DES")); - } else if (DesfireCommMode == DESFIRE_COMMS_CIPHERTEXT_AES128) { - snprintf_P(OutParam, TERMINAL_BUFFER_SIZE, PSTR("Enciphered/AES128")); - } else { - snprintf_P(OutParam, TERMINAL_BUFFER_SIZE, PSTR("Unknown")); - } - return COMMAND_INFO_OK_WITH_TEXT_ID; -} - CommandStatusIdType CommandDESFireSetCommMode(char *OutParam, const char *InParams) { if (!IsDESFireConfiguration()) { - ExitOnInvalidConfigurationError(OutParam); + return COMMAND_ERR_INVALID_USAGE_ID; } char valueStr[16]; if (!sscanf_P(InParams, PSTR("%15s"), valueStr)) { @@ -253,7 +140,6 @@ CommandStatusIdType CommandDESFireSetCommMode(char *OutParam, const char *InPara DesfireCommandState.ActiveCommMode = DesfireCommMode; return COMMAND_INFO_OK; } - snprintf_P(OutParam, TERMINAL_BUFFER_SIZE, PSTR("Options are: Plaintext|Plaintext:MAC|Enciphered:3K3DES|Enciphered:AES128")); return COMMAND_ERR_INVALID_USAGE_ID; } diff --git a/Firmware/Chameleon-Mini/Application/DESFire/DESFireChameleonTerminal.h b/Firmware/Chameleon-Mini/Application/DESFire/DESFireChameleonTerminal.h index 22d8f19c..dd97ec42 100644 --- a/Firmware/Chameleon-Mini/Application/DESFire/DESFireChameleonTerminal.h +++ b/Firmware/Chameleon-Mini/Application/DESFire/DESFireChameleonTerminal.h @@ -38,22 +38,12 @@ bool IsDESFireConfiguration(void); #ifndef DISABLE_PERMISSIVE_DESFIRE_SETTINGS #define DFCOMMAND_SET_HEADER "DF_SETHDR" -CommandStatusIdType CommandDESFireGetHeaderProperty(char *OutParam); CommandStatusIdType CommandDESFireSetHeaderProperty(char *OutMessage, const char *InParams); -#endif +#endif /* DISABLE_PERMISSIVE_DESFIRE_SETTINGS */ -#define DFCOMMAND_LOGGING_MODE "DF_LOGMODE" -CommandStatusIdType CommandDESFireGetLoggingMode(char *OutParam); -CommandStatusIdType CommandDESFireSetLoggingMode(char *OutMessage, const char *InParams); - -#define DFCOMMAND_TESTING_MODE "DF_TESTMODE" -CommandStatusIdType CommandDESFireGetTestingMode(char *OutParam); -CommandStatusIdType CommandDESFireSetTestingMode(char *OutMessage, const char *InParams); - -#define DFCOMMAND_COMM_MODE "DF_COMM_MODE" -CommandStatusIdType CommandDESFireGetCommMode(char *OutParam); +#define DFCOMMAND_COMM_MODE "DF_COMM_MODE" CommandStatusIdType CommandDESFireSetCommMode(char *OutMessage, const char *InParams); -#endif +#endif /* DESFire Support */ -#endif +#endif /* __DESFIRE_CHAMELEON_TERMINAL_H__ */ diff --git a/Firmware/Chameleon-Mini/Application/DESFire/DESFireChameleonTerminalInclude.c b/Firmware/Chameleon-Mini/Application/DESFire/DESFireChameleonTerminalInclude.c index 41935c15..4ec11316 100644 --- a/Firmware/Chameleon-Mini/Application/DESFire/DESFireChameleonTerminalInclude.c +++ b/Firmware/Chameleon-Mini/Application/DESFire/DESFireChameleonTerminalInclude.c @@ -33,25 +33,13 @@ This notice must be retained at the top of all source files where indicated. .ExecFunc = NO_FUNCTION, .ExecParamFunc = NO_FUNCTION, .SetFunc = CommandDESFireSetHeaderProperty, - .GetFunc = CommandDESFireGetHeaderProperty -}, { - .Command = DFCOMMAND_LOGGING_MODE, - .ExecFunc = NO_FUNCTION, - .ExecParamFunc = NO_FUNCTION, - .SetFunc = CommandDESFireSetLoggingMode, - .GetFunc = CommandDESFireGetLoggingMode -}, { - .Command = DFCOMMAND_TESTING_MODE, - .ExecFunc = NO_FUNCTION, - .ExecParamFunc = NO_FUNCTION, - .SetFunc = CommandDESFireSetTestingMode, - .GetFunc = CommandDESFireGetTestingMode + .GetFunc = NO_FUNCTION }, { .Command = DFCOMMAND_COMM_MODE, .ExecFunc = NO_FUNCTION, .ExecParamFunc = NO_FUNCTION, .SetFunc = CommandDESFireSetCommMode, - .GetFunc = CommandDESFireGetCommMode + .GetFunc = NO_FUNCTION }, #endif diff --git a/Firmware/Chameleon-Mini/Application/Reader14443A.c b/Firmware/Chameleon-Mini/Application/Reader14443A.c index a0485a04..988c0566 100644 --- a/Firmware/Chameleon-Mini/Application/Reader14443A.c +++ b/Firmware/Chameleon-Mini/Application/Reader14443A.c @@ -1,5 +1,4 @@ -#if defined(CONFIG_ISO14443A_READER_SUPPORT) || \ - defined(CONFIG_ISO14443A_SNIFF_SUPPORT) +#if defined(CONFIG_ISO14443A_READER_SUPPORT) || defined(CONFIG_ISO14443A_SNIFF_SUPPORT) #include "Reader14443A.h" #include "LEDHook.h" @@ -99,8 +98,8 @@ static const CardIdentificationType PROGMEM CardIdentificationList[] = { [CardType_NXP_MIFARE_Classic_1k] = { .ATQA = 0x0004, .ATQARelevant = true, .SAK = 0x08, .SAKRelevant = true, .ATSRelevant = false, .Manufacturer = "NXP", .Type = "MIFARE Classic 1k" }, [CardType_NXP_MIFARE_Classic_4k] = { .ATQA = 0x0002, .ATQARelevant = true, .SAK = 0x18, .SAKRelevant = true, .ATSRelevant = false, .Manufacturer = "NXP", .Type = "MIFARE Classic 4k" }, [CardType_NXP_MIFARE_Ultralight] = { .ATQA = 0x0044, .ATQARelevant = true, .SAK = 0x00, .SAKRelevant = true, .ATSRelevant = false, .Manufacturer = "NXP", .Type = "MIFARE Ultralight" }, -// [CardType_NXP_MIFARE_Ultralight_C] = { .ATQA=0x0044, .ATQARelevant=true, .SAK=0x00, .SAKRelevant=true, .ATSRelevant=false, .Manufacturer="NXP", .Type="MIFARE Ultralight C" }, -// [CardType_NXP_MIFARE_Ultralight_EV1] = { .ATQA=0x0044, .ATQARelevant=true, .SAK=0x00, .SAKRelevant=false, .ATSRelevant=false, .Manufacturer="NXP", .Type="MIFARE Ultralight EV1" }, + //[CardType_NXP_MIFARE_Ultralight_C] = { .ATQA=0x0044, .ATQARelevant=true, .SAK=0x00, .SAKRelevant=true, .ATSRelevant=false, .Manufacturer="NXP", .Type="MIFARE Ultralight C" }, + //[CardType_NXP_MIFARE_Ultralight_EV1] = { .ATQA=0x0044, .ATQARelevant=true, .SAK=0x00, .SAKRelevant=false, .ATSRelevant=false, .Manufacturer="NXP", .Type="MIFARE Ultralight EV1" }, // for the following two, setting ATSRelevant to true would cause checking the ATS value, but the NXP paper for distinguishing cards does not recommend this [CardType_NXP_MIFARE_DESFire] = { .ATQA = 0x0344, .ATQARelevant = true, .SAK = 0x20, .SAKRelevant = true, .ATSRelevant = false, .ATSSize = 5, .ATS = {0x75, 0x77, 0x81, 0x02, 0x80}, .Manufacturer = "NXP", .Type = "MIFARE DESFire" }, [CardType_NXP_MIFARE_DESFire_EV1] = { .ATQA = 0x0344, .ATQARelevant = true, .SAK = 0x20, .SAKRelevant = true, .ATSRelevant = false, .ATSSize = 5, .ATS = {0x75, 0x77, 0x81, 0x02, 0x80}, .Manufacturer = "NXP", .Type = "MIFARE DESFire EV1" }, diff --git a/Firmware/Chameleon-Mini/Configuration.c b/Firmware/Chameleon-Mini/Configuration.c index 8a314be8..b7f7b951 100644 --- a/Firmware/Chameleon-Mini/Configuration.c +++ b/Firmware/Chameleon-Mini/Configuration.c @@ -69,9 +69,10 @@ static const MapEntryType PROGMEM ConfigurationMap[] = { { .Id = CONFIG_EM4233, .Text = "EM4233" }, #endif #ifdef CONFIG_MF_DESFIRE_SUPPORT - { .Id = CONFIG_MF_DESFIRE, .Text = "MF_DESFIRE" }, - { .Id = CONFIG_MF_DESFIRE_2KEV1, .Text = "MF_DESFIRE_2KEV1" }, - { .Id = CONFIG_MF_DESFIRE_4KEV1, .Text = "MF_DESFIRE_4KEV1" }, + { .Id = CONFIG_MF_DESFIRE, .Text = "MF_DESFIRE" }, + { .Id = CONFIG_MF_DESFIRE_2KEV1, .Text = "MF_DESFIRE_2KEV1" }, + { .Id = CONFIG_MF_DESFIRE_4KEV1, .Text = "MF_DESFIRE_4KEV1" }, + { .Id = CONFIG_MF_DESFIRE_4KEV2, .Text = "MF_DESFIRE_4KEV2" }, #endif }; diff --git a/Firmware/Chameleon-Mini/Terminal/CommandLine.c b/Firmware/Chameleon-Mini/Terminal/CommandLine.c index f318493e..1f402ec4 100644 --- a/Firmware/Chameleon-Mini/Terminal/CommandLine.c +++ b/Firmware/Chameleon-Mini/Terminal/CommandLine.c @@ -12,7 +12,7 @@ #define CHAR_GET_MODE '?' /* ? */ #define CHAR_SET_MODE '=' /* = */ #define CHAR_EXEC_MODE '\0' /* */ -#define CHAR_EXEC_MODE_PARAM ' ' /* ... */ +#define CHAR_EXEC_MODE_PARAM ' ' /* ... */ #define IS_COMMAND_DELIMITER(c) ( \ ((c) == CHAR_EXEC_MODE) || ((c) == CHAR_GET_MODE) || ((c) == CHAR_SET_MODE) || ((c) == CHAR_EXEC_MODE_PARAM) \ @@ -34,7 +34,7 @@ #define NO_FUNCTION ((void*) 0) #define STATUS_MESSAGE_TRAILER "\r\n" -#define OPTIONAL_ANSWER_TRAILER "\r\n" +#define OPTIONAL_ANSWER_TRAILER "\r\n" /* Include all command functions */ #include "Commands.h" @@ -492,10 +492,12 @@ static void DecodeCommand(void) { TerminalSendString(pTerminalBuffer); TerminalSendStringP(PSTR(OPTIONAL_ANSWER_TRAILER)); if (StringLength(pTerminalBuffer, TERMINAL_BUFFER_SIZE) + 1 >= TERMINAL_BUFFER_SIZE) { - // Notify the user that the command line output is truncated. This can come up in the - // 'CONFIG=MF_DESFIRE' variants where the Makefile setting 'MEMORY_LIMITED_TESTING' is - // enabled by default to save space for other necessary components. - TerminalSendStringP(PSTR("-- OUTPUT TRUNCATED --")); + /* + * Notify the user that the command line output is truncated. This can come up in the + * 'CONFIG=MF_DESFIRE' variants where the Makefile setting 'MEMORY_LIMITED_TESTING' is + * enabled by default to save space for other necessary components. + */ + TerminalSendStringP(PSTR("--TRUNCATED OUTPUT--")); TerminalSendStringP(PSTR(OPTIONAL_ANSWER_TRAILER)); } } diff --git a/Firmware/Chameleon-Mini/Terminal/Commands.c b/Firmware/Chameleon-Mini/Terminal/Commands.c index 7b5ccb28..0f389d48 100644 --- a/Firmware/Chameleon-Mini/Terminal/Commands.c +++ b/Firmware/Chameleon-Mini/Terminal/Commands.c @@ -21,6 +21,7 @@ #ifdef CONFIG_ISO15693_SNIFF_SUPPORT #include "../Codec/SniffISO15693.h" #endif /*#ifdef CONFIG_ISO15693_SNIFF_SUPPORT*/ + extern Reader14443Command Reader14443CurrentCommand; extern Sniff14443Command Sniff14443CurrentCommand; diff --git a/Firmware/Chameleon-Mini/Terminal/Commands.h b/Firmware/Chameleon-Mini/Terminal/Commands.h index fd5e4dc1..caf2b504 100644 --- a/Firmware/Chameleon-Mini/Terminal/Commands.h +++ b/Firmware/Chameleon-Mini/Terminal/Commands.h @@ -16,23 +16,23 @@ #define COMMAND_INFO_XMODEM_WAIT_ID 110 #define COMMAND_INFO_XMODEM_WAIT "WAITING FOR XMODEM" #define COMMAND_INFO_FALSE_ID 120 -#define COMMAND_INFO_FALSE "FALSE" +#define COMMAND_INFO_FALSE "FALSE" #define COMMAND_INFO_TRUE_ID 121 -#define COMMAND_INFO_TRUE "TRUE" +#define COMMAND_INFO_TRUE "TRUE" #define COMMAND_ERR_UNKNOWN_CMD_ID 200 #define COMMAND_ERR_UNKNOWN_CMD "UNKNOWN COMMAND" #define COMMAND_ERR_INVALID_USAGE_ID 201 #define COMMAND_ERR_INVALID_USAGE "INVALID COMMAND USAGE" #define COMMAND_ERR_INVALID_PARAM_ID 202 #define COMMAND_ERR_INVALID_PARAM "INVALID PARAMETER" -#define COMMAND_ERR_TIMEOUT_ID 203 -#define COMMAND_ERR_TIMEOUT "TIMEOUT" -#define TIMEOUT_COMMAND 255 // this is just for the CommandLine module to know that this is a timeout command +#define COMMAND_ERR_TIMEOUT_ID 203 +#define COMMAND_ERR_TIMEOUT "TIMEOUT" +#define TIMEOUT_COMMAND 255 // this is just for the CommandLine module to know that this is a timeout command #define COMMAND_CHAR_TRUE '1' #define COMMAND_CHAR_FALSE '0' -#define COMMAND_CHAR_SUGGEST '?' /* =? for help */ +#define COMMAND_CHAR_SUGGEST '?' /* =? for help */ #define COMMAND_UID_BUFSIZE 32 @@ -54,58 +54,58 @@ typedef struct { CommandGetFuncType GetFunc; } CommandEntryType; -#define COMMAND_VERSION "VERSION" +#define COMMAND_VERSION "VERSION" CommandStatusIdType CommandGetVersion(char *OutParam); -#define COMMAND_CONFIG "CONFIG" +#define COMMAND_CONFIG "CONFIG" CommandStatusIdType CommandGetConfig(char *OutParam); CommandStatusIdType CommandSetConfig(char *OutMessage, const char *InParam); -#define COMMAND_UID "UID" -#define COMMAND_UID_RANDOM "RANDOM" +#define COMMAND_UID "UID" +#define COMMAND_UID_RANDOM "RANDOM" CommandStatusIdType CommandGetUid(char *OutParam); CommandStatusIdType CommandSetUid(char *OutMessage, const char *InParam); -#define COMMAND_READONLY "READONLY" +#define COMMAND_READONLY "READONLY" CommandStatusIdType CommandGetReadOnly(char *OutParam); CommandStatusIdType CommandSetReadOnly(char *OutMessage, const char *InParam); -#define COMMAND_UPLOAD "UPLOAD" +#define COMMAND_UPLOAD "UPLOAD" CommandStatusIdType CommandExecUpload(char *OutMessage); -#define COMMAND_DOWNLOAD "DOWNLOAD" +#define COMMAND_DOWNLOAD "DOWNLOAD" CommandStatusIdType CommandExecDownload(char *OutMessage); -#define COMMAND_RESET "RESET" +#define COMMAND_RESET "RESET" CommandStatusIdType CommandExecReset(char *OutMessage); -#define COMMAND_UPGRADE "UPGRADE" +#define COMMAND_UPGRADE "UPGRADE" CommandStatusIdType CommandExecUpgrade(char *OutMessage); -#define COMMAND_MEMSIZE "MEMSIZE" +#define COMMAND_MEMSIZE "MEMSIZE" CommandStatusIdType CommandGetMemSize(char *OutParam); -#define COMMAND_UIDSIZE "UIDSIZE" +#define COMMAND_UIDSIZE "UIDSIZE" CommandStatusIdType CommandGetUidSize(char *OutParam); -#define COMMAND_RBUTTON "RBUTTON" +#define COMMAND_RBUTTON "RBUTTON" CommandStatusIdType CommandGetRButton(char *OutParam); CommandStatusIdType CommandSetRButton(char *OutMessage, const char *InParam); -#define COMMAND_RBUTTON_LONG "RBUTTON_LONG" +#define COMMAND_RBUTTON_LONG "RBUTTON_LONG" CommandStatusIdType CommandGetRButtonLong(char *OutParam); CommandStatusIdType CommandSetRButtonLong(char *OutMessage, const char *InParam); -#define COMMAND_LBUTTON "LBUTTON" +#define COMMAND_LBUTTON "LBUTTON" CommandStatusIdType CommandGetLButton(char *OutParam); CommandStatusIdType CommandSetLButton(char *OutMessage, const char *InParam); -#define COMMAND_LBUTTON_LONG "LBUTTON_LONG" +#define COMMAND_LBUTTON_LONG "LBUTTON_LONG" CommandStatusIdType CommandGetLButtonLong(char *OutParam); CommandStatusIdType CommandSetLButtonLong(char *OutMessage, const char *InParam); -#define COMMAND_LEDGREEN "LEDGREEN" +#define COMMAND_LEDGREEN "LEDGREEN" CommandStatusIdType CommandGetLedGreen(char *OutParam); CommandStatusIdType CommandSetLedGreen(char *OutMessage, const char *InParam); @@ -113,24 +113,24 @@ CommandStatusIdType CommandSetLedGreen(char *OutMessage, const char *InParam); CommandStatusIdType CommandGetLedRed(char *OutParam); CommandStatusIdType CommandSetLedRed(char *OutMessage, const char *InParam); -#define COMMAND_PIN "PIN" +#define COMMAND_PIN "PIN" CommandStatusIdType CommandGetPin(char *OutParam); CommandStatusIdType CommandSetPin(char *OutMessage, const char *InParam); -#define COMMAND_LOGMODE "LOGMODE" +#define COMMAND_LOGMODE "LOGMODE" CommandStatusIdType CommandGetLogMode(char *OutParam); CommandStatusIdType CommandSetLogMode(char *OutMessage, const char *InParam); -#define COMMAND_LOGMEM "LOGMEM" +#define COMMAND_LOGMEM "LOGMEM" CommandStatusIdType CommandGetLogMem(char *OutParam); #define COMMAND_LOGDOWNLOAD "LOGDOWNLOAD" CommandStatusIdType CommandExecLogDownload(char *OutMessage); -#define COMMAND_STORELOG "LOGSTORE" +#define COMMAND_STORELOG "LOGSTORE" CommandStatusIdType CommandExecStoreLog(char *OutMessage); -#define COMMAND_LOGCLEAR "LOGCLEAR" +#define COMMAND_LOGCLEAR "LOGCLEAR" CommandStatusIdType CommandExecLogClear(char *OutMessage); #define COMMAND_SETTING "SETTING" @@ -149,7 +149,7 @@ CommandStatusIdType CommandExecRecall(char *OutMessage); #define COMMAND_CHARGING "CHARGING" CommandStatusIdType CommandGetCharging(char *OutParam); -#define COMMAND_HELP "HELP" +#define COMMAND_HELP "HELP" CommandStatusIdType CommandExecHelp(char *OutMessage); #define COMMAND_RSSI "RSSI" @@ -158,7 +158,7 @@ CommandStatusIdType CommandGetRssi(char *OutParam); #define COMMAND_SYSTICK "SYSTICK" CommandStatusIdType CommandGetSysTick(char *OutParam); -#define COMMAND_SEND_RAW "SEND_RAW" +#define COMMAND_SEND_RAW "SEND_RAW" CommandStatusIdType CommandExecParamSendRaw(char *OutMessage, const char *InParams); #define COMMAND_SEND "SEND" @@ -167,7 +167,7 @@ CommandStatusIdType CommandExecParamSend(char *OutMessage, const char *InParams) #define COMMAND_GETUID "GETUID" CommandStatusIdType CommandExecGetUid(char *OutMessage); -#define COMMAND_DUMP_MFU "DUMP_MFU" +#define COMMAND_DUMP_MFU "DUMP_MFU" CommandStatusIdType CommandExecDumpMFU(char *OutMessage); #define COMMAND_CLONE_MFU "CLONE_MFU" @@ -184,18 +184,18 @@ CommandStatusIdType CommandSetTimeout(char *OutMessage, const char *InParam); CommandStatusIdType CommandGetThreshold(char *OutParam); CommandStatusIdType CommandSetThreshold(char *OutMessage, const char *InParam); -#define COMMAND_AUTOCALIBRATE "AUTOCALIBRATE" +#define COMMAND_AUTOCALIBRATE "AUTOCALIBRATE" CommandStatusIdType CommandExecAutocalibrate(char *OutMessage); -#define COMMAND_FIELD "FIELD" +#define COMMAND_FIELD "FIELD" CommandStatusIdType CommandSetField(char *OutMessage, const char *InParam); CommandStatusIdType CommandGetField(char *OutMessage); -#define COMMAND_CLONE "CLONE" +#define COMMAND_CLONE "CLONE" CommandStatusIdType CommandExecClone(char *OutMessage); #ifdef CONFIG_ISO15693_SNIFF_SUPPORT -#define COMMAND_AUTOTHRESHOLD "AUTOTHRESHOLD" +#define COMMAND_AUTOTHRESHOLD "AUTOTHRESHOLD" CommandStatusIdType CommandGetAutoThreshold(char *OutParam); CommandStatusIdType CommandSetAutoThreshold(char *OutMessage, const char *InParam); #endif /*#ifdef CONFIG_ISO15693_SNIFF_SUPPORT*/