README.rst
1.. _led_pwm:
2
3LED PWM sample application
4##########################
5
6Overview
7********
8
9This sample allows to test the led-pwm driver. The first "pwm-leds" compatible
10device instance found in DT is used. For each LEDs attached to this device
11(child nodes) the same test pattern (described below) is executed. The LED API
12functions are used to control the LEDs.
13
14Test pattern
15============
16
17For each PWM LEDs (one after the other):
18
19- Turning on
20- Turning off
21- Increasing brightness gradually
22- Blinking on: 0.1 sec, off: 0.1 sec
23- Blinking on: 1 sec, off: 1 sec
24- Turning off
25
26Building and Running
27********************
28
29This sample can be built and executed on all the boards with PWM LEDs connected.
30The LEDs must be correctly described in the DTS: the compatible property of the
31device node must match "pwm-leds". And for each LED, a child node must be
32defined and the PWM configuration must be provided through a "pwms" phandle's
33node.
34