:orphan:
.. raw:: html
.. dtcompatible:: zephyr,fake-leds
.. _dtbinding_zephyr_fake_leds:
zephyr,fake-leds
################
.. sidebar:: Overview
:Name: ``zephyr,fake-leds``
:Vendor: :ref:`Zephyr Project `
:Used in: :zephyr:board-catalog:`List of boards <#compatibles=zephyr,fake-leds>` using
this compatible
:Driver: :zephyr_file:`drivers/led/led_fake.c`
Description
***********
.. code-block:: none
This binding provides a fake LED controller for use as either a stub or a mock in Zephyr
testing.
Examples
********
.. code-block:: dts
fake_leds: fake-leds {
compatible = "zephyr,fake-leds";
fake_led: fake-led {
label = "Fake LED";
};
fake_red_led: fake-red-led {
label = "Fake Red LED";
color-mapping = ;
};
fake_green_led: fake-green-led {
label = "Fake Green LED";
color-mapping = ;
};
fake_blue_led: fake-blue-led {
label = "Fake Blue LED";
color-mapping = ;
};
fake_rgb_led: fake-rgb-led {
label = "Fake RGB LED";
color-mapping = ,
,
;
};
};
Properties
**********
Top level properties
====================
No top-level properties.
Child node properties
=====================
.. list-table::
:widths: 1 1 4
:header-rows: 1
* - Name
- Type
- Details
* - ``index``
- ``int``
- .. code-block:: none
Index of the LED on a controller. It can be used by drivers or
applications to map a logical LED to its real position on the
controller. For example, this allows to handle boards where the
LEDs in an array/strip are not wired following the LED order of
the controller.
* - ``label``
- ``string``
- .. code-block:: none
Human readable string describing the LED. It can be used by an
application to identify this LED or to retrieve its number/index
(i.e. child node number) on the parent device.
See :ref:`zephyr:dt-important-props` for more information.
* - ``color-mapping``
- ``array``
- .. code-block:: none
Channel to color mapping of a multicolor LED. If a LED supports
several colors, then the color-mapping property can be used to
describe how the hardware channels and the colors are mapped.
For example the channel to color mapping of RGB LEDs would be
color-mapping =
,
,
;