Lines Matching full:led

9  * @brief Public LED driver APIs
16 * @brief LED Interface
17 * @defgroup led_interface LED Interface
34 * @brief LED information structure
36 * This structure gathers useful information about LED controller.
39 /** LED label */
41 /** Index of the LED on the controller */
43 /** Number of colors per LED */
45 /** Mapping of the LED colors */
51 * @brief Callback API for blinking an LED
55 typedef int (*led_api_blink)(const struct device *dev, uint32_t led,
60 * @brief Optional API callback to get LED information
64 typedef int (*led_api_get_info)(const struct device *dev, uint32_t led,
69 * @brief Callback API for setting brightness of an LED
73 typedef int (*led_api_set_brightness)(const struct device *dev, uint32_t led,
77 * @brief Optional API callback to set the colors of a LED.
81 typedef int (*led_api_set_color)(const struct device *dev, uint32_t led,
86 * @brief Callback API for turning on an LED
90 typedef int (*led_api_on)(const struct device *dev, uint32_t led);
94 * @brief Callback API for turning off an LED
98 typedef int (*led_api_off)(const struct device *dev, uint32_t led);
102 * @brief Callback API for writing a strip of LED channels
112 * @brief LED driver API
127 * @brief Blink an LED
129 * This optional routine starts blinking a LED forever with the given time
132 * @param dev LED device
133 * @param led LED number
134 * @param delay_on Time period (in milliseconds) an LED should be ON
135 * @param delay_off Time period (in milliseconds) an LED should be OFF
138 __syscall int led_blink(const struct device *dev, uint32_t led,
141 static inline int z_impl_led_blink(const struct device *dev, uint32_t led, in z_impl_led_blink() argument
150 return api->blink(dev, led, delay_on, delay_off); in z_impl_led_blink()
154 * @brief Get LED information
156 * This optional routine provides information about a LED.
158 * @param dev LED device
159 * @param led LED number
160 * @param info Pointer to a pointer filled with LED information
163 __syscall int led_get_info(const struct device *dev, uint32_t led,
166 static inline int z_impl_led_get_info(const struct device *dev, uint32_t led, in z_impl_led_get_info() argument
176 return api->get_info(dev, led, info); in z_impl_led_get_info()
180 * @brief Set LED brightness
182 * This optional routine sets the brightness of a LED to the given value.
186 * These should simply turn the LED on if @p value is nonzero, and off
189 * @param dev LED device
190 * @param led LED number
194 __syscall int led_set_brightness(const struct device *dev, uint32_t led,
198 uint32_t led, in z_impl_led_set_brightness() argument
207 return api->set_brightness(dev, led, value); in z_impl_led_set_brightness()
211 * @brief Write/update a strip of LED channels
213 * This optional routine writes a strip of LED channels to the given array of
218 * @param dev LED device
219 * @param start_channel Absolute number (i.e. not relative to a LED) of the
244 * @brief Set a single LED channel
246 * This optional routine sets a single LED channel to the given value.
250 * @param dev LED device
251 * @param channel Absolute channel number (i.e. not relative to a LED)
265 * @brief Set LED color
267 * This routine configures all the color channels of a LED with the given
272 * @param dev LED device
273 * @param led LED number
276 * mapping of the LED controller. See the color_mapping member
280 __syscall int led_set_color(const struct device *dev, uint32_t led,
283 static inline int z_impl_led_set_color(const struct device *dev, uint32_t led, in z_impl_led_set_color() argument
292 return api->set_color(dev, led, num_colors, color); in z_impl_led_set_color()
296 * @brief Turn on an LED
298 * This routine turns on an LED
300 * @param dev LED device
301 * @param led LED number
304 __syscall int led_on(const struct device *dev, uint32_t led);
306 static inline int z_impl_led_on(const struct device *dev, uint32_t led) in z_impl_led_on() argument
311 return api->on(dev, led); in z_impl_led_on()
315 * @brief Turn off an LED
317 * This routine turns off an LED
319 * @param dev LED device
320 * @param led LED number
323 __syscall int led_off(const struct device *dev, uint32_t led);
325 static inline int z_impl_led_off(const struct device *dev, uint32_t led) in z_impl_led_off() argument
330 return api->off(dev, led); in z_impl_led_off()
334 * LED DT helpers.
338 * @brief Container for an LED information specified in devicetree.
340 * This type contains a pointer to and LED device and an LED index.
346 /** LED device instance. */
348 /** Index of the LED on the controller. */
353 * @brief Set LED brightness from a led_dt_spec.
355 * @param spec LED device specification from devicetree.
368 * @brief Turn on an LED from a struct led_dt_spec.
370 * @param spec LED device specification from devicetree.
381 * @brief Turn off an LED from a struct led_dt_spec.
383 * @param spec LED device specification from devicetree.
394 * @brief Validate that the LED device is ready.
396 * @param spec LED specification from devicetree.
398 * @retval true If the LED device is ready for use.
399 * @retval false If the LED device is not ready for use.
470 #include <zephyr/syscalls/led.h>