drivers: pwm: adopt SHELL_HELP
Adopt SHELL_HELP macro for pwm_shell Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This commit is contained in:
parent
5878070178
commit
cd78920785
1 changed files with 15 additions and 6 deletions
|
@ -144,12 +144,21 @@ static void device_name_get(size_t idx, struct shell_static_entry *entry)
|
||||||
SHELL_DYNAMIC_CMD_CREATE(dsub_device_name, device_name_get);
|
SHELL_DYNAMIC_CMD_CREATE(dsub_device_name, device_name_get);
|
||||||
|
|
||||||
SHELL_STATIC_SUBCMD_SET_CREATE(pwm_cmds,
|
SHELL_STATIC_SUBCMD_SET_CREATE(pwm_cmds,
|
||||||
SHELL_CMD_ARG(cycles, &dsub_device_name, "<device> <channel> <period in cycles> "
|
SHELL_CMD_ARG(
|
||||||
"<pulse width in cycles> [flags]", cmd_cycles, 5, 1),
|
cycles, &dsub_device_name,
|
||||||
SHELL_CMD_ARG(usec, &dsub_device_name, "<device> <channel> <period in usec> "
|
SHELL_HELP("Set PWM period and pulse width in cycles.",
|
||||||
"<pulse width in usec> [flags]", cmd_usec, 5, 1),
|
"<device> <channel> <period> <pulse width> [flags]"),
|
||||||
SHELL_CMD_ARG(nsec, &dsub_device_name, "<device> <channel> <period in nsec> "
|
cmd_cycles, 5, 1),
|
||||||
"<pulse width in nsec> [flags]", cmd_nsec, 5, 1),
|
SHELL_CMD_ARG(
|
||||||
|
usec, &dsub_device_name,
|
||||||
|
SHELL_HELP("Set PWM period and pulse width in microseconds.",
|
||||||
|
"<device> <channel> <period> <pulse width> [flags]"),
|
||||||
|
cmd_usec, 5, 1),
|
||||||
|
SHELL_CMD_ARG(
|
||||||
|
nsec, &dsub_device_name,
|
||||||
|
SHELL_HELP("Set PWM period and pulse width in nanoseconds.",
|
||||||
|
"<device> <channel> <period> <pulse width> [flags]"),
|
||||||
|
cmd_nsec, 5, 1),
|
||||||
SHELL_SUBCMD_SET_END
|
SHELL_SUBCMD_SET_END
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue