File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -988,8 +988,9 @@ static int ov5640_set_ctrl_brightness(const struct device *dev, int value)
988
988
static int ov5640_set_ctrl_contrast (const struct device * dev , int value )
989
989
{
990
990
const struct ov5640_config * cfg = dev -> config ;
991
+ const struct ov5640_data * data = dev -> data ;
991
992
992
- if (!IN_RANGE (value , 0 , UINT8_MAX )) {
993
+ if (!IN_RANGE (value , - UINT8_MAX , UINT8_MAX )) {
993
994
return - EINVAL ;
994
995
}
995
996
@@ -999,6 +1000,11 @@ static int ov5640_set_ctrl_contrast(const struct device *dev, int value)
999
1000
return ret ;
1000
1001
}
1001
1002
1003
+ ret = ov5640_modify_reg (& cfg -> i2c , SDE_CTRL6_REG , BIT (2 ), value >= 0 ? 0 : BIT (2 ));
1004
+ if (ret ) {
1005
+ return ret ;
1006
+ }
1007
+
1002
1008
return ov5640_write_reg (& cfg -> i2c , SDE_CTRL6_REG , value & 0xff );
1003
1009
}
1004
1010
You can’t perform that action at this time.
0 commit comments