Lines Matching refs:led
24 const struct gpio_dt_spec *led; member
27 static int led_gpio_set_brightness(const struct device *dev, uint32_t led, uint8_t value) in led_gpio_set_brightness() argument
33 if ((led >= config->num_leds) || (value > 100)) { in led_gpio_set_brightness()
37 led_gpio = &config->led[led]; in led_gpio_set_brightness()
42 static int led_gpio_on(const struct device *dev, uint32_t led) in led_gpio_on() argument
44 return led_gpio_set_brightness(dev, led, 100); in led_gpio_on()
47 static int led_gpio_off(const struct device *dev, uint32_t led) in led_gpio_off() argument
49 return led_gpio_set_brightness(dev, led, 0); in led_gpio_off()
63 const struct gpio_dt_spec *led = &config->led[i]; in led_gpio_init() local
65 if (device_is_ready(led->port)) { in led_gpio_init()
66 err = gpio_pin_configure_dt(led, GPIO_OUTPUT_INACTIVE); in led_gpio_init()
80 static DEVICE_API(led, led_gpio_api) = {
94 .led = gpio_dt_spec_##i, \