Skip to content

Commit 3b3f283

Browse files
epc-akejhedberg
authored andcommitted
driver: video: esp32: add set/get_frmival callbacks
forward set/get_frmival api calls to source device. Signed-off-by: Armin Kessler <[email protected]>
1 parent 5ab7ef6 commit 3b3f283

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

drivers/video/video_esp32_dvp.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,20 @@ static void video_esp32_cam_ctrl_init(const struct device *dev)
374374
cam_ll_enable_invert_hsync(data->hal.hw, cfg->invert_hsync);
375375
}
376376

377+
static int video_esp32_set_frmival(const struct device *dev, struct video_frmival *frmival)
378+
{
379+
const struct video_esp32_config *cfg = dev->config;
380+
381+
return video_set_frmival(cfg->source_dev, frmival);
382+
}
383+
384+
static int video_esp32_get_frmival(const struct device *dev, struct video_frmival *frmival)
385+
{
386+
const struct video_esp32_config *cfg = dev->config;
387+
388+
return video_get_frmival(cfg->source_dev, frmival);
389+
}
390+
377391
static int video_esp32_init(const struct device *dev)
378392
{
379393
const struct video_esp32_config *cfg = dev->config;
@@ -432,6 +446,8 @@ static DEVICE_API(video, esp32_driver_api) = {
432446
.flush = video_esp32_flush,
433447
.set_selection = video_esp32_set_selection,
434448
.get_selection = video_esp32_get_selection,
449+
.set_frmival = video_esp32_set_frmival,
450+
.get_frmival = video_esp32_get_frmival,
435451
#ifdef CONFIG_POLL
436452
.set_signal = video_esp32_set_signal,
437453
#endif

0 commit comments

Comments
 (0)