2024年1月13日发(作者:索寻菱)
_num[1] = 0x04; ret = sensor_read(sd,_num,); if(ret < 0) { csi_dev_err("sensor_read err at register 0x%x%xn",_num[0],_num[1]); return ret; } csi_dev_print("register 0x3004 = 0x%xn",[0]); [0] |= 0x01 <<5; [0] |= 0x01 <<6; ret = sensor_write(sd,_num,); if(ret < 0) { csi_dev_err("sensor_write err at register 0x%x%xn",_num[0],_num[1]); return ret; }
_num[0] = 0x30; //set 0x3001 BIT6=0
_num[1] = 0x01; ret = sensor_read(sd,_num,); if(ret < 0) { csi_dev_err("sensor_read err at register 0x%x%xn",_num[0],_num[1]); return ret; } csi_dev_print("register 0x%x%x = 0x%2xn",_num[0],_num[1],[0]); [0] &= ~(0x01 <<6); ret = sensor_write(sd,_num,); if(ret < 0) { csi_dev_err("sensor_write err at register 0x%x%xn",_num[0],_num[1]); return ret; }
_num[0] = 0x30; //set 0x3005 BIT6=1
_num[1] = 0x05; ret = sensor_read(sd,_num,); if(ret < 0) { csi_dev_err("sensor_read err at register 0x%x%xn",_num[0],_num[1]); return ret; } csi_dev_print("register 0x%x%x = 0x%xn",_num[0],_num[1],[0]); [0] |= 0x01 <<6; ret = sensor_write(sd,_num,); if(ret < 0) { csi_dev_err("sensor_write err at register 0x%x%xn",_num[0],_num[1]); return ret; }
_num[0] = 0x30; //Write 0x03 to 0x3022, start singal af _num[1] = 0x22;
[0] = 0x03; ret = sensor_write(sd,_num,); if(ret < 0) { csi_dev_err("sensor_write err at start a single afn"); return ret; }
while([0] !=0 && i < 50) { i++; msleep(100); ret = sensor_read(sd, _num, ); if (ret < 0) {
2024年1月13日发(作者:索寻菱)
_num[1] = 0x04; ret = sensor_read(sd,_num,); if(ret < 0) { csi_dev_err("sensor_read err at register 0x%x%xn",_num[0],_num[1]); return ret; } csi_dev_print("register 0x3004 = 0x%xn",[0]); [0] |= 0x01 <<5; [0] |= 0x01 <<6; ret = sensor_write(sd,_num,); if(ret < 0) { csi_dev_err("sensor_write err at register 0x%x%xn",_num[0],_num[1]); return ret; }
_num[0] = 0x30; //set 0x3001 BIT6=0
_num[1] = 0x01; ret = sensor_read(sd,_num,); if(ret < 0) { csi_dev_err("sensor_read err at register 0x%x%xn",_num[0],_num[1]); return ret; } csi_dev_print("register 0x%x%x = 0x%2xn",_num[0],_num[1],[0]); [0] &= ~(0x01 <<6); ret = sensor_write(sd,_num,); if(ret < 0) { csi_dev_err("sensor_write err at register 0x%x%xn",_num[0],_num[1]); return ret; }
_num[0] = 0x30; //set 0x3005 BIT6=1
_num[1] = 0x05; ret = sensor_read(sd,_num,); if(ret < 0) { csi_dev_err("sensor_read err at register 0x%x%xn",_num[0],_num[1]); return ret; } csi_dev_print("register 0x%x%x = 0x%xn",_num[0],_num[1],[0]); [0] |= 0x01 <<6; ret = sensor_write(sd,_num,); if(ret < 0) { csi_dev_err("sensor_write err at register 0x%x%xn",_num[0],_num[1]); return ret; }
_num[0] = 0x30; //Write 0x03 to 0x3022, start singal af _num[1] = 0x22;
[0] = 0x03; ret = sensor_write(sd,_num,); if(ret < 0) { csi_dev_err("sensor_write err at start a single afn"); return ret; }
while([0] !=0 && i < 50) { i++; msleep(100); ret = sensor_read(sd, _num, ); if (ret < 0) {