XilinxProcessorIPLib/drivers/board_common/src/rfclk/src/xrfclk.c
static int XRFClk_I2CRdData_sub(int File, u8 Addr, u8 *Val, u8 Len)
{
	int ret = XST_SUCCESS;
	struct i2c_rdwr_ioctl_data packets;
	struct i2c_msg messages;
	messages.addr = Addr;
	messages.flags = I2C_M_RD;
	messages.len = Len;
	messages.buf = Val;
	packets.msgs = &messages;
	packets.nmsgs = 1;
	if (ioctl(File, I2C_RDWR, &packets) < 0) {
		ret = XST_FAILURE;
	}
	return ret;
}
/****************************************************************************/
/**
*
* This function is HAL API for I2c read.
*
* @param	File descriptor for the i2c driver.
* @param	Addr address to be read.
* @param	Val read value.
* @param	Len data length.
*
* @return
*	- XST_SUCCESS if successful.
*	- XST_FAILURE if failed.
*
* @note		None
*
****************************************************************************/
This function is HAL API for I2c read.
This function is HAL API for I2c read .
static int XRFClk_I2CRdData_sub(int File, u8 Addr, u8 *Val, u8 Len)
{
	int ret = XST_SUCCESS;
	struct i2c_rdwr_ioctl_data packets;
	struct i2c_msg messages;
	messages.addr = Addr;
	messages.flags = I2C_M_RD;
	messages.len = Len;
	messages.buf = Val;
	packets.msgs = &messages;
	packets.nmsgs = 1;
	if (ioctl(File, I2C_RDWR, &packets) < 0) {
		ret = XST_FAILURE;
	}
	return ret;
}
static int XRFClk_I2CRdData_sub ( int File , u8 Addr , u8 * Val , u8 Len ) { int ret = XST_SUCCESS ; struct i2c_rdwr_ioctl_data packets ; struct i2c_msg messages ; messages . addr = Addr ; messages . flags = I2C_M_RD ; messages . len = Len ; messages . buf = Val ; packets . msgs = & messages ; packets . nmsgs = 1 ; if ( ioctl ( File , I2C_RDWR , & packets ) < 0 ) { ret = XST_FAILURE ; } return ret ; }
This function is HAL API for I2c read.
This function is HAL API for I2c read .