Lines Matching +full:out +full:- +full:gpio

1 .. zephyr:code-sample:: button
3 :relevant-api: gpio_interface
5 Handle GPIO inputs with interrupts.
10 A simple button demo showcasing the use of GPIO input with interrupts.
14 debouncing, check out :ref:`input` and :zephyr:code-sample:`input-dump`
20 The board hardware must have a push button connected via a GPIO pin. These are
23 The button must be configured using the ``sw0`` :ref:`devicetree <dt-guide>`
24 alias, usually in the :ref:`BOARD.dts file <devicetree-in-out-files>`. You will
27 .. code-block:: none
35 the same alias used by the :zephyr:code-sample:`blinky` sample. If this is provided, the LED
45 includes a ``sw0`` alias; the optional ``led0`` alias is left out for
48 .. code-block:: devicetree
56 gpio0: gpio@0 {
58 gpio-controller;
59 #gpio-cells = <2>;
65 compatible = "gpio-keys";
75 with a "gpio-keys" :ref:`compatible <dt-important-props>`.
79 - ``gpio0`` is an example node label referring to a GPIO controller
80 - ``PIN`` should be a pin number, like ``8`` or ``0``
81 - ``FLAGS`` should be a logical OR of :ref:`GPIO configuration flags <gpio_api>`
84 This assumes the common case, where ``#gpio-cells = <2>`` in the ``gpio0``
85 node, and that the GPIO controller's devicetree binding names those two cells
88 .. code-block:: yaml
90 gpio-cells:
91 - pin
92 - flags
95 cell is optional, however, and the sample still works if the GPIO cells
104 .. zephyr-app-commands::
105 :zephyr-app: samples/basic/button
110 After startup, the program looks up a predefined GPIO device, and configures the
112 iteration of the main loop, the state of GPIO line is monitored and printed to