Basic GPIO Example

Demonstrates setting up IRQ callbacks to respond to GPIO inputs with GPIO outputs.

API Features Demonstrated


This app works on:

Requirements and Prerequisites

Requires a ZentriOS evaluation board, such as an AMW106 (Moray), with two buttons and two LEDs.


This is a simple app that demonstrates how to setup a GPIO interrupt to capture a button press event. Once the event is captured, a callback function is used to turn on (or off) an LED.

Two GPIOs and two LEDs are configured, with GPIO1 setup to control LED1 and GPIO2 setup to control LED2. Press Button 1, User LED 1 turns on. Press Button 2, User LED 2 turns on.

See the following links for additional information about the ZentriOS features used in this app.