Lines Matching full:led
34 * to turn on the LED whenever the button is pressed.
36 static struct gpio_dt_spec led = GPIO_DT_SPEC_GET_OR(DT_ALIAS(led0), gpios, variable
74 if (led.port && !gpio_is_ready_dt(&led)) { in main()
75 printk("Error %d: LED device %s is not ready; ignoring it\n", in main()
76 ret, led.port->name); in main()
77 led.port = NULL; in main()
79 if (led.port) { in main()
80 ret = gpio_pin_configure_dt(&led, GPIO_OUTPUT); in main()
82 printk("Error %d: failed to configure LED device %s pin %d\n", in main()
83 ret, led.port->name, led.pin); in main()
84 led.port = NULL; in main()
86 printk("Set up LED at %s pin %d\n", led.port->name, led.pin); in main()
91 if (led.port) { in main()
93 /* If we have an LED, match its state to the button's. */ in main()
97 gpio_pin_set_dt(&led, val); in main()