Device ID of GPIO

Mar 03, 2006 3 Replies

Hi, there



I want to use GPIO to control the LED. Before that, I need to use XStatus XGpio_Initialize(XGpio *InstancePtr, Xuint16 DeviceId); to instiantiate a GPIO object.



Here, I use a "LEDs_4Bit" IP but I don't know what's the DeviceId for it. Could anybody tell me what's the Device Id, and where could I find it?



Thank you for the help Roger



Hi, there

I want to use GPIO to control the LEDs. Before that, I need to use XStatus XGpio_Initialize(XGpio *InstancePtr, Xuint16 DeviceId); to instiantiate a GPIO object.

Here, I use a "LEDs_4Bit" IP but I don't know what's the DeviceId for it. Could anybody tell me what's the Device Id, and where could I find it?

Thank you for the help Roger

Hi, there

I want to use GPIO to control the LEDs. Before that, I need to use XStatus XGpio_Initialize(XGpio *InstancePtr, Xuint16 DeviceId); to instiantiate a GPIO object.

Here, I use a "LEDs_4Bit" IP but I don't know what's the DeviceId for it. Could anybody tell me what's the Device Id, and where could I find it?

Thank you for the help Roger

This ID can be found in the xparameters.h file which is automatically generated by the EDK. If you have, for example, the following block in the .mhs file:

BEGIN opb_gpio PARAMETER INSTANCE = opb_dbg_leds PARAMETER HW_VER = 3.01.a PARAMETER C_GPIO_WIDTH = 4 PARAMETER C_ALL_INPUTS = 0 PARAMETER C_BASEADDR = 0x80004200 PARAMETER C_HIGHADDR = 0x800043FF PORT GPIO_IO = dbg_leds BUS_INTERFACE SOPB = opb_bus END

Then the ID would be like: XPAR_OPB_DBG_LEDS_DEVICE_ID.

Frank

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required