/******************************************************************************
*
* Copyright (C) 2002 - 2014 Xilinx, Inc. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* Use of the Software is limited solely to applications:
* (a) running on a Xilinx device, or
* (b) that interact with a Xilinx device through a bus or interconnect.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* XILINX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* Except as contained in this notice, the name of the Xilinx shall not be used
* in advertising or otherwise to promote the sale, use or other dealings in
* this Software without prior written authorization from Xilinx.
*
******************************************************************************/
/******************************************************************************/
/**
* @file xiic_selftest_example.c
*
* This file contains a example for using the IIC hardware device and
* XIic driver.
*
* @note
*
* None
*
*
* MODIFICATION HISTORY:
*
* Ver Who Date Changes
* ----- ---- -------- -----------------------------------------------
* 1.00a sv 05/09/05 Initial release for TestApp integration.
* 2.00a sdm 09/22/09 Updated to use the HAL APIs, replaced call to
* XIic_Initialize API with XIic_LookupConfig and
* XIic_CfgInitialize. Minor changes made as per
* coding guidelines.
*
*
*******************************************************************************/
#include
#include "xparameters.h"
#include "xiic.h"
#include "xbasic_types.h"
//#include "cf_hdmi.h"
/************************** Constant Definitions ******************************/
/*
* The following constants map to the XPAR parameters created in the
* xparameters.h file. They are defined here such that a user can easily
* change all the needed parameters in one place.
*/
#ifndef TESTAPP_GEN
#define IIC_DEVICE_ID XPAR_IIC_0_DEVICE_ID
#endif
#define IIC_BASE_ADDRESS XPAR_IIC_0_BASEADDR
#define IIC_BASE_ADDRESS_hdmi_in XPAR_IIC_1_BASEADDR
// PCA9548 8-port IIC Switch
#define EEPROM_TEST_START_ADDRESS 128
/**************************** Type Definitions ********************************/
/***************** Macros (Inline Functions) Definitions **********************/
/************************** Function Prototypes *******************************/
int IicSelfTestExample(u16 DeviceId);
/************************** Variable Definitions ******************************/
/*
* The following are declared globally so they are zeroed and so they are
* easily accessible from a debugger.
*/
XIic Iic; /* The driver instance for IIC Device */
u8 EepromIicAddr; /* Variable for storing Eeprom IIC address */
typedef u8 AddressType;
/*
* The page size determines how much data should be written at a time.
* The ML310/ML300 board supports a page size of 32 and 16.
* The write function should be called with this as a maximum byte count.
*/
#define PAGE_SIZE 16
#define SEND_COUNT 3
#define RECEIVE_COUNT 1
#define IIC_ADV761x_98_ADDRESS 0x4C //0x98 //
#define IIC_ADV761x_44_ADDRESS 0x22 //0x44 //
#define IIC_ADV761x_64_ADDRESS 0x32 //0x64 //
#define IIC_ADV761x_68_ADDRESS 0x34 //0x68 //
#define IIC_ADV7511_ADDRESS 0x39 //0x72 //
#define IIC_SWITCH_ADDRESS 0x74 //0xE8
typedef u8 AddressType;
typedef struct {
u8 addr;
u8 data;
u8 init;
} HDMI_REG;
#define NUMBER_OF_HDMI_REGS 56
/*
* Write buffer for writing a page.
*/
u8 WriteBuffer[SEND_COUNT];
u8 ReadBuffer[RECEIVE_COUNT]; /* Read buffer for reading a page. */
volatile u8 TransmitComplete;
volatile u8 ReceiveComplete;
HDMI_REG hdmi_iic[NUMBER_OF_HDMI_REGS] = {
{ 0xD6, 0x00, 0xC0 },
{ 0x41, 0x00, 0x10 },
{ 0x98, 0x00, 0x03 },
{ 0x9A, 0x00, 0xE0 }, // 0xE0 ----- ***
{ 0x9C, 0x00, 0x30 },
{ 0x9D, 0x00, 0x61 },
{ 0xA2, 0x00, 0xA4 },
{ 0xA3, 0x00, 0xA4 },
{ 0xE0, 0x00, 0xD0 },
{ 0xF9, 0x00, 0x00 },
{ 0x15, 0x00, 0x00 }, //0x01
{ 0x16, 0x00, 0x30 }, //0xB9
{ 0x18, 0x00, 0x66 }, //0x66
{ 0xAF, 0x00, 0x06 }, // hdmi dvi mode (bit [1] 0= dvi, 1=hdmi)
{ 0x48, 0x00, 0x00 }, //08
{ 0xDE, 0x00, 0x18 }, //18
{ 0xBA, 0x00, 0x00 },
{ 0x56, 0x00, 0x10 },
{ 0x55, 0x00, 0x40 }
};
HDMI_REG hdmi_FMC_iic_98[NUMBER_OF_HDMI_REGS] = {
{ 0xFF, 0x00, 0x80 },
{ 0xF4, 0x00, 0x80 },
{ 0xF5, 0x00, 0x7C },
{ 0xF8, 0x00, 0x4C }, // 0xE0 ----- ***
{ 0xF9, 0x00, 0x64 },
{ 0xFA, 0x00, 0x6C },
{ 0xFB, 0x00, 0x68 },
{ 0xFD, 0x00, 0x44 }//,
// { 0x01, 0x00, 0x06 },
// { 0x02, 0x00, 0xF5 },
// { 0x03, 0x00, 0x40 }, //0x01
// { 0x05, 0x00, 0x28 }, //0xB9
// { 0x06, 0x00, 0xA6 }, //0x66
// { 0x0B, 0x00, 0x44 }, // hdmi dvi mode (bit [1] 0= dvi, 1=hdmi)
// { 0x0C, 0x00, 0x42 }, //08
// { 0x14, 0x00, 0x7F }, //18
// { 0x15, 0x00, 0x80 },
// { 0x19, 0x00, 0x83 },
// { 0x33, 0x00, 0x40 }
};
HDMI_REG hdmi_FMC_iic_44[NUMBER_OF_HDMI_REGS] = {
{ 0xBA, 0x00, 0x01 }
};
HDMI_REG hdmi_FMC_iic_64[NUMBER_OF_HDMI_REGS] = {
{ 0x40, 0x00, 0x81 }
};
HDMI_REG hdmi_FMC_iic_68[NUMBER_OF_HDMI_REGS] = {
{ 0x9B, 0x00, 0x03 },
{ 0xC1, 0x00, 0x01 },
{ 0xC2, 0x00, 0x01 },
{ 0xC3, 0x00, 0x01 }, // 0xE0 ----- ***
{ 0xC4, 0x00, 0x01 },
{ 0xC5, 0x00, 0x01 },
{ 0xC6, 0x00, 0x01 },
{ 0xC7, 0x00, 0x01 },
{ 0xC8, 0x00, 0x01 },
{ 0xC9, 0x00, 0x01 },
{ 0xCA, 0x00, 0x01 }, //0x01
{ 0xCB, 0x00, 0x01 }, //0xB9
{ 0xCC, 0x00, 0x01 }, //0x66
{ 0x00, 0x00, 0x00 }, // hdmi dvi mode (bit [1] 0= dvi, 1=hdmi)
{ 0x83, 0x00, 0xFE }, //08
{ 0x6F, 0x00, 0x0C }, //18
{ 0x85, 0x00, 0x1F },
{ 0x87, 0x00, 0x70 },
{ 0x8D, 0x00, 0x04 },
{ 0x8E, 0x00, 0x1E },
{ 0x1A, 0x00, 0x8A },
{ 0x57, 0x00, 0xDA },
{ 0x58, 0x00, 0x01 },
{ 0x03, 0x00, 0x98 },
{ 0x75, 0x00, 0x10 }
};
/************************** Function Prototypes ******************************/
int IicLowLevelDynEeprom();
int IicLowLevelDynEeprom_hdmi_in();
u8 EepromReadByte(AddressType Address, u8 *BufferPtr, u8 ByteCount);
u8 EepromWriteByte(AddressType Address, u8 *BufferPtr, u8 ByteCount);
/************************** Variable Definitions *****************************/
typedef struct {
u16 horiz_lines;
u16 horiz_front_porch;
u16 horiz_back_porch;
u16 horiz_sync;
u16 vert_lines;
u16 vert_front_porch;
u16 vert_back_porch;
u16 vert_sync;
} VIDEO_CONFIG;
u8 DataBuf[PAGE_SIZE];
#define BUF_SIZE 40
u8 UpdateBuffer[sizeof(AddressType) + PAGE_SIZE];
/******************************************************************************/
/**
* Main function to call the example. This function is not included if the
* example is generated from the TestAppGen test tool.
*
* @param None.
*
* @return XST_SUCCESS if successful, XST_FAILURE if unsuccessful.
*
* @note None.
*
******************************************************************************/
//#ifndef TESTAPP_GEN
//int main(void)
//{
// int Status;
//
// /*
// * Run the example, specify the device ID that is generated in
// * xparameters.h.
// */
// Status = IicSelfTestExample(IIC_DEVICE_ID);
// if (Status != XST_SUCCESS) {
// return XST_FAILURE;
// }
//
// return XST_SUCCESS;
//
//}
//#endif
//
/*****************************************************************************/
/****************************this works for ADV7511 ******************************/
int IicLowLevelDynEeprom() {
u8 BytesRead;
u8 BytesWritten;
u32 StatusReg;
u8 Index;
int i;
int Status;
/*
* Initialize the IIC Core.
*/
Status = XIic_DynInit(IIC_BASE_ADDRESS);
if (Status != XST_SUCCESS) {
return XST_FAILURE;
}
/*
* Make sure all the Fifo's are cleared and Bus is Not busy.
*/
while (((StatusReg = XIic_ReadReg(IIC_BASE_ADDRESS, XIIC_SR_REG_OFFSET))
& (XIIC_SR_RX_FIFO_EMPTY_MASK | XIIC_SR_TX_FIFO_EMPTY_MASK
| XIIC_SR_BUS_BUSY_MASK))
!= (XIIC_SR_RX_FIFO_EMPTY_MASK | XIIC_SR_TX_FIFO_EMPTY_MASK)) {
}
/*
* Initialize the data to written and the read buffer.
*/
for (Index = 0; Index < PAGE_SIZE; Index++) {
WriteBuffer[Index] = Index;
ReadBuffer[Index] = 0;
DataBuf[Index] = 0;
}
/*
* Write to the IIC SWITCH.
*/
EepromIicAddr = IIC_SWITCH_ADDRESS; // Alternate use of Write routine
WriteBuffer[0] = 0x02;
BytesWritten = EepromWriteByte(0x02, &DataBuf[0], 0);
/*
* Write Initialization Sequence to ADV7511.
*/
EepromIicAddr = IIC_ADV7511_ADDRESS;
for (Index = 0; Index < NUMBER_OF_HDMI_REGS; Index++) {
BytesWritten = EepromWriteByte(hdmi_iic[Index].addr,
&hdmi_iic[Index].init, 1);
for (i = 0; i < 50000; i++)
;
/* xil_printf("\r\n||Read register from ADV7511 :-------------|| Register : %X ||------", hdmi_iic[Index].addr);
BytesRead = EepromReadByte(hdmi_iic[Index].addr,
&hdmi_iic[Index].init, 1);
*/
}
return XST_SUCCESS;
}
/****************************This is not working for ADV7611 ******************************/
int IicLowLevelDynEeprom_hdmi_in() {
u8 BytesRead;
u8 BytesWritten;
u32 StatusReg;
u8 Index;
int i;
int Status;
/*
* Initialize the IIC Core.
*/
Status = XIic_DynInit(IIC_BASE_ADDRESS_hdmi_in);
if (Status != XST_SUCCESS) {
return XST_FAILURE;
}
/*
* Make sure all the Fifo's are cleared and Bus is Not busy.
*/
while (((StatusReg = XIic_ReadReg(IIC_BASE_ADDRESS_hdmi_in, XIIC_SR_REG_OFFSET))
& (XIIC_SR_RX_FIFO_EMPTY_MASK | XIIC_SR_TX_FIFO_EMPTY_MASK
| XIIC_SR_BUS_BUSY_MASK))
!= (XIIC_SR_RX_FIFO_EMPTY_MASK | XIIC_SR_TX_FIFO_EMPTY_MASK)) {
}
/*
* Initialize the data to written and the read buffer.
*/
for (Index = 0; Index < PAGE_SIZE; Index++) {
WriteBuffer[Index] = Index;
ReadBuffer[Index] = 0;
DataBuf[Index] = 0;
}
/****************************Start for input HDMI conf adv7611 ******************************/
/*
* Write Initialization Sequence to ADV761x.
*/
EepromIicAddr = IIC_ADV761x_98_ADDRESS;
for (Index = 0; Index < NUMBER_OF_HDMI_REGS; Index++) {
BytesWritten = EepromWriteByte(hdmi_FMC_iic_98[Index].addr,
&hdmi_FMC_iic_98[Index].init, 1);
for (i = 0; i < 50000; i++)
;
}
EepromIicAddr = IIC_ADV761x_44_ADDRESS;
for (Index = 0; Index < NUMBER_OF_HDMI_REGS; Index++) {
BytesWritten = EepromWriteByte(hdmi_FMC_iic_44[Index].addr,
&hdmi_FMC_iic_44[Index].init, 1);
for (i = 0; i < 50000; i++)
;
}
EepromIicAddr = IIC_ADV761x_64_ADDRESS;
for (Index = 0; Index < NUMBER_OF_HDMI_REGS; Index++) {
BytesWritten = EepromWriteByte(hdmi_FMC_iic_64[Index].addr,
&hdmi_FMC_iic_64[Index].init, 1);
for (i = 0; i < 50000; i++)000000
;
}
EepromIicAddr = IIC_ADV761x_68_ADDRESS;
for (Index = 0; Index < NUMBER_OF_HDMI_REGS; Index++) {
BytesWritten = EepromWriteByte(hdmi_FMC_iic_68[Index].addr,
&hdmi_FMC_iic_68[Index].init, 1);
for (i = 0; i < 50000; i++)
;
}
/****************************End for input HDMI conf adv7611 ******************************/
return XST_SUCCESS;
}
/*****************************************************************************/
/**
* This function writes a buffer of data to IIC Slave.
*
* @param ByteCount contains the number of bytes in the buffer to be
* written.
*
* @return XST_SUCCESS if successful else XST_FAILURE.
*
* @note None.
*
******************************************************************************/
static int WriteData(u16 ByteCount) {
int Status;
int BusBusy;
/*
* Set the defaults.
*/
TransmitComplete = 1;
/*
* Start the IIC device.
*/
Status = XIic_Start(&Iic);
if (Status != XST_SUCCESS) {
return XST_FAILURE;
}
/*
* Set the Repeated Start option.
*/
Iic.Options = XII_REPEATED_START_OPTION;
/*
* Send the data.
*/
Status = XIic_MasterSend(&Iic, WriteBuffer, ByteCount);
if (Status != XST_SUCCESS) {
return XST_FAILURE;
}
/*
* Wait till data is transmitted.
*/
while (TransmitComplete) {
}
/*
* This is for verification that Bus is not released and still Busy.
*/
BusBusy = XIic_IsIicBusy(&Iic);
TransmitComplete = 1;
Iic.Options = 0x0;
/*
* Send the Data.
*/
Status = XIic_MasterSend(&Iic, WriteBuffer, ByteCount);
if (Status != XST_SUCCESS) {
return XST_FAILURE;
}
/*
* Wait till data is transmitted.
*/
while ((TransmitComplete) || (XIic_IsIicBusy(&Iic) == TRUE)) {
}
/*
* Stop the IIC device.
*/
Status = XIic_Stop(&Iic);
if (Status != XST_SUCCESS) {
return XST_FAILURE;
}
return XST_SUCCESS;
}
/*****************************************************************************/
/**
* This function reads a data from the IIC Slave into a specified buffer.
*
* @param BufferPtr contains the address of the data buffer to be filled.
* @param ByteCount contains the number of bytes to be read.
*
* @return XST_SUCCESS if successful else XST_FAILURE.
*
* @note None.
*
******************************************************************************/
static int ReadData(u8 *BufferPtr, u16 ByteCount) {
int Status;
int BusBusy;
/*
* Set the defaults.
*/
ReceiveComplete = 1;
/*
* Start the IIC device.
*/
Status = XIic_Start(&Iic);
if (Status != XST_SUCCESS) {
return XST_FAILURE;
}
/*
* Set the Repeated Start option.
*/
Iic.Options = XII_REPEATED_START_OPTION;
/*
* Receive the data.
*/
Status = XIic_MasterRecv(&Iic, BufferPtr, ByteCount);
if (Status != XST_SUCCESS) {
return XST_FAILURE;
}
/*
* Wait till all the data is received.
*/
while (ReceiveComplete) {
}
/*
* This is for verification that Bus is not released and still Busy.
*/
BusBusy = XIic_IsIicBusy(&Iic);
ReceiveComplete = 1;
Iic.Options = 0x0;
/*
* Receive the Data.
*/
Status = XIic_MasterRecv(&Iic, BufferPtr, ByteCount);
if (Status != XST_SUCCESS) {
return XST_FAILURE;
}
/*
* Wait till all the data is received.
*/
while ((ReceiveComplete) || (XIic_IsIicBusy(&Iic) == TRUE)) {
}
/*
* Stop the IIC device.
*/
Status = XIic_Stop(&Iic);
if (Status != XST_SUCCESS) {
return XST_FAILURE;
}
return XST_SUCCESS;
}
/*****************************************************************************/
/**
* This function writes a buffer of bytes to the IIC serial EEPROM.
*
* @param BufferPtr contains the address of the data to write.
* @param ByteCount contains the number of bytes in the buffer to be
* written. Note that this should not exceed the page size of the
* EEPROM as noted by the constant PAGE_SIZE.
*
* @return The number of bytes written, a value less than that which was
* specified as an input indicates an error.
*
* @note one.
*
******************************************************************************/
Xuint8 EepromWriteByte(AddressType Address, Xuint8 *BufferPtr, Xuint8 ByteCount) {
u8 SentByteCount;
u8 WriteBuffer[sizeof(Address) + PAGE_SIZE];
u8 Index;
/*
* A temporary write buffer must be used which contains both the address
* and the data to be written, put the address in first based upon the
* size of the address for the EEPROM
*/
if (sizeof(AddressType) == 2) {
WriteBuffer[0] = (u8) (Address >> 8);
WriteBuffer[1] = (u8) (Address);
} else if (sizeof(AddressType) == 1) {
WriteBuffer[0] = (u8) (Address);
EepromIicAddr |= (EEPROM_TEST_START_ADDRESS >> 8) & 0x7;
}
/*
* Put the data in the write buffer following the address.
*/
for (Index = 0; Index < ByteCount; Index++) {
WriteBuffer[sizeof(Address) + Index] = BufferPtr[Index];
}
/*
* Write a page of data at the specified address to the EEPROM.
*/
SentByteCount = XIic_DynSend(IIC_BASE_ADDRESS, EepromIicAddr, WriteBuffer,
sizeof(Address) + ByteCount, XIIC_STOP);
/*
* Return the number of bytes written to the EEPROM.
*/
return SentByteCount - sizeof(Address);
}
/******************************************************************************
*
* This function reads a number of bytes from the IIC serial EEPROM into a
* specified buffer.
*
* @param BufferPtr contains the address of the data buffer to be filled.
* @param ByteCount contains the number of bytes in the buffer to be read.
* This value is constrained by the page size of the device such
* that up to 64K may be read in one call.
*
* @return The number of bytes read. A value less than the specified input
* value indicates an error.
*
* @note None.
*
******************************************************************************/
Xuint8 EepromReadByte(AddressType Address, Xuint8 *BufferPtr, Xuint8 ByteCount) {
u8 ReceivedByteCount;
u8 SentByteCount;
u16 StatusReg;
/*
* Position the Read pointer to specific location in the EEPROM.
*/
do {
StatusReg = XIic_ReadReg(IIC_BASE_ADDRESS, XIIC_SR_REG_OFFSET);
if (!(StatusReg & XIIC_SR_BUS_BUSY_MASK)) {
SentByteCount = XIic_DynSend(IIC_BASE_ADDRESS, EepromIicAddr,
(u8 *) &Address, sizeof(Address), XIIC_REPEATED_START);
}
} while (SentByteCount != sizeof(Address));
/*
* Receive the data.
*/
ReceivedByteCount = XIic_DynRecv(IIC_BASE_ADDRESS, EepromIicAddr, BufferPtr,
ByteCount);
/*
* Return the number of bytes received from the EEPROM.
*/
return ReceivedByteCount;
}
/**
*
* This function does a selftest on the IIC device and XIic driver as an
* example.
*
* @param DeviceId is the XPAR__DEVICE_ID value from
* xparameters.h.
*
* @return XST_SUCCESS if successful, XST_FAILURE if unsuccessful.
*
* @note None.
*
****************************************************************************/
int IicSelfTestExample(u16 DeviceId) {
int Status;
XIic_Config *ConfigPtr; /* Pointer to configuration data */
/*
* Initialize the IIC driver so that it is ready to use.
*/
ConfigPtr = XIic_LookupConfig(DeviceId);
if (ConfigPtr == NULL) {
return XST_FAILURE;
}
Status = XIic_CfgInitialize(&Iic, ConfigPtr, ConfigPtr->BaseAddress);
if (Status != XST_SUCCESS) {
return XST_FAILURE;
}
/*
* Perform a self-test to ensure that the hardware was built
* correctly.
*/
Status = XIic_SelfTest(&Iic);
if (Status != XST_SUCCESS) {
return XST_FAILURE;
}
return XST_SUCCESS;
}
int ConfigEepromIic(u16 DeviceId) {
int Status;
XIic_Config *ConfigPtr; /* Pointer to configuration data */
/*
* Initialize the IIC driver so that it is ready to use.
*/
ConfigPtr = XIic_LookupConfig(DeviceId);
if (ConfigPtr == NULL) {
return XST_FAILURE;
}
Status = XIic_CfgInitialize(&Iic, ConfigPtr, ConfigPtr->BaseAddress);
if (Status != XST_SUCCESS) {
return XST_FAILURE;
}
/*
* Perform a self-test to ensure that the hardware was built
* correctly.
*/
Status = XIic_SelfTest(&Iic);
if (Status != XST_SUCCESS) {
return XST_FAILURE;
}
/*
*Check if the IIC is configured as slave or master.
*
*/
Status = XIic_IsSlave(&Iic);
if (Status == 0) {
xil_printf("\r\n||IIC is configured as master || ");
} else if (Status == 1) {
xil_printf("\r\n||IIC is configured as slave ||");
}
/*
*
* Now configure the ADV7511 which is a slave of the IIC
*/
{
//EepromIicAddr = 0x720019;//0x41600108; //0x8b;
IicLowLevelDynEeprom();
if (Status != XST_SUCCESS) {
return XST_FAILURE;
}
}
return XST_SUCCESS;
}
int ConfigEepromIic_hdmi_in(u16 DeviceId) {
int Status;
XIic_Config *ConfigPtr; /* Pointer to configuration data */
/*
* Initialize the IIC driver so that it is ready to use.
*/
ConfigPtr = XIic_LookupConfig(DeviceId);
if (ConfigPtr == NULL) {
return XST_FAILURE;
}
Status = XIic_CfgInitialize(&Iic, ConfigPtr, ConfigPtr->BaseAddress);
if (Status != XST_SUCCESS) {
return XST_FAILURE;
}
/*
* Perform a self-test to ensure that the hardware was built
* correctly.
*/
Status = XIic_SelfTest(&Iic);
if (Status != XST_SUCCESS) {
return XST_FAILURE;
}
/*
*Check if the IIC is configured as slave or master.
*
*/
Status = XIic_IsSlave(&Iic);
if (Status == 0) {
xil_printf("\r\n||IIC is configured as master || ");
} else if (Status == 1) {
xil_printf("\r\n||IIC is configured as slave ||");
}
/*
*
* Now configure the ADV7611
*/
{
//EepromIicAddr = 0x720019;//0x41600108; //0x8b;
IicLowLevelDynEeprom_hdmi_in();
if (Status != XST_SUCCESS) {
return XST_FAILURE;
}
}
return XST_SUCCESS;
}