gpiops
Xilinx SDK Drivers API Documentation
xgpiops_intr_example.c File Reference

Overview

This file contains a design example using the GPIO driver (XGpioPs) in an interrupt driven mode of operation.

The example uses the interrupt capability of the GPIO to detect push button events and set the output LEDs based on the input.

Note
This example assumes that there is a Uart device in the HW design. This example is to provide support only for zcu102 on ZynqMp Platform and only for zc702 on Zynq Platform. For ZynqMP Platform, Input pin is 22(sw19 on zcu102 board) and Output Pin is 23(DS50 on zcu102 board). For Zynq Platform, Input Pins are 12(sw14 on zc702 board), 14(sw13 on zc702 board) and Output Pin is 10(DS23 on zc702 board). SW15 on zc702 board is a combination of sw13 and sw14. To operate either of the input pins, keep SW15 low(both should be 00).
  MODIFICATION HISTORY:
  Ver   Who  Date     Changes

1.00a sv 01/18/10 First Release 3.3 ms 04/17/17 Added notes about gpio input and output pin description for zcu102 and zc702 boards, configured Interrupt pin to input pin for proper working of interrupt example. *

Functions

int main (void)
 Main function that invokes the GPIO Interrupt example. More...
 

Function Documentation

◆ main()

int main ( void  )

Main function that invokes the GPIO Interrupt example.

Parameters
None.
Returns
  • XST_SUCCESS if the example has completed successfully.
  • XST_FAILURE if the example has failed.
Note
None.