Skip to content

Commit

Permalink
[shell] move common shell commands to common library
Browse files Browse the repository at this point in the history
This is the first PR of the effort toadd shell as an optional component
for all devices.

* Move wifi, ble and device config command to common library
* The `wifi` commands has been simplified with less modes.
  Platform-specific commands have been removed.
* The `btp` command is renamed to `ble` with all the not-implemented
  commands removed.
* The `device config` command is renamed to `config` with unused configs
  removed.
* Fix shell formatting on ESP32.
  • Loading branch information
gjc13 committed May 13, 2021
1 parent 5abb72c commit 7a9b020
Show file tree
Hide file tree
Showing 23 changed files with 827 additions and 1,361 deletions.
5 changes: 5 additions & 0 deletions examples/lock-app/esp32/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*.vscode

/build/
/sdkconfig
/sdkconfig.old
1 change: 1 addition & 0 deletions examples/shell/esp32/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ static void chip_shell_task(void * args)
{
const char * prompt = LOG_COLOR_I "> " LOG_RESET_COLOR;
char * line = linenoise(prompt);
printf("\r\n");
if (line == NULL || strlen(line) == 0)
{
continue;
Expand Down
3 changes: 0 additions & 3 deletions examples/shell/shell_common/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ config("shell_common_config") {

static_library("shell_common") {
sources = [
"cmd_base64.cpp",
"cmd_btp.cpp",
"cmd_device.cpp",
"cmd_misc.cpp",
"cmd_otcli.cpp",
"cmd_ping.cpp",
Expand Down
114 changes: 0 additions & 114 deletions examples/shell/shell_common/cmd_base64.cpp

This file was deleted.

199 changes: 0 additions & 199 deletions examples/shell/shell_common/cmd_btp.cpp

This file was deleted.

Loading

0 comments on commit 7a9b020

Please sign in to comment.