This example shows how to configure GPIO module to trigger an interrupt and an event.
The push button 0 is configured to trigger a GPIO interrupt when it is pressed. In the interrupt handler, the LED0 will be toggled every time.
The EXAMPLE_PIN_EVENT is configured to trigger a GPIO event when detecting a falling edge. Each time a new event is coming, it will trigger the PDCA to send a character to the USART without CPU usage.
This software is written for GNU GCC and IAR Embedded Workbench® for Atmel®. Other compilers may or may not work.
SAM4L device can be used.
This example has been tested with the following configuration:
For further information, visit Microchip.
Support and FAQ: https://www.microchip.com/support/