Skip to content

Commit cd78920

Browse files
kartbendkalowsk
authored andcommitted
drivers: pwm: adopt SHELL_HELP
Adopt SHELL_HELP macro for pwm_shell Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
1 parent 5878070 commit cd78920

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

drivers/pwm/pwm_shell.c

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,21 @@ static void device_name_get(size_t idx, struct shell_static_entry *entry)
144144
SHELL_DYNAMIC_CMD_CREATE(dsub_device_name, device_name_get);
145145

146146
SHELL_STATIC_SUBCMD_SET_CREATE(pwm_cmds,
147-
SHELL_CMD_ARG(cycles, &dsub_device_name, "<device> <channel> <period in cycles> "
148-
"<pulse width in cycles> [flags]", cmd_cycles, 5, 1),
149-
SHELL_CMD_ARG(usec, &dsub_device_name, "<device> <channel> <period in usec> "
150-
"<pulse width in usec> [flags]", cmd_usec, 5, 1),
151-
SHELL_CMD_ARG(nsec, &dsub_device_name, "<device> <channel> <period in nsec> "
152-
"<pulse width in nsec> [flags]", cmd_nsec, 5, 1),
147+
SHELL_CMD_ARG(
148+
cycles, &dsub_device_name,
149+
SHELL_HELP("Set PWM period and pulse width in cycles.",
150+
"<device> <channel> <period> <pulse width> [flags]"),
151+
cmd_cycles, 5, 1),
152+
SHELL_CMD_ARG(
153+
usec, &dsub_device_name,
154+
SHELL_HELP("Set PWM period and pulse width in microseconds.",
155+
"<device> <channel> <period> <pulse width> [flags]"),
156+
cmd_usec, 5, 1),
157+
SHELL_CMD_ARG(
158+
nsec, &dsub_device_name,
159+
SHELL_HELP("Set PWM period and pulse width in nanoseconds.",
160+
"<device> <channel> <period> <pulse width> [flags]"),
161+
cmd_nsec, 5, 1),
153162
SHELL_SUBCMD_SET_END
154163
);
155164

0 commit comments

Comments
 (0)