OV2685:
chip_id
address:0x300a default:0x26
address:0x300b default:0x85
address:0x300c defailt:0x00
Back to the morning of the topic, if I want to check the ID of the camera, my code can write so, in the Gpl329a-sensor-id settings there is complete code, here I only give a small part:
Sensor_info.write_data[0] = 0x30; SENSOR_INFO.WRITE_DATA[1] = 0x0a; Sensor_info.write_size = 2;sensor_info.read_size = 2;ret = IOCTL (FD, I2c_bus_write_read, &sensor_info); if (Ret < 0 {<span style= "White-space:pre" ></span>perror ("IOCTL set i²c arg\n"); continue;} Readdevice = (Sensor_info.read_data[0] << 8) + sensor_info.read_data[1];//if (Readdevice = = 0x2656) if (Readdevice = = 0x2685) {DEBUG ("i2c_bus_write_read data = 0x%02x\n", readdevice); i = Max_device + 1;<span style= "White-space:pre" ></span>deviceno = 2;} else{printf ("Error i2c_bus_write_read data = 0x%02x\n", readdevice);}
Look at the code:
Sensor_info.write_data[0] = 0x30; SENSOR_INFO.WRITE_DATA[1] = 0x0a;
The meaning of this structure array is to store the values of the two registers, and then to read the corresponding value of the address via the I²c bus, if the read value is 0x2685, this indicates that the device has been driven, and also read the corresponding ID number.
The associated register address for the sensor ID setting in the camera ov2685