LED_Pushbuttons application program
Starting Xilinx SDK
--> xsdk &
Re-generate BSP sources
After we have modified our hardware design and added the interrupt logic we need to re-generate the Board Support Package to incorporate support for interrupts. Open the system.mss file, if not already opened and click Re-generate BSP Sources.
Create a new application program
We will keep the LED_Dimmer application as is and create a new application called LED_Pushbuttons.
Writing the program
We will use the LED_Dimmer c-program as a starting point and add support for push buttons and add an Interrupt Service Routine (ISR).
Not reinventing the wheel
Let's find some good examples that can help us implement the interrupt handling in our application. Open system.mss and click on examples for the axi_gpio_0 peripheral.
We will take a closer look at the xgpio_intr_example.c file.
This is what I came up with. Take a look. Let's compile and run the program. See part 19 for more information.
Here is the result.
Top Previous Next