Skip to content

Commit b84294c

Browse files
committed
w1: shell: adopt SHELL_HELP
have w1 shell commands use the new SHELL_HELP macro Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
1 parent 9ab0ea7 commit b84294c

File tree

1 file changed

+19
-21
lines changed

1 file changed

+19
-21
lines changed

drivers/w1/w1_shell.c

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -370,43 +370,41 @@ static int cmd_w1_search(const struct shell *sh, size_t argc, char **argv)
370370

371371
SHELL_STATIC_SUBCMD_SET_CREATE(sub_w1,
372372
SHELL_CMD_ARG(reset, NULL,
373-
"Reset 1-Wire bus.\n"
374-
"Usage: <device>",
373+
SHELL_HELP("Reset 1-Wire bus",
374+
"<device>"),
375375
cmd_w1_reset_bus, 2, 0),
376376
SHELL_CMD_ARG(read_bit, NULL,
377-
"Read 1-Wire bit.\n"
378-
"Usage: <device>",
377+
SHELL_HELP("Read 1-Wire bit",
378+
"<device>"),
379379
cmd_w1_read_bit, 2, 0),
380380
SHELL_CMD_ARG(read_byte, NULL,
381-
"Read 1-Wire byte.\n"
382-
"Usage: <device>",
381+
SHELL_HELP("Read 1-Wire byte",
382+
"<device>"),
383383
cmd_w1_read_byte, 2, 0),
384384
SHELL_CMD_ARG(read_block, NULL,
385-
"Read 1-Wire block.\n"
386-
"Usage: <device> <num_bytes>",
385+
SHELL_HELP("Read 1-Wire block",
386+
"<device> <num_bytes>"),
387387
cmd_w1_read_block, 3, 0),
388388
SHELL_CMD_ARG(write_bit, NULL,
389-
"Write 1-Wire bit.\n"
390-
"Usage: <device> <bit>",
389+
SHELL_HELP("Write 1-Wire bit",
390+
"<device> <bit>"),
391391
cmd_w1_write_bit, 3, 0),
392392
SHELL_CMD_ARG(write_byte, NULL,
393-
"Write 1-Wire byte.\n"
394-
"Usage: <device> [-r] <byte>\n"
395-
OPTION_HELP_RESET,
393+
SHELL_HELP("Write 1-Wire byte",
394+
"<device> [-r] <byte>"),
396395
cmd_w1_write_byte, 3, 1),
397396
SHELL_CMD_ARG(write_block, NULL,
398-
"Write 1-Wire block.\n"
399-
"Usage: <device> [-r] <byte1> [<byte2>, ...]\n"
400-
OPTION_HELP_RESET,
397+
SHELL_HELP("Write 1-Wire block",
398+
"<device> [-r] <byte1> [<byte2>, ...]"),
401399
cmd_w1_write_block, 3, BUF_SIZE),
402400
SHELL_CMD_ARG(config, NULL,
403-
"Configure 1-Wire host.\n"
404-
"Usage: <device> <type> <value>\n"
405-
"<type> is either a name or an id.",
401+
SHELL_HELP("Configure 1-Wire host",
402+
"<device> <type> <value>\n"
403+
"<type> is either a name or an id."),
406404
cmd_w1_configure, 4, 0),
407405
SHELL_CMD_ARG(search, NULL,
408-
"1-Wire devices.\n"
409-
"Usage: <device>",
406+
SHELL_HELP("Search 1-Wire devices on bus",
407+
"<device>"),
410408
cmd_w1_search, 2, 0),
411409
SHELL_SUBCMD_SET_END /* Array terminated. */
412410
);

0 commit comments

Comments
 (0)