Lines Matching full:led
10 #include <zephyr/drivers/led.h>
28 * @brief Run tests on a single LED using the LED API syscalls.
30 * @param led_pwm LED PWM device.
31 * @param led Number of the LED to test.
33 static void run_led_test(const struct device *led_pwm, uint8_t led) in run_led_test() argument
38 LOG_INF("Testing LED %d - %s", led, led_label[led] ? : "no label"); in run_led_test()
40 /* Turn LED on. */ in run_led_test()
41 err = led_on(led_pwm, led); in run_led_test()
49 /* Turn LED off. */ in run_led_test()
50 err = led_off(led_pwm, led); in run_led_test()
58 /* Increase LED brightness gradually up to the maximum level. */ in run_led_test()
61 err = led_set_brightness(led_pwm, led, level); in run_led_test()
70 /* Decrease LED brightness gradually down to the minimum level. */ in run_led_test()
73 err = led_set_brightness(led_pwm, led, level); in run_led_test()
83 /* Start LED blinking (short cycle) */ in run_led_test()
84 err = led_blink(led_pwm, led, CONFIG_BLINK_DELAY_SHORT, CONFIG_BLINK_DELAY_SHORT); in run_led_test()
96 /* Start LED blinking (long cycle) */ in run_led_test()
97 err = led_blink(led_pwm, led, CONFIG_BLINK_DELAY_LONG, CONFIG_BLINK_DELAY_LONG); in run_led_test()
111 /* Turn LED off. */ in run_led_test()
112 err = led_off(led_pwm, led); in run_led_test()
123 uint8_t led; in main() local
137 for (led = 0; led < num_leds; led++) { in main()
138 run_led_test(led_pwm, led); in main()