Skip to content

Commit fc94165

Browse files
committed
drivers: video: add emulated Imager driver and RX driver
Add a new implementation of a test pattern generator, with the same architecture as real drivers: split receiver core and I2C-controlled sub-device, with changes of video format in "zephyr,emul-imager" leads to different data produced by "zephyr,emul-rx". Signed-off-by: Josuah Demangeon <me@josuah.net>
1 parent 046e3e8 commit fc94165

File tree

12 files changed

+1173
-4
lines changed

12 files changed

+1173
-4
lines changed

drivers/video/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,5 @@ zephyr_library_sources_ifdef(CONFIG_VIDEO_OV5640 ov5640.c)
1616
zephyr_library_sources_ifdef(CONFIG_VIDEO_OV7670 ov7670.c)
1717
zephyr_library_sources_ifdef(CONFIG_VIDEO_ESP32 video_esp32_dvp.c)
1818
zephyr_library_sources_ifdef(CONFIG_VIDEO_MCUX_SDMA video_mcux_smartdma.c)
19+
zephyr_library_sources_ifdef(CONFIG_VIDEO_EMUL_IMAGER video_emul_imager.c)
20+
zephyr_library_sources_ifdef(CONFIG_VIDEO_EMUL_RX video_emul_rx.c)

drivers/video/Kconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,8 @@ source "drivers/video/Kconfig.gc2145"
7474

7575
source "drivers/video/Kconfig.mcux_sdma"
7676

77+
source "drivers/video/Kconfig.emul_imager"
78+
79+
source "drivers/video/Kconfig.emul_rx"
80+
7781
endif # VIDEO

drivers/video/Kconfig.emul_imager

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Copyright (c) 2024 tinyVision.ai Inc.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config VIDEO_EMUL_IMAGER
5+
bool "Software implementation of an imager"
6+
depends on DT_HAS_ZEPHYR_VIDEO_EMUL_IMAGER_ENABLED
7+
default y
8+
help
9+
Enable driver for the emulated Imager.
10+
11+
config VIDEO_EMUL_IMAGER_FRAMEBUFFER_SIZE
12+
int "Internal framebuffer size used for link emulation purpose"
13+
default 4096
14+
help
15+
Configure the size of the internal framebuffer the emulated Imager
16+
driver uses to simulate MIPI transfers. This is the first field of
17+
dev->data, and the emulated video MIPI driver will `memcpy()` it
18+
into the video buffer.

drivers/video/Kconfig.emul_rx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Copyright (c) 2024 tinyVision.ai Inc.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config VIDEO_EMUL_RX
5+
bool "Software implementation of video frame RX core"
6+
depends on DT_HAS_ZEPHYR_VIDEO_EMUL_RX_ENABLED
7+
depends on VIDEO_EMUL_IMAGER
8+
default y
9+
help
10+
Enable driver for the MIPI RX emulated DMA engine.

0 commit comments

Comments
 (0)