Skip to content

Commit

Permalink
[Telink] Restyled
Browse files Browse the repository at this point in the history
  • Loading branch information
s07641069 committed Jan 19, 2023
1 parent ead3d63 commit 46cb9b4
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 36 deletions.
10 changes: 4 additions & 6 deletions examples/all-clusters-app/telink/src/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
#include <zephyr/logging/log.h>
#include <zephyr/zephyr.h>
#if CONFIG_CHIP_LIB_SHELL
#include <zephyr/shell/shell.h>
#include <sys.h>
#include <zephyr/shell/shell.h>

static int cmd_telink_reboot(const struct shell *shell, size_t argc, char **argv)
static int cmd_telink_reboot(const struct shell * shell, size_t argc, char ** argv)
{
ARG_UNUSED(argc);
ARG_UNUSED(argv);
Expand All @@ -56,10 +56,8 @@ static int cmd_telink_reboot(const struct shell *shell, size_t argc, char **argv
sys_reboot();
}

SHELL_STATIC_SUBCMD_SET_CREATE(sub_telink,
SHELL_CMD(reboot, NULL, "Reboot board command", cmd_telink_reboot),
SHELL_SUBCMD_SET_END
);
SHELL_STATIC_SUBCMD_SET_CREATE(sub_telink, SHELL_CMD(reboot, NULL, "Reboot board command", cmd_telink_reboot),
SHELL_SUBCMD_SET_END);
SHELL_CMD_REGISTER(telink, &sub_telink, "Telink commands", NULL);
#endif // CONFIG_CHIP_LIB_SHELL

Expand Down
10 changes: 4 additions & 6 deletions examples/all-clusters-minimal-app/telink/src/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@
#include <zephyr/zephyr.h>

#if CONFIG_CHIP_LIB_SHELL
#include <zephyr/shell/shell.h>
#include <sys.h>
#include <zephyr/shell/shell.h>

static int cmd_telink_reboot(const struct shell *shell, size_t argc, char **argv)
static int cmd_telink_reboot(const struct shell * shell, size_t argc, char ** argv)
{
ARG_UNUSED(argc);
ARG_UNUSED(argv);
Expand All @@ -54,10 +54,8 @@ static int cmd_telink_reboot(const struct shell *shell, size_t argc, char **argv
sys_reboot();
}

SHELL_STATIC_SUBCMD_SET_CREATE(sub_telink,
SHELL_CMD(reboot, NULL, "Reboot board command", cmd_telink_reboot),
SHELL_SUBCMD_SET_END
);
SHELL_STATIC_SUBCMD_SET_CREATE(sub_telink, SHELL_CMD(reboot, NULL, "Reboot board command", cmd_telink_reboot),
SHELL_SUBCMD_SET_END);
SHELL_CMD_REGISTER(telink, &sub_telink, "Telink commands", NULL);
#endif // CONFIG_CHIP_LIB_SHELL

Expand Down
10 changes: 4 additions & 6 deletions examples/light-switch-app/telink/src/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@
#include <algorithm>

#if CONFIG_CHIP_LIB_SHELL
#include <zephyr/shell/shell.h>
#include <sys.h>
#include <zephyr/shell/shell.h>

static int cmd_telink_reboot(const struct shell *shell, size_t argc, char **argv)
static int cmd_telink_reboot(const struct shell * shell, size_t argc, char ** argv)
{
ARG_UNUSED(argc);
ARG_UNUSED(argv);
Expand All @@ -58,10 +58,8 @@ static int cmd_telink_reboot(const struct shell *shell, size_t argc, char **argv
sys_reboot();
}

SHELL_STATIC_SUBCMD_SET_CREATE(sub_telink,
SHELL_CMD(reboot, NULL, "Reboot board command", cmd_telink_reboot),
SHELL_SUBCMD_SET_END
);
SHELL_STATIC_SUBCMD_SET_CREATE(sub_telink, SHELL_CMD(reboot, NULL, "Reboot board command", cmd_telink_reboot),
SHELL_SUBCMD_SET_END);
SHELL_CMD_REGISTER(telink, &sub_telink, "Telink commands", NULL);
#endif // CONFIG_CHIP_LIB_SHELL

Expand Down
10 changes: 4 additions & 6 deletions examples/lighting-app/telink/src/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@
#include <algorithm>

#if CONFIG_CHIP_LIB_SHELL
#include <zephyr/shell/shell.h>
#include <sys.h>
#include <zephyr/shell/shell.h>

static int cmd_telink_reboot(const struct shell *shell, size_t argc, char **argv)
static int cmd_telink_reboot(const struct shell * shell, size_t argc, char ** argv)
{
ARG_UNUSED(argc);
ARG_UNUSED(argv);
Expand All @@ -59,10 +59,8 @@ static int cmd_telink_reboot(const struct shell *shell, size_t argc, char **argv
sys_reboot();
}

SHELL_STATIC_SUBCMD_SET_CREATE(sub_telink,
SHELL_CMD(reboot, NULL, "Reboot board command", cmd_telink_reboot),
SHELL_SUBCMD_SET_END
);
SHELL_STATIC_SUBCMD_SET_CREATE(sub_telink, SHELL_CMD(reboot, NULL, "Reboot board command", cmd_telink_reboot),
SHELL_SUBCMD_SET_END);
SHELL_CMD_REGISTER(telink, &sub_telink, "Telink commands", NULL);
#endif // CONFIG_CHIP_LIB_SHELL

Expand Down
10 changes: 4 additions & 6 deletions examples/ota-requestor-app/telink/src/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@
#include <algorithm>

#if CONFIG_CHIP_LIB_SHELL
#include <zephyr/shell/shell.h>
#include <sys.h>
#include <zephyr/shell/shell.h>

static int cmd_telink_reboot(const struct shell *shell, size_t argc, char **argv)
static int cmd_telink_reboot(const struct shell * shell, size_t argc, char ** argv)
{
ARG_UNUSED(argc);
ARG_UNUSED(argv);
Expand All @@ -65,10 +65,8 @@ static int cmd_telink_reboot(const struct shell *shell, size_t argc, char **argv
sys_reboot();
}

SHELL_STATIC_SUBCMD_SET_CREATE(sub_telink,
SHELL_CMD(reboot, NULL, "Reboot board command", cmd_telink_reboot),
SHELL_SUBCMD_SET_END
);
SHELL_STATIC_SUBCMD_SET_CREATE(sub_telink, SHELL_CMD(reboot, NULL, "Reboot board command", cmd_telink_reboot),
SHELL_SUBCMD_SET_END);
SHELL_CMD_REGISTER(telink, &sub_telink, "Telink commands", NULL);
#endif // CONFIG_CHIP_LIB_SHELL

Expand Down
10 changes: 4 additions & 6 deletions examples/thermostat/telink/src/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@
#include <algorithm>

#if CONFIG_CHIP_LIB_SHELL
#include <zephyr/shell/shell.h>
#include <sys.h>
#include <zephyr/shell/shell.h>

static int cmd_telink_reboot(const struct shell *shell, size_t argc, char **argv)
static int cmd_telink_reboot(const struct shell * shell, size_t argc, char ** argv)
{
ARG_UNUSED(argc);
ARG_UNUSED(argv);
Expand All @@ -57,10 +57,8 @@ static int cmd_telink_reboot(const struct shell *shell, size_t argc, char **argv
sys_reboot();
}

SHELL_STATIC_SUBCMD_SET_CREATE(sub_telink,
SHELL_CMD(reboot, NULL, "Reboot board command", cmd_telink_reboot),
SHELL_SUBCMD_SET_END
);
SHELL_STATIC_SUBCMD_SET_CREATE(sub_telink, SHELL_CMD(reboot, NULL, "Reboot board command", cmd_telink_reboot),
SHELL_SUBCMD_SET_END);
SHELL_CMD_REGISTER(telink, &sub_telink, "Telink commands", NULL);
#endif // CONFIG_CHIP_LIB_SHELL

Expand Down

0 comments on commit 46cb9b4

Please sign in to comment.