File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -1211,7 +1211,12 @@ static int gc2145_init_controls(const struct device *dev)
1211
1211
1212
1212
static int gc2145_init (const struct device * dev )
1213
1213
{
1214
- struct video_format fmt ;
1214
+ /* set default/init format VGA RGB565 */
1215
+ struct video_format fmt = {
1216
+ .pixelformat = VIDEO_PIX_FMT_RGB565 ,
1217
+ .width = RESOLUTION_VGA_W ,
1218
+ .height = RESOLUTION_VGA_H ,
1219
+ };
1215
1220
int ret ;
1216
1221
const struct gc2145_config * cfg = dev -> config ;
1217
1222
(void ) cfg ;
@@ -1250,11 +1255,6 @@ static int gc2145_init(const struct device *dev)
1250
1255
return ret ;
1251
1256
}
1252
1257
1253
- /* set default/init format VGA RGB565 */
1254
- fmt .pixelformat = VIDEO_PIX_FMT_RGB565 ;
1255
- fmt .width = RESOLUTION_VGA_W ;
1256
- fmt .height = RESOLUTION_VGA_H ;
1257
-
1258
1258
ret = gc2145_set_fmt (dev , & fmt );
1259
1259
if (ret ) {
1260
1260
LOG_ERR ("Unable to configure default format" );
You can’t perform that action at this time.
0 commit comments