The EVK1100 provides three push buttons to design Human to Machine Interface for software developments.
The push buttons inputs are low level active1. The pinout is as follows:
Push Button | GPIO Name | Alternate function used |
---|---|---|
PB0 | PX 16 | |
PB1 | PX 19 | |
PB2 | PX 22 |
In order to use a push button, two ways are available:
Polling on the GPIO Port Value Register
Using GPIO interrupts to get state changes
Using GPIO interrupt needs to:
Register an interrupt handler for the input
Set the GPIO control bit for the input
Set the GPIO glitch filter bit for the input
Configure the GPIO interrupt mask bit for the input to act either on rising edge, falling edge or input change
Set the GPIO interrupt enable bit for the input