XilinxProcessorIPLib/drivers/dp14rxss/examples/src/rx_only/ti_lmk03318.c
void TI_LMK03318_RegisterDump(u32 I2CBaseAddress, u8 I2CSlaveAddress)
{
	u32 ByteCount = 0;
	u8 Buffer[256];
	int i;

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

	xil_printf("      ");
	for (i = 0 ; i < 10 ; i++)
		xil_printf("+%01d ", i);

	xil_printf("\n\r      ");
	for (i = 0 ; i < 10 ; i++)
		xil_printf("---");

	for (i = 0 ; i < ByteCount ; i++) {
		if ((i % 10) == 0) {
			xil_printf("\n\r%02d : ", i);
		}
		xil_printf("%02x ", Buffer[i]);
	}

	print("\n\r");
}
/*****************************************************************************/
/**
*
* This function displays a registerdump of the TI LMK03318 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 TI LMK03318 device.
This function displays a registerdump of the TI LMK03318 device .
void TI_LMK03318_RegisterDump(u32 I2CBaseAddress, u8 I2CSlaveAddress)
{
	u32 ByteCount = 0;
	u8 Buffer[256];
	int i;
	print("\n\r");
	print("-----------------------\n\r");
	print("- TI LMK03381 I2C dump:\n\r");
	print("-----------------------\n\r");
	Buffer[0] = 0;
	ByteCount = XIic_Send(I2CBaseAddress, I2CSlaveAddress,
			      (u8*)Buffer, 1, XIIC_REPEATED_START);
	if (ByteCount != 1) {
		xil_printf("I2C write error: %d\n\r", ByteCount);
	}
	ByteCount = XIic_Recv(I2CBaseAddress, I2CSlaveAddress,
			      (u8*)Buffer, 145, XIIC_STOP);
	if (ByteCount != 145) {
		xil_printf("I2C read error: %d\n\r", ByteCount);
	}
	xil_printf("      ");
	for (i = 0 ; i < 10 ; i++)
		xil_printf("+%01d ", i);
	xil_printf("\n\r      ");
	for (i = 0 ; i < 10 ; i++)
		xil_printf("---");
	for (i = 0 ; i < ByteCount ; i++) {
		if ((i % 10) == 0) {
			xil_printf("\n\r%02d : ", i);
		}
		xil_printf("%02x ", Buffer[i]);
	}
	print("\n\r");
}
void TI_LMK03318_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 ; ByteCount = XIic_Send ( I2CBaseAddress , I2CSlaveAddress , ( u8 * ) Buffer , 1 , XIIC_REPEATED_START ) ; if ( ByteCount != 1 ) { xil_printf ( " \n \r " , ByteCount ) ; } ByteCount = XIic_Recv ( I2CBaseAddress , I2CSlaveAddress , ( u8 * ) Buffer , 145 , XIIC_STOP ) ; if ( ByteCount != 145 ) { xil_printf ( " \n \r " , ByteCount ) ; } xil_printf ( " " ) ; for ( i = 0 ; i < 10 ; i ++ ) xil_printf ( " " , i ) ; xil_printf ( " \n \r " ) ; for ( i = 0 ; i < 10 ; i ++ ) xil_printf ( " " ) ; for ( i = 0 ; i < ByteCount ; i ++ ) { if ( ( i % 10 ) == 0 ) { xil_printf ( " \n \r " , i ) ; } xil_printf ( " " , Buffer [ i ] ) ; } print ( " \n \r " ) ; }
This function displays a registerdump of the TI LMK03318 device.
This function displays a registerdump of the TI LMK03318 device .