console: handle empty input to esp_console_run correctly

Fixes https://github.com/espressif/esp-idf/issues/1067

Ref. TW15752
This commit is contained in:
Ivan Grokhotkov
2017-10-13 07:12:08 +08:00
parent 8e47c355fa
commit 4d42b5ea24
3 changed files with 7 additions and 1 deletions

View File

@@ -107,6 +107,8 @@ esp_err_t esp_console_cmd_register(const esp_console_cmd_t *cmd);
* @param[out] cmd_ret return code from the command (set if command was run)
* @return
* - ESP_OK, if command was run
* - ESP_ERR_INVALID_ARG, if the command line is empty, or only contained
* whitespace
* - ESP_ERR_NOT_FOUND, if command with given name wasn't registered
* - ESP_ERR_INVALID_STATE, if esp_console_init wasn't called
*/