Blinky Example

Demonstrates using a periodic event to toggle LEDs.

API Features Demonstrated

Platforms

This app works on:

Requirements and Prerequisites

Requires a ZentriOS evaluation board.

Description

When the Zap is compiled and run, the two platform user LEDs blink alternately.

Implementation

zn_gpio_init

The app initializes the two platform GPIOs.

zn_event_register_periodic registers blink_event_handler to run every 500ms.

blink_event_handler

Uses zn_gpio_set to toggle one LED on and the other off.

Source Code

See: