drivers: led_gpio: use gpio_pin_set_dt
Use the simpler version of `gpio_pin_set` to demonstrate usage. Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
This commit is contained in:
parent
7ea37c9bb7
commit
7eb48adb52
1 changed files with 1 additions and 1 deletions
|
@ -36,7 +36,7 @@ static int led_gpio_set_brightness(const struct device *dev, uint32_t led, uint8
|
|||
|
||||
led_gpio = &config->led[led];
|
||||
|
||||
return gpio_pin_set(led_gpio->port, led_gpio->pin, value > 0);
|
||||
return gpio_pin_set_dt(led_gpio, value > 0);
|
||||
}
|
||||
|
||||
static int led_gpio_on(const struct device *dev, uint32_t led)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue