Skip to content
Commit 6342eff5 authored by Fabio Baltieri's avatar Fabio Baltieri Committed by Anas Nashif
Browse files

led: add a struct led_dt_spec and some _dt wrapper APIs



Add a struct led_dt_spec to hold an LED device and index pointer, some
initializer and wrapper APIs.

This allows simpler LED usage, such as:

static const struct led_dt_spec led = LED_DT_SPEC_GET(DT_NODELABEL(led0));
led_on_dt(&led);
led_off_dt(&led);

Signed-off-by: default avatarFabio Baltieri <fabiobaltieri@google.com>
parent 0ea21291
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment