mirror of
https://github.com/RfidResearchGroup/ChameleonMini.git
synced 2026-05-12 11:20:37 -07:00
Make terminal commands executable from within firmware.
Signed-off-by: Michal Demin <michaldemin@gmail.com>
This commit is contained in:
@@ -389,6 +389,18 @@ static CommandStatusIdType CallCommandFunc(
|
||||
return Status;
|
||||
}
|
||||
|
||||
void CommandExecute(const char* command)
|
||||
{
|
||||
uint8_t i;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(CommandTable); i++) {
|
||||
if (strcmp_P(command, CommandTable[i].Command) == 0) {
|
||||
CallCommandFunc(&CommandTable[i], CHAR_EXEC_MODE, NULL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void DecodeCommand(void)
|
||||
{
|
||||
uint8_t i;
|
||||
|
||||
@@ -15,6 +15,7 @@ void CommandLineInit(void);
|
||||
bool CommandLineProcessByte(uint8_t Byte);
|
||||
void CommandLineTick(void);
|
||||
|
||||
void CommandExecute(const char* command);
|
||||
void CommandLineAppendData(void const * const Buffer, uint16_t Bytes);
|
||||
|
||||
/* Functions for timeout commands */
|
||||
|
||||
Reference in New Issue
Block a user