Lines Matching +full:gpio +full:- +full:leds
1 .. zephyr:code-sample:: blinky
3 :relevant-api: gpio_interface
5 Blink an LED forever using the GPIO API.
10 The Blinky sample blinks an LED forever using the :ref:`GPIO API <gpio_api>`.
14 #. Get a pin specification from the :ref:`devicetree <dt-guide>` as a
16 #. Configure the GPIO pin as an output
19 See :zephyr:code-sample:`pwm-blinky` for a similar sample that uses the PWM API instead.
21 .. _blinky-sample-requirements:
28 #. Have an LED connected via a GPIO pin (these are called "User LEDs" on many of
37 .. zephyr-app-commands::
38 :zephyr-app: samples/basic/blinky
54 On GCC-based toolchains, the error looks like this:
56 .. code-block:: none
65 .. code-block:: DTS
72 leds {
73 compatible = "gpio-leds";
80 The above sets your board's ``led0`` alias to use pin 13 on GPIO controller
86 - See :dtcompatible:`gpio-leds` for more information on defining GPIO-based LEDs
89 - If you're not sure what to do, check the devicetrees for supported boards which
90 use the same SoC as your target. See :ref:`get-devicetree-outputs` for details.
92 - See :zephyr_file:`include/zephyr/dt-bindings/gpio/gpio.h` for the flags you can use
95 - If the LED is built in to your board hardware, the alias should be defined in
96 your :ref:`BOARD.dts file <devicetree-in-out-files>`. Otherwise, you can
97 define one in a :ref:`devicetree overlay <set-devicetree-overlays>`.