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 <navam@xilinx.com> Reviewed-by: Harini Katakam <harinik@xilinx.com>
This commit is contained in:
parent
709f03aed0
commit
fc2ea039d9
1 changed files with 7 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue