Lines Matching refs:led
79 static int run_led_test(const struct device *lp50xx_dev, uint8_t led) in run_led_test() argument
85 LOG_INF("Testing LED %d (LED API)", led); in run_led_test()
87 err = led_get_info(lp50xx_dev, led, &info); in run_led_test()
89 LOG_ERR("Failed to get LED %d info", led); in run_led_test()
104 err = led_set_color(lp50xx_dev, led, 3, buf); in run_led_test()
107 "%02x:%02x:%02x, err=%d", led, in run_led_test()
114 err = led_on(lp50xx_dev, led); in run_led_test()
116 LOG_ERR("Failed to turn LED %d on, err=%d", led, err); in run_led_test()
122 err = led_off(lp50xx_dev, led); in run_led_test()
124 LOG_ERR("Failed to turn LED %d off, err=%d", led, err); in run_led_test()
131 err = led_set_brightness(lp50xx_dev, led, level); in run_led_test()
134 ", err=%d\n", led, level, err); in run_led_test()
142 err = led_off(lp50xx_dev, led); in run_led_test()
144 LOG_ERR("Failed to turn LED %d off, err=%d", led, err); in run_led_test()
170 uint8_t led; in run_channel_test() local
175 for (led = 0; led < max_leds; led++) { in run_channel_test()
177 uint8_t *col = &buffer[led * 3]; in run_channel_test()
179 err = led_get_info(lp50xx_dev, led, &info); in run_channel_test()
207 for (led = 0; led < max_leds; led++) { in run_channel_test()
208 buffer[led] = MAX_BRIGHTNESS; in run_channel_test()
222 for (led = 0; led < max_leds; led++) { in run_channel_test()
223 buffer[led] = 0; in run_channel_test()
238 for (led = 0; led < max_leds; led++) { in run_channel_test()
239 buffer[led] = level; in run_channel_test()
256 for (led = 0; led < max_leds; led++) { in run_channel_test()
257 buffer[led] = 0; in run_channel_test()
280 uint8_t led; in run_test() local
283 for (led = 0; led < max_leds; led++) { in run_test()
287 err = led_get_info(lp50xx_dev, led, &info); in run_test()
290 led, err); in run_test()
295 printk("Found LED %d", led); in run_test()
311 num_leds = led; in run_test()
323 for (led = 0; led < num_leds; led++) { in run_test()
324 err = run_led_test(lp50xx_dev, led); in run_test()