XilinxProcessorIPLib/drivers/dfeccf/examples/xdfesi570_mgt.c
static int XDfeSi570_I2CWrData_sub(XIicPs *Iic, u8 Addr, u8 *Val, u8 Len)
{
	int Status;
	Status = XIicPs_MasterSendPolled(Iic, Val, Len, Addr);
	if (Status != XST_SUCCESS) {
		return XST_FAILURE;
	}
	while (XIicPs_BusIsBusy(Iic))
		;
	usleep(I2C_SLEEP_US);
	return XST_SUCCESS;
}
/****************************************************************************/
/**
*
* This function is HAL API for I2C write.
*
* @param Iic is I2C port Id.
* @param Addr is address to be written to.
* @param Val is value to write.
* @param Len is data length.
*
* @return
*	- XST_SUCCESS if successful.
*	- XST_FAILURE if failed.
*
* @note		None
*
****************************************************************************/
This function is HAL API for I2C write.
This function is HAL API for I2C write .
static int XDfeSi570_I2CWrData_sub(XIicPs *Iic, u8 Addr, u8 *Val, u8 Len)
{
	int Status;
	Status = XIicPs_MasterSendPolled(Iic, Val, Len, Addr);
	if (Status != XST_SUCCESS) {
		return XST_FAILURE;
	}
	while (XIicPs_BusIsBusy(Iic))
		;
	usleep(I2C_SLEEP_US);
	return XST_SUCCESS;
}
static int XDfeSi570_I2CWrData_sub ( XIicPs * Iic , u8 Addr , u8 * Val , u8 Len ) { int Status ; Status = XIicPs_MasterSendPolled ( Iic , Val , Len , Addr ) ; if ( Status != XST_SUCCESS ) { return XST_FAILURE ; } while ( XIicPs_BusIsBusy ( Iic ) ) ; usleep ( I2C_SLEEP_US ) ; return XST_SUCCESS ; }
This function is HAL API for I2C write.
This function is HAL API for I2C write .