-
Notifications
You must be signed in to change notification settings - Fork 7.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ESP Linenoise] new esp linenoise with multiconsole support (IDFGH-9126) #10526
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,9 +12,7 @@ extern "C" { | |
#include <stddef.h> | ||
#include "sdkconfig.h" | ||
#include "esp_err.h" | ||
|
||
// Forward declaration. Definition in linenoise/linenoise.h. | ||
typedef struct linenoiseCompletions linenoiseCompletions; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could we keep this as a forward declaration instead of pulling in the dependency on esp_linenoise.h header? |
||
#include "esp_linenoise.h" | ||
|
||
/** | ||
* @brief Parameters for console initialization | ||
|
@@ -244,9 +242,9 @@ size_t esp_console_split_argv(char *line, char **argv, size_t argv_size); | |
* linenoiseSetCompletionCallback(&esp_console_get_completion); | ||
* | ||
* @param buf the string typed by the user | ||
* @param lc linenoiseCompletions to be filled in | ||
* @param lc esp_linenoise_completions_t to be filled in | ||
*/ | ||
void esp_console_get_completion(const char *buf, linenoiseCompletions *lc); | ||
void esp_console_get_completion(const char *buf, esp_linenoise_completions_t *lc); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just to check: with this change, does the (I assume the answer is "yes" since you didn't have to modify the example. Is that due to that `#include "esp_linenoise.h" above which you have added?) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've done my testing with the "basic" example. But I think you are correct. |
||
|
||
/** | ||
* @brief Callback which provides command hints for linenoise library | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably still need to return ESP_ERR_INVALID_STATE if esp_console_init wasn't called?