Basic Button Example

Demonstrates using the Gecko OS button library to handle GPIO input.

API Features Demonstrated

Platforms

This app works on:

Requirements and Prerequisites

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

Description

When a button on the evaluation board is pressed or released, the app writes a message to the Gecko OS log bus indicating which button was touched and what action took place.

Implementation

During app initialization, the app sets up button configuration which includes handlers for button events.

The calls to gos_button_init apply the configuration to each button.

Each handler sends a message appropriate to the action that invoked the handler.

Source Code

See: