How do I create push button interrupts on a Synergy kit?

Question:

How do I create interrupts for buttons on my Synergy Kit?

Answer:

It is easy to use push buttons to generate an interrupt on Synergy Kits.

First: Look at the schematic for the kit to determine which MCU pins are connected to the push button. Set these pins as inputs in the configurator. If you are using the BSP, these will probably already be configured correctly.

Next: In the configurator make sure they are enabled for IRQ. Now define a name for the callback function associated with the interrupt. Create a callback routine that responds to the push button interrupt. You may want to use a de-bouncing routine to eliminate follow-on interrupts caused by a switch bounce.