XilinxProcessorIPLib/drivers/mipicsiss/examples/xmipi_vck_example/dp159.c
u8 i2c_dp159_chk(u8 dev) {
	u32 r;
	u8 buf[1];

	// DP159 ES
	if (dev == DP159_ES) {
		r = XIic_Recv(XPAR_IIC_0_BASEADDR, I2C_DP159_ES_ADDR,
 (u8 *)&buf, 1, XIIC_STOP);
	}
	else
		r = XIic_Recv(XPAR_IIC_0_BASEADDR, I2C_DP159_ZOMBIE_ADDR,
 (u8 *)&buf, 1, XIIC_STOP);

	// When a device is found, it returns one byte
	if (r == 1)
	  return XST_SUCCESS;
	else
	  return XST_FAILURE;
}
// I2C DP159 check
// This routine checks if any data can be read from the DP159
I2C DP159 check
This routine checks if any data can be read from the DP159
I2C DP159 check This routine checks if any data can be read from the DP159
u8 i2c_dp159_chk(u8 dev) {
	u32 r;
	u8 buf[1];
	if (dev == DP159_ES) {
		r = XIic_Recv(XPAR_IIC_0_BASEADDR, I2C_DP159_ES_ADDR,
 (u8 *)&buf, 1, XIIC_STOP);
	}
	else
		r = XIic_Recv(XPAR_IIC_0_BASEADDR, I2C_DP159_ZOMBIE_ADDR,
 (u8 *)&buf, 1, XIIC_STOP);
	if (r == 1)
	  return XST_SUCCESS;
	else
	  return XST_FAILURE;
}
u8 i2c_dp159_chk ( u8 dev ) { u32 r ; u8 buf [ 1 ] ; if ( dev == DP159_ES ) { r = XIic_Recv ( XPAR_IIC_0_BASEADDR , I2C_DP159_ES_ADDR , ( u8 * ) & buf , 1 , XIIC_STOP ) ; } else r = XIic_Recv ( XPAR_IIC_0_BASEADDR , I2C_DP159_ZOMBIE_ADDR , ( u8 * ) & buf , 1 , XIIC_STOP ) ; if ( r == 1 ) return XST_SUCCESS ; else return XST_FAILURE ; }
I2C DP159 check
This routine checks if any data can be read from the DP159
I2C DP159 check This routine checks if any data can be read from the DP159
// DP159 ES // When a device is found, it returns one byte