/** * @brief Read the OV9655 Camera identity. * @param DeviceAddr: Device address on communication Bus. * @retval the OV9655 ID */ uint16_t ov9655_ReadID(uint16_t DeviceAddr) { /* Initialize I2C */ CAMERA_IO_Init(); /* Get the camera ID */ return (CAMERA_IO_Read(DeviceAddr, OV9655_SENSOR_PIDH)); }
/** * @brief Read the OV2640 Camera identity. * @param DeviceAddr: Device address on communication Bus. * @retval the OV2640 ID */ uint16_t ov2640_ReadID(uint16_t DeviceAddr) { if(Is_I2C_Initialized == 0) { /* Initialize I2C */ CAMERA_IO_Init(); Is_I2C_Initialized = 1; } /* Prepare the sensor to read the Camera ID */ CAMERA_IO_Write(DeviceAddr, OV2640_DSP_RA_DLMT, 0x01); /* Get the camera ID */ return (CAMERA_IO_Read(DeviceAddr, OV2640_SENSOR_PIDH)); }