Adding basic CLI functionality.

- Supports multiple custom command dictionaries
- Basic handling of control characters
- Initial dictionary for integrated commands
This commit is contained in:
Jacob Alexander 2014-01-22 00:38:53 -08:00
parent 85dd7f5c52
commit 7230e061d7
5 changed files with 263 additions and 5 deletions

View file

@ -240,3 +240,13 @@ uint16_t lenStr( char* in )
return (pos - in);
}
uint8_t eqStr( char* str1, char* str2 )
{
// Scan each string for NULLs and whether they are the same
while( *str1 != '\0' && *str1++ == *str2++ );
// If the strings are still identical (i.e. both NULL), then return 1, otherwise 0
return *--str1 == *--str2 ? 1 : 0;
}