zephyr/samples/drivers/led_pwm
Andrei-Edward Popa ea82845f1b samples: led_pwm: added overlay for the esp32 board
added pwm leds in board overlay file,
added configs in board conf file

Signed-off-by: Andrei-Edward Popa <andrei_edward.popa@upb.ro>
2021-11-07 05:36:42 -05:00
..
boards samples: led_pwm: added overlay for the esp32 board 2021-11-07 05:36:42 -05:00
src tests: pwm: led: Fix pwm_led sample 2021-05-25 08:07:25 -04:00
CMakeLists.txt cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
README.rst samples/drivers: led_pwm: Fixes for device testing 2021-01-18 19:11:43 +01:00
prj.conf
sample.yaml tests: pwm: led: Fix pwm_led sample 2021-05-25 08:07:25 -04:00

README.rst

.. _led_pwm:

LED PWM sample application
##########################

Overview
********

This sample allows to test the led-pwm driver. The first "pwm-leds" compatible
device instance found in DT is used. For each LEDs attached to this device
(child nodes) the same test pattern (described below) is executed. The LED API
functions are used to control the LEDs.

Test pattern
============

For each PWM LEDs (one after the other):

- Turning on
- Turning off
- Increasing brightness gradually
- Blinking on: 0.1 sec, off: 0.1 sec
- Blinking on: 1 sec, off: 1 sec
- Turning off

Building and Running
********************

This sample can be built and executed on all the boards with PWM LEDs connected.
The LEDs must be correctly described in the DTS: the compatible property of the
device node must match "pwm-leds". And for each LED, a child node must be
defined and the PWM configuration must be provided through a "pwms" phandle's
node.