Skip to content

Commit 47108c3

Browse files
kartbennashif
authored andcommitted
drivers: counter: adopt SHELL_HELP
Adopt SHELL_HELP macro for counter_timer_shell Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
1 parent 77e5bec commit 47108c3

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

drivers/counter/counter_timer_shell.c

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -218,15 +218,18 @@ SHELL_DYNAMIC_CMD_CREATE(dsub_device_name, device_name_get);
218218
SHELL_STATIC_SUBCMD_SET_CREATE(
219219
sub_timer,
220220
SHELL_CMD_ARG(periodic, &dsub_device_name,
221-
"timer periodic <timer_instance_node_id> <time_in_us>", cmd_timer_periodic, 3,
222-
0),
221+
SHELL_HELP("Start a periodic timer with specified interval",
222+
"<timer_instance_node_id> <time_in_us>"),
223+
cmd_timer_periodic, 3, 0),
223224
SHELL_CMD_ARG(oneshot, &dsub_device_name,
224-
"timer oneshot <timer_instance_node_id> <channel_id> <time_in_us>",
225+
SHELL_HELP("Set a one-shot alarm on specified channel",
226+
"<timer_instance_node_id> <channel_id> <time_in_us>"),
225227
cmd_timer_oneshot, 4, 0),
226-
SHELL_CMD_ARG(freerun, &dsub_device_name, "timer freerun <timer_instance_node_id>",
228+
SHELL_CMD_ARG(freerun, &dsub_device_name,
229+
SHELL_HELP("Start a timer in free-running mode", "<timer_instance_node_id>"),
227230
cmd_timer_free_running, 2, 0),
228-
SHELL_CMD_ARG(stop, &dsub_device_name, "timer stop <timer_instance_node_id>",
229-
cmd_timer_stop, 2, 0),
231+
SHELL_CMD_ARG(stop, &dsub_device_name,
232+
SHELL_HELP("Stop a timer", "<timer_instance_node_id>"), cmd_timer_stop, 2, 0),
230233
SHELL_SUBCMD_SET_END /* array terminated. */
231234
);
232235

0 commit comments

Comments
 (0)