Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions drivers/video/video_sw_generator.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ LOG_MODULE_REGISTER(video_sw_generator, CONFIG_VIDEO_LOG_LEVEL);

struct sw_ctrls {
struct video_ctrl hflip;
struct video_ctrl test_pattern;
};

struct video_sw_generator_data {
Expand Down Expand Up @@ -69,6 +70,11 @@ static const struct video_format_cap fmts[] = {
{0},
};

static const char *const test_pattern_menu[] = {
"Color bars",
NULL,
};

static int video_sw_generator_set_fmt(const struct device *dev, struct video_format *fmt)
{
struct video_sw_generator_data *data = dev->data;
Expand Down Expand Up @@ -454,6 +460,13 @@ static DEVICE_API(video, video_sw_generator_driver_api) = {
static int video_sw_generator_init_controls(const struct device *dev)
{
struct video_sw_generator_data *data = dev->data;
int ret;

ret = video_init_menu_ctrl(&data->ctrls.test_pattern, dev, VIDEO_CID_TEST_PATTERN,
0, test_pattern_menu);
if (ret < 0) {
return ret;
}

return video_init_ctrl(&data->ctrls.hflip, dev, VIDEO_CID_HFLIP,
(struct video_ctrl_range){.min = 0, .max = 1, .step = 1, .def = 0});
Expand Down
2 changes: 0 additions & 2 deletions samples/drivers/video/capture/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ tests:
- platform:stm32h7b3i_dk:SHIELD="st_b_cams_omv_mb1683"
- platform:ek_ra8d1/r7fa8d1bhecbd:SHIELD="dvp_20pin_ov7670;rtkmipilcdb00000be"
extra_configs:
- CONFIG_TEST=y
- CONFIG_FPU=y
harness: console
harness_config:
Expand All @@ -26,7 +25,6 @@ tests:
- "Got frame \\d+"
- "size: \\d+;"
- "timestamp \\d+"
- "Pattern OK"
platform_allow:
- arduino_nicla_vision/stm32h747xx/m7
- mimxrt1064_evk/mimxrt1064
Expand Down
154 changes: 0 additions & 154 deletions samples/drivers/video/capture/src/check_test_pattern.h

This file was deleted.

Loading