XilinxProcessorIPLib/drivers/dp14txss/examples/src/dats_dp14/idt_8t49n24x.c
void IDT_8T49N24x_RegisterDump(u32 I2CBaseAddress, u8 I2CSlaveAddress)
{
	u32 ByteCount = 0;
	u8 Buffer[256];
	int i;

	print("\n\r");
	print("---------------------\n\r");
	print("- IDT8T49N241 I2C dump:\n\r");
	print("---------------------\n\r");
	Buffer[0] = 0;
	Buffer[1] = 0;
	ByteCount = XIic_Send(I2CBaseAddress, I2CSlaveAddress, (u8*)Buffer, 2, XIIC_REPEATED_START);
	if (ByteCount != 2) {
		xil_printf("I2C write error: %d\n\r", ByteCount);
	}
	ByteCount = XIic_Recv(I2CBaseAddress, I2CSlaveAddress, (u8*)Buffer, 0x79, XIIC_STOP);
	if (ByteCount != 0x79) {
		xil_printf("I2C read error: %d\n\r", ByteCount);
	}

	for (i = 0; i < ByteCount; i++) {
		xil_printf("%02x : %02x\n\r", i, Buffer[i]);
	}
	print("\n\r");
}
/*****************************************************************************/
/**
*
* This function displays a registerdump of the IDT 8TN49N24x device.
*
* @param I2CBaseAddress is the baseaddress of the I2C core.
* @param I2CSlaveAddress is the 7-bit I2C slave address.
*
* @return None
*
* @note None.
*
******************************************************************************/
This function displays a registerdump of the IDT 8TN49N24x device.
This function displays a registerdump of the IDT 8TN49N24x device .
void IDT_8T49N24x_RegisterDump(u32 I2CBaseAddress, u8 I2CSlaveAddress)
{
	u32 ByteCount = 0;
	u8 Buffer[256];
	int i;
	print("\n\r");
	print("---------------------\n\r");
	print("- IDT8T49N241 I2C dump:\n\r");
	print("---------------------\n\r");
	Buffer[0] = 0;
	Buffer[1] = 0;
	ByteCount = XIic_Send(I2CBaseAddress, I2CSlaveAddress, (u8*)Buffer, 2, XIIC_REPEATED_START);
	if (ByteCount != 2) {
		xil_printf("I2C write error: %d\n\r", ByteCount);
	}
	ByteCount = XIic_Recv(I2CBaseAddress, I2CSlaveAddress, (u8*)Buffer, 0x79, XIIC_STOP);
	if (ByteCount != 0x79) {
		xil_printf("I2C read error: %d\n\r", ByteCount);
	}
	for (i = 0; i < ByteCount; i++) {
		xil_printf("%02x : %02x\n\r", i, Buffer[i]);
	}
	print("\n\r");
}
void IDT_8T49N24x_RegisterDump ( u32 I2CBaseAddress , u8 I2CSlaveAddress ) { u32 ByteCount = 0 ; u8 Buffer [ 256 ] ; int i ; print ( " \n \r " ) ; print ( " \n \r " ) ; print ( " \n \r " ) ; print ( " \n \r " ) ; Buffer [ 0 ] = 0 ; Buffer [ 1 ] = 0 ; ByteCount = XIic_Send ( I2CBaseAddress , I2CSlaveAddress , ( u8 * ) Buffer , 2 , XIIC_REPEATED_START ) ; if ( ByteCount != 2 ) { xil_printf ( " \n \r " , ByteCount ) ; } ByteCount = XIic_Recv ( I2CBaseAddress , I2CSlaveAddress , ( u8 * ) Buffer , 0x79 , XIIC_STOP ) ; if ( ByteCount != 0x79 ) { xil_printf ( " \n \r " , ByteCount ) ; } for ( i = 0 ; i < ByteCount ; i ++ ) { xil_printf ( " \n \r " , i , Buffer [ i ] ) ; } print ( " \n \r " ) ; }
This function displays a registerdump of the IDT 8TN49N24x device.
This function displays a registerdump of the IDT 8TN49N24x device .