Basic GPIO Example

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

API Features Demonstrated

Platforms

This app works on:

Requirements and Prerequisites

Requires a Gecko OS evaluation board, such as a WGM160P_eval.

Description

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 Gecko OS features used in this app.

Source

See: