Skip to content

Commit e462ef3

Browse files
ngphibangkartben
authored andcommitted
drivers: video: ov7670: Set default format to RGB565 QVGA
The default format for ov7670 is currently VGA YUYV and it counts on the smartdma to reset the format to RGB565 QVGA when get_format() is called. Recently, set_format() is decoupled from get_format() so this assumption is nolonger correct. Set the default format to RGB565 QVGA instead. Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
1 parent 2e25820 commit e462ef3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/video/ov7670.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -551,9 +551,9 @@ static int ov7670_init(const struct device *dev)
551551
k_msleep(5);
552552

553553
/* Set default camera format (QVGA, YUYV) */
554-
fmt.pixelformat = VIDEO_PIX_FMT_YUYV;
555-
fmt.width = 640;
556-
fmt.height = 480;
554+
fmt.pixelformat = VIDEO_PIX_FMT_RGB565;
555+
fmt.width = 320;
556+
fmt.height = 240;
557557
ret = ov7670_set_fmt(dev, &fmt);
558558
if (ret < 0) {
559559
return ret;

0 commit comments

Comments
 (0)