esp-idf/components/console/test_apps/console
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
..
main feat(console): add command user context support 2023-12-13 10:27:04 +08:00
CMakeLists.txt ci: fixed test apps overriding pytest configs 2023-04-26 11:07:35 +08:00
pytest_console.py change(console): changed unit tests according to sorted help 2023-11-14 11:33:45 +08:00
README.md change(console): changed unit tests according to sorted help 2023-11-14 11:33:45 +08:00
sdkconfig.defaults ci: update idf-core related tests for C6 2023-02-13 13:01:57 +08:00

Supported Targets ESP32 ESP32-C2 ESP32-C3 ESP32-C6 ESP32-H2 ESP32-P4 ESP32-S2 ESP32-S3

Note: Most of the test cases shouldn't be run manually, but pytest should be used instead. E.g., to run all test cases on ESP32 using pytest, use:

pytest --target esp32 -m generic