From fc2ea039d92d020b6d6503f72c8dbb2159140fa7 Mon Sep 17 00:00:00 2001 From: Nava kishore Manne Date: Thu, 29 Oct 2015 17:27:42 +0530 Subject: [PATCH] iicps: Select interrupt ID in example based on instance present To allow for automatic testing, select IIC_INTR_ID based on the PSU_<> present. Left initial definition intact for Zynq. Signed-off-by: Nava kishore Manne Reviewed-by: Harini Katakam --- .../drivers/iicps/examples/xiicps_eeprom_intr_example.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/XilinxProcessorIPLib/drivers/iicps/examples/xiicps_eeprom_intr_example.c b/XilinxProcessorIPLib/drivers/iicps/examples/xiicps_eeprom_intr_example.c index 7ed2769e..b9cedd53 100644 --- a/XilinxProcessorIPLib/drivers/iicps/examples/xiicps_eeprom_intr_example.c +++ b/XilinxProcessorIPLib/drivers/iicps/examples/xiicps_eeprom_intr_example.c @@ -90,6 +90,13 @@ #define INTC_DEVICE_ID XPAR_SCUGIC_SINGLE_DEVICE_ID #define IIC_INTR_ID XPAR_XIICPS_0_INTR +#ifdef XPAR_PSU_I2C_1_DEVICE_ID +#define IIC_INTR_ID XPAR_XIICPS_1_INTR +#endif +#ifdef XPAR_PSU_I2C_0_DEVICE_ID +#define IIC_INTR_ID XPAR_XIICPS_0_INTR +#endif + /* * The following constant defines the address of the IIC Slave device on the * IIC bus. Note that since the address is only 7 bits, this constant is the