zephyr,fake-leds
Description
This binding provides a fake LED controller for use as either a stub or a mock in Zephyr
testing.
Examples
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 = <LED_COLOR_ID_RED>;
};
fake_green_led: fake-green-led {
label = "Fake Green LED";
color-mapping = <LED_COLOR_ID_GREEN>;
};
fake_blue_led: fake-blue-led {
label = "Fake Blue LED";
color-mapping = <LED_COLOR_ID_BLUE>;
};
fake_rgb_led: fake-rgb-led {
label = "Fake RGB LED";
color-mapping = <LED_COLOR_ID_RED>,
<LED_COLOR_ID_GREEN>,
<LED_COLOR_ID_BLUE>;
};
};
Properties
Top level properties
No top-level properties.
Child node properties
Name |
Type |
Details |
|---|---|---|
|
|
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.
|
|
|
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 Important properties for more information. |
|
|
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 =
<LED_COLOR_ID_RED>,
<LED_COLOR_ID_GREEN>,
<LED_COLOR_ID_BLUE>;
|