CLI & History features aan gezet en werkende gekregen op CC3220

This commit is contained in:
Dennis Boekholtz
2024-04-14 21:09:20 +02:00
parent cd72e519a1
commit 04eebfc3fc
2 changed files with 8 additions and 3 deletions

View File

@@ -6,6 +6,7 @@
#include <limits.h>
// #include <config.h>
#define HISTORY 1
#include "../FIFOBuff/FIFOBuffChar.h"
#ifdef HISTORY
@@ -95,9 +96,10 @@ void CLI_PrintHistory()
{
char** historyList;
int ret = History_getFullHistory(History, &historyList);
int i;
if (ret >= 0)
{
for (int i=0; *(historyList + i) != NULL; i++)
for (i=0; *(historyList + i) != NULL; i++)
{
printf("%03i: %s\n", i, *(historyList + i));
}
@@ -262,6 +264,7 @@ bool CLI_charIn(char c)
FIFOBuffChar_delete(fifo);
break;
case 8:
case 127: // backspace
if (FIFOBuffChar_pop(FIFO))
{ // pop something of the buffer