Basic Button Example

Demonstrates using the ZentriOS button library to handle GPIO input.

API Features Demonstrated

Platforms

This app works on:

Requirements and Prerequisites

Requires a ZentriOS evaluation board.

Description

When a button on the evaluation board is pressed or released, the app writes a message to the ZentriOS 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 button_init apply the configuration to each button.

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

Source Code

See: