|
发表于 2008-7-29 10:46:57
|
显示全部楼层
switch (sensor_config_data->image_mirror)
{
case IMAGE_NORMAL:
SET_CAMERA_INPUT_ORDER(INPUT_ORDER_CbYCrY1);
while(temp_reg2 != (0x00|temp_reg1))
{
write_cmos_sensor(0x1E,(0x00|temp_reg1));
temp_reg2=read_cmos_sensor(0x1E);
};
break;
case IMAGE_H_MIRROR:
SET_CAMERA_INPUT_ORDER(INPUT_ORDER_CbYCrY1);
while(temp_reg2 != (0x20|temp_reg1))
{
write_cmos_sensor(0x1E,(0x20|temp_reg1));
temp_reg2=read_cmos_sensor(0x1E);
};
break;
case IMAGE_V_MIRROR:
SET_CAMERA_INPUT_ORDER(INPUT_ORDER_CbYCrY1);
while(temp_reg2 != (0x10|temp_reg1))
{
write_cmos_sensor(0x1E,(0x10|temp_reg1));
temp_reg2=read_cmos_sensor(0x1E);
};
break;
case IMAGE_HV_MIRROR:
SET_CAMERA_INPUT_ORDER(INPUT_ORDER_CbYCrY1);
while(temp_reg2 != (0x30|temp_reg1))
{
write_cmos_sensor(0x1E,(0x30|temp_reg1));
temp_reg2=read_cmos_sensor(0x1E);
};
break;
}
改变全局变量 sensor_config_data->image_mirror 即可实现旋转。 |
|