Skip to content

Commit b35ba2d

Browse files
kartbendkalowsk
authored andcommitted
drivers: video: adopt SHELL_HELP
Adopt SHELL_HELP macro for video_shell Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
1 parent dadd657 commit b35ba2d

File tree

2 files changed

+18
-20
lines changed

2 files changed

+18
-20
lines changed

drivers/video/video_shell.c

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,28 +1049,26 @@ SHELL_DYNAMIC_CMD_CREATE(dsub_video_format_dev, complete_video_format_dev);
10491049

10501050
SHELL_STATIC_SUBCMD_SET_CREATE(sub_video_cmds,
10511051
SHELL_CMD_ARG(start, &dsub_video_dev,
1052-
"Start a video device and its sources\n"
1053-
"Usage: video start <device>",
1052+
SHELL_HELP("Start a video device and its sources", "<device>"),
10541053
cmd_video_start, 2, 0),
10551054
SHELL_CMD_ARG(stop, &dsub_video_dev,
1056-
"Stop a video device and its sources\n"
1057-
"Usage: video stop <device>",
1055+
SHELL_HELP("Stop a video device and its sources", "<device>"),
10581056
cmd_video_stop, 2, 0),
10591057
SHELL_CMD_ARG(capture, &dsub_video_dev,
1060-
"Capture a given number of buffers from a device\n"
1061-
"Usage: video capture <device> <num-buffers>",
1058+
SHELL_HELP("Capture a given number of buffers from a device",
1059+
"<device> <num-buffers>"),
10621060
cmd_video_capture, 3, 0),
10631061
SHELL_CMD_ARG(format, &dsub_video_format_dev,
1064-
"Query or set the video format of a device\n"
1065-
"Usage: video format <device> <dir> [<fourcc> <width>x<height>]",
1062+
SHELL_HELP("Query or set the video format of a device",
1063+
"<device> <dir> [<fourcc> <width>x<height>]"),
10661064
cmd_video_format, 3, 2),
10671065
SHELL_CMD_ARG(frmival, &dsub_video_frmival_dev,
1068-
"Query or set the video frame rate/interval of a device\n"
1069-
"Usage: video frmival <device> [<n>fps|<n>ms|<n>us]",
1066+
SHELL_HELP("Query or set the video frame rate/interval of a device",
1067+
"<device> [<n>fps|<n>ms|<n>us]"),
10701068
cmd_video_frmival, 2, 1),
10711069
SHELL_CMD_ARG(ctrl, &dsub_video_ctrl_dev,
1072-
"Query or set video controls of a device\n"
1073-
"Usage: video ctrl <device> [<ctrl> <value>]",
1070+
SHELL_HELP("Query or set video controls of a device",
1071+
"<device> [<ctrl> <value>]"),
10741072
cmd_video_ctrl, 2, 2),
10751073
SHELL_SUBCMD_SET_END
10761074
);

samples/drivers/video/capture/README.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -148,21 +148,21 @@ If using the shell, the capture would not start, and instead it is possible to a
148148

149149
.. code-block:: console
150150
151-
uart:~$ video
151+
uart:~$ video --help
152152
video - Video driver commands
153153
Subcommands:
154154
start : Start a video device and its sources
155-
Usage: video start <device>
155+
Usage: start <device>
156156
stop : Stop a video device and its sources
157-
Usage: video stop <device>
158-
capture : Capture a given number of frames from a device
159-
Usage: video capture <device> <num-frames>
157+
Usage: stop <device>
158+
capture : Capture a given number of buffers from a device
159+
Usage: capture <device> <num-buffers>
160160
format : Query or set the video format of a device
161-
Usage: video format <device> <ep> [<fourcc> <width>x<height>]
161+
Usage: format <device> <dir> [<fourcc> <width>x<height>]
162162
frmival : Query or set the video frame rate/interval of a device
163-
Usage: video frmival <device> <ep> [<n>fps|<n>ms|<n>us]
163+
Usage: frmival <device> [<n>fps|<n>ms|<n>us]
164164
ctrl : Query or set video controls of a device
165-
Usage: video ctrl <device> [<ctrl> <value>]
165+
Usage: ctrl <device> [<ctrl> <value>]
166166
uart:~$
167167
168168

0 commit comments

Comments
 (0)