File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -1000,8 +1000,13 @@ static int ov2640_init_controls(const struct device *dev)
1000
1000
1001
1001
static int ov2640_init (const struct device * dev )
1002
1002
{
1003
- struct video_format fmt ;
1004
1003
int ret = 0 ;
1004
+ /* set default/init format SVGA RGB565 */
1005
+ struct video_format fmt = {
1006
+ .pixelformat = VIDEO_PIX_FMT_RGB565 ,
1007
+ .width = SVGA_HSIZE ,
1008
+ .height = SVGA_VSIZE ,
1009
+ };
1005
1010
1006
1011
#if DT_INST_NODE_HAS_PROP (0 , reset_gpios )
1007
1012
const struct ov2640_config * cfg = dev -> config ;
@@ -1028,10 +1033,6 @@ static int ov2640_init(const struct device *dev)
1028
1033
1029
1034
ov2640_write_all (dev , default_regs , ARRAY_SIZE (default_regs ));
1030
1035
1031
- /* set default/init format SVGA RGB565 */
1032
- fmt .pixelformat = VIDEO_PIX_FMT_RGB565 ;
1033
- fmt .width = SVGA_HSIZE ;
1034
- fmt .height = SVGA_VSIZE ;
1035
1036
ret = ov2640_set_fmt (dev , & fmt );
1036
1037
if (ret ) {
1037
1038
LOG_ERR ("Unable to configure default format" );
You can’t perform that action at this time.
0 commit comments