Lines Matching +full:led +full:- +full:strips

5  * SPDX-License-Identifier: Apache-2.0
10 * @brief Public API for controlling linear strips of LEDs.
13 * addressable strips of LEDs.
20 * @brief LED Strip Interface
21 * @defgroup led_strip_interface LED Strip Interface
35 * @brief Color value for a single RGB LED.
37 * Individual strip drivers may ignore lower-order bits if their
58 * @brief Callback API for updating an RGB LED strip
78 * @brief Callback API for getting length of an LED strip.
85 * @brief LED strip driver API
87 * This is the mandatory API any LED strip driver needs to expose.
96 * @brief Mandatory function to update an LED strip with the given RGB array.
98 * @param dev LED strip device.
103 * @retval -errno negative errno code on failure.
112 (const struct led_strip_driver_api *)dev->api; in led_strip_update_rgb()
114 /* Allow for out-of-tree drivers that do not have this function for 2 Zephyr releases in led_strip_update_rgb()
117 if (api->length != NULL) { in led_strip_update_rgb()
119 if (api->length(dev) < num_pixels) { in led_strip_update_rgb()
120 return -ERANGE; in led_strip_update_rgb()
124 return api->update_rgb(dev, pixels, num_pixels); in led_strip_update_rgb()
128 * @brief Optional function to update an LED strip with the given channel array
130 * channel or LED. Channels are updated linearly in strip order.
132 * @param dev LED strip device.
133 * @param channels Array of per-channel data.
137 * @retval -ENOSYS if not implemented.
138 * @retval -errno negative errno code on other failure.
147 (const struct led_strip_driver_api *)dev->api; in led_strip_update_channels()
149 if (api->update_channels == NULL) { in led_strip_update_channels()
150 return -ENOSYS; in led_strip_update_channels()
153 return api->update_channels(dev, channels, num_channels); in led_strip_update_channels()
157 * @brief Mandatory function to get chain length (in pixels) of an LED strip device.
159 * @param dev LED strip device.
161 * @retval Length of LED strip device.
166 (const struct led_strip_driver_api *)dev->api; in led_strip_length()
168 return api->length(dev); in led_strip_length()