Commit Graph

11 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
caixinying-git
10a625a7cb docs: update format issues left in CN docs 2023-09-15 17:51:12 +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
daiziyan
4a5600fdd2 docs: update CN translation for console.rst 2023-07-04 14:46:32 +08:00
daiziyan
9ba9dc04b0 docs: updated flash-encryption, startup, memory-types and misc_system_api 2023-03-07 18:06:52 +08:00
Mo Fei Fei
6d4313f414 Docs: update CN trans for idf_monitor.rst 2023-02-03 11:20:18 +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
morris
29f8aecfc0 console_repl: change config structure to support different devices 2020-07-02 07:39:46 +00: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