Zephyr API Documentation
2.7.0-rc2
A Scalable Open Source RTOS
|
LED Strip Interface. More...
Data Structures | |
struct | led_rgb |
Color value for a single RGB LED. More... | |
struct | led_strip_driver_api |
LED strip driver API. More... | |
Typedefs | |
typedef int(* | led_api_update_rgb) (const struct device *dev, struct led_rgb *pixels, size_t num_pixels) |
Callback API for updating an RGB LED strip. More... | |
typedef int(* | led_api_update_channels) (const struct device *dev, uint8_t *channels, size_t num_channels) |
Callback API for updating channels without an RGB interpretation. More... | |
Functions | |
static int | led_strip_update_rgb (const struct device *dev, struct led_rgb *pixels, size_t num_pixels) |
Update an LED strip made of RGB pixels. More... | |
static int | led_strip_update_channels (const struct device *dev, uint8_t *channels, size_t num_channels) |
Update an LED strip on a per-channel basis. More... | |
LED Strip Interface.
led_api_update_channels |
#include <include/drivers/led_strip.h>
Callback API for updating channels without an RGB interpretation.
led_api_update_rgb |
#include <include/drivers/led_strip.h>
Callback API for updating an RGB LED strip.
|
inlinestatic |
#include <include/drivers/led_strip.h>
Update an LED strip on a per-channel basis.
Important: This routine may overwrite channels.
This routine immediately updates the strip display according to the given channels 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 |
|
inlinestatic |
#include <include/drivers/led_strip.h>
Update an LED strip made of RGB pixels.
Important: This routine may overwrite pixels.
This routine immediately updates the strip display according to the given pixels array.
dev | LED strip device |
pixels | Array of pixel data |
num_pixels | Length of pixels array |