MCPcopy Create free account
hub / github.com/kiibohd/controller / CLI_init

Function CLI_init

Debug/cli/cli.c:130–158  ·  view source on GitHub ↗

Initialize the CLI

Source from the content-addressed store, hash-verified

128
129// Initialize the CLI
130inline void CLI_init()
131{
132 // Reset the Line Buffer
133 CLILineBufferCurrent = 0;
134
135 // History starts empty
136 CLIHistoryHead = 0;
137 CLIHistoryCurrent = 0;
138 CLIHistoryTail = 0;
139
140 // Set prompt
141 prompt();
142
143 // Register first dictionary
144 CLIDictionariesUsed = 0;
145 CLI_registerDictionary( basicCLIDict, basicCLIDictName );
146
147 // Initialize main LED
148 init_errorLED();
149 CLILEDState = 0;
150
151 // Hex debug mode is off by default
152 CLIHexDebugMode = 0;
153
154#if defined(_host_)
155 // Make sure we're not exiting right away in Host-side KLL mode
156 CLI_exit = 0;
157#endif
158}
159
160// Query the serial input buffer for any new characters
161int CLI_process()

Callers 2

mainFunction · 0.85
Host_initFunction · 0.85

Calls 3

promptFunction · 0.85
CLI_registerDictionaryFunction · 0.85
init_errorLEDFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…