|
Zephyr API Documentation 4.4.0-rc1
A Scalable Open Source RTOS
|
Interfaces for LED strips. More...
Topics | |
| Device-specific LED Strip API extensions | |
| LED Strip Driver Backend API | |
Files | |
| file | led_strip.h |
| Main header file for LED strip driver API. | |
Data Structures | |
| struct | led_rgb |
| Color value for a single RGB LED. More... | |
Functions | |
| static int | led_strip_update_rgb (const struct device *dev, struct led_rgb *pixels, size_t num_pixels) |
| Update an LED strip with the given RGB array. | |
| static int | led_strip_update_channels (const struct device *dev, uint8_t *channels, size_t num_channels) |
| Update an LED strip with the given channel array. | |
| static size_t | led_strip_length (const struct device *dev) |
| Get chain length (in pixels) of an LED strip device. | |
Interfaces for LED strips.
#include <zephyr/drivers/led_strip.h>
Get chain length (in pixels) of an LED strip device.
| dev | LED strip device. |
|
inlinestatic |
#include <zephyr/drivers/led_strip.h>
Update an LED strip with the given channel array.
Each channel byte corresponds to an individually addressable color channel or LED. Channels are updated linearly in strip order.
| dev | LED strip device. |
| channels | Array of per-channel data. |
| num_channels | Length of channels array. |
| 0 | on success. |
| -ENOSYS | if not implemented. |
| -errno | negative errno code on other failure. |
|
inlinestatic |
#include <zephyr/drivers/led_strip.h>
Update an LED strip with the given RGB array.
| dev | LED strip device. |
| pixels | Array of pixel data. |
| num_pixels | Length of pixels array. |
| 0 | on success. |
| -errno | negative errno code on failure. |