Skip to content

Commit f3b642a

Browse files
committed
drivers: video: shell: introduce the video shell
Introduce the video shell and implement some video shell commands. Make use of the various querying API to implement tab-completion, and validiate the data, as well as convert string names into integers. Commands provided: frmival, format, ctrl, start, stop, capture Signed-off-by: Josuah Demangeon <me@josuah.net>
1 parent c35bb0d commit f3b642a

File tree

5 files changed

+1066
-0
lines changed

5 files changed

+1066
-0
lines changed

drivers/video/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ zephyr_library_sources(video_device.c)
88

99
zephyr_library_sources_ifdef(CONFIG_VIDEO_MCUX_CSI video_mcux_csi.c)
1010
zephyr_library_sources_ifdef(CONFIG_VIDEO_MCUX_MIPI_CSI2RX video_mcux_mipi_csi2rx.c)
11+
zephyr_library_sources_ifdef(CONFIG_VIDEO_SHELL video_shell.c)
1112
zephyr_library_sources_ifdef(CONFIG_VIDEO_SW_GENERATOR video_sw_generator.c)
1213
zephyr_library_sources_ifdef(CONFIG_VIDEO_MT9M114 mt9m114.c)
1314
zephyr_library_sources_ifdef(CONFIG_VIDEO_OV7725 ov7725.c)

drivers/video/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ source "drivers/video/Kconfig.mcux_csi"
5656

5757
source "drivers/video/Kconfig.mcux_mipi_csi2rx"
5858

59+
source "drivers/video/Kconfig.shell"
60+
5961
source "drivers/video/Kconfig.sw_generator"
6062

6163
source "drivers/video/Kconfig.mt9m114"

drivers/video/Kconfig.shell

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Copyright The Zephyr Project Contributors
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config VIDEO_SHELL
5+
bool "Video shell"
6+
depends on SHELL
7+
help
8+
This shell provides control and query commands for video drivers.
9+
10+
if VIDEO_SHELL
11+
12+
config VIDEO_SHELL_CTRL_NAME_SIZE
13+
int "Maximum size for the control string identifier"
14+
default 40
15+
help
16+
Video controls have a human-friendly name that is converted into a string identifier.
17+
This Kconfig controls the maximum size of the string identifier after which the name
18+
would be truncated. The default value is enough for all standard control names.
19+
20+
endif

0 commit comments

Comments
 (0)