Blinky Example

Demonstrates using a periodic event to toggle LEDs.

API Features Demonstrated

Platforms

This app works on:

Requirements and Prerequisites

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

Description

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

Implementation

gos_gpio_init

The app initializes the two platform GPIOs.

gos_event_register_periodic registers blink_event_handler to run every 500ms.

blink_event_handler

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

Source Code

See: