Commit Graph

15 Commits

Author SHA1 Message Date
Alon Bar-Lev
bccb2873bd feat(console): add command user context support
Current implementation implicitly forces the developer to use global variables
to enter its context during the command invocation, this change enables each
module to register a context for command to find without the need to manage
global variables.

No API breakage.

Fields added:
   esp_console_cmd_t::func_w_context    - (*)(int argc, char **argv, void *context)

Functions added:
   esp_err_t esp_console_cmd_set_context(const char *cmd, void *context)

Usage:

   esp_console_cmd_register(&cmd));
   esp_console_cmd_set_context(cmd.command, (void *)"context"));

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
2023-12-13 10:27:04 +08:00
Cai Xin Ying
03c15adc94 docs: update format issues for EN and CN files under api-reference/system and... 2023-08-03 11:32:07 +08:00
Jakob Hasse
197e919d74 refactor(examples/console): Warn if secondary console is active
Having a secondary serial console is not useful when applications
use a REPL console type, hence we warn for it in examples.

Closes https://github.com/espressif/esp-idf/issues/11731
2023-07-03 13:42:35 +08:00
daiziyan
9ba9dc04b0 docs: updated flash-encryption, startup, memory-types and misc_system_api 2023-03-07 18:06:52 +08:00
Roland Dobai
4bd5ebb4a1 Merge branch 'tools/monitor_move' into 'master'
Tools(idf_monitor): Move idf_monitor to separate repo

Closes IDF-4109

See merge request espressif/esp-idf!22050
2023-02-07 19:47:46 +08:00
Sudeep Mohanty
371fe114bc docs: Updated chip independednt api-reference chapters for c6 and h2 2023-02-03 15:00:27 +01:00
Peter Dragun
3e3533f918 feat(idf_monitor): move idf_monitor to separate repo 2023-02-03 11:20:15 +01:00
Marius Vikhammer
030cb77597 docs: update redirected links 2022-05-07 13:09:41 +08:00
Cao Sen Miao
4ae714c43c docs: update using usb_serial_jtag documents 2021-11-23 14:12:13 +08:00
daiziyan
0ff2776b1e docs: update CN translation for ota.rst and console.rst 2021-11-16 19:23:09 +08:00
Omar Chebib
0fd74a43c8 console: re-use the available REPL console API and improve linenoise
Console example doesn't duplicate code in `console` component.
Linenoise has been improved: it now has a parametrized command line
length. It is now possible to paste data efficiently to the console.
Note: this can only be done if the cursor is at the end of the line.

Closes https://github.com/espressif/esp-idf/issues/7057
2021-07-15 11:37:11 +08:00
Marius Vikhammer
91439e3818 docs: updated system api-reference chapters for C3 2021-03-15 18:51:12 +08:00
morris
29f8aecfc0 console_repl: change config structure to support different devices 2020-07-02 07:39:46 +00:00
Ivan Grokhotkov
ece41b04e3 console: make empty line behavior run-time configurable 2020-04-29 23:44:46 +02:00
suda-morris
75cadc2e41 console: simplify examples
1. simplify console examples
2. add "quit" command
3. support console command overwrite
4. add API reference
2020-02-07 20:15:06 +08:00