]> git.donarmstrong.com Git - kiibohd-controller.git/blobdiff - Debug/cli/cli.h
Adding basic CLI functionality.
[kiibohd-controller.git] / Debug / cli / cli.h
index d5f4e5bb7ccded0afe5411ff305e4ee8c1f30842..081f372688bd2f253d815ab961294726dcc13eb8 100644 (file)
 
 // ----- Defines -----
 
+#define CLILineBufferMaxSize 100
+#define CLIMaxDictionaries   5
+
+
+// ----- Structs -----
+
+// Each item has a name, description, and function pointer with an argument for arguments
+typedef struct CLIDictItem {
+       char*  name;
+       char*  description;
+       void (*function)(char*);
+} CLIDictItem;
+
+
+
+// ----- Variables -----
+
+char    CLILineBuffer[CLILineBufferMaxSize+1]; // +1 for an additional NULL
+uint8_t CLILineBufferCurrent;
+
+// Main command dictionary
+CLIDictItem *CLIDict[CLIMaxDictionaries];
+uint8_t CLIDictionariesUsed;
+
+
 
 
 // ----- Functions and Corresponding Function Aliases -----
 
 void init_cli();
+void process_cli();
+void registerDictionary_cli( CLIDictItem *cmdDict );
+
+void commandLookup_cli();
 
+// CLI Command Functions
+void cliFunc_help   ( char* args );
+void cliFunc_version( char* args );
 
 
 #endif