Home
last modified time | relevance | path

Searched +full:button +full:- +full:input +full:- +full:code (Results 1 – 25 of 428) sorted by relevance

12345678910>>...18

/Zephyr-latest/dts/bindings/input/
Dzephyr,lvgl-encoder-input.yaml2 # SPDX-License-Identifier: Apache-2.0
5 LVGL encoder indev pseudo-device
7 Listens for button/encoder input events and routes the
13 compatible = "zephyr,lvgl-encoder-input";
14 rotation-input-code = <INPUT_REL_Y>;
15 button-input-code = <INPUT_KEY_0>;
18 compatible: "zephyr,lvgl-encoder-input"
20 include: zephyr,lvgl-common-input.yaml
23 rotation-input-code:
27 Input event code associated with rotation (INPUT_REL_*).
[all …]
Dzephyr,lvgl-button-input.yaml2 # SPDX-License-Identifier: Apache-2.0
5 LVGL button indev pseudo-device
7 Listens for button input events and routes the
8 lv_indev_data_t to the underlying button lv_indev_t managed by LVGL.
13 compatible = "zephyr,lvgl-button-input";
14 input = <&buttons>;
15 input-codes = <INPUT_KEY_0 INPUT_KEY_1>;
19 When the device receives an input_event with code INPUT_KEY_0
22 compatible: "zephyr,lvgl-button-input"
24 include: zephyr,lvgl-common-input.yaml
[all …]
Dfutaba,sbus.yaml2 # SPDX-License-Identifier: Apache-2.0
5 SBUS input driver using
8 SBUS is an single-wire inverted serial protocol so either you need to use
9 the rx-invert feature of your serial driver or use an external signal inverter.
10 The driver binds this to the Zephyr input system using INPUT_EV_CODES.
12 The following examples defines a binding of 2 joysticks and a button using 5 channels.
22 zephyr,code = <INPUT_ABS_RX>;
27 zephyr,code = <INPUT_ABS_RY>;
32 zephyr,code = <INPUT_ABS_X>;
37 zephyr,code = <INPUT_ABS_Y>;
[all …]
Dgpio-keys.yaml2 # SPDX-License-Identifier: Apache-2.0
5 Zephyr Input GPIO KEYS parent node
7 This defines a group of buttons that can generate input events. Each button
8 is defined in a child node of the gpio-keys node and defines a specific key
9 code.
13 #include <zephyr/dt-bindings/input/input-event-codes.h>
17 compatible = "gpio-keys";
20 zephyr,code = <INPUT_KEY_0>;
26 compatible: "gpio-keys"
31 debounce-interval-ms:
[all …]
/Zephyr-latest/samples/subsys/usb/hid-mouse/
DREADME.rst1 .. zephyr:code-sample:: usb-hid-mouse
3 :relevant-api: _usb_device_core_api usb_hid_device_api input_interface
11 by the Zephyr project. This very simple driver enumerates a board with a button
12 into a mouse that has a left mouse button and optionally (depending on
13 the number of buttons on the board) a right mouse button, X-axis movement,
14 and Y-axis movement.
16 will be performed on every button click if the bus is in suspended state.
17 This sample can be found under :zephyr_file:`samples/subsys/usb/hid-mouse` in the
23 This project requires an USB device driver and uses the :ref:`input` API.
24 There must be a :dtcompatible:`gpio-keys` group of buttons or keys defined at
[all …]
/Zephyr-latest/samples/basic/button/
DREADME.rst1 .. zephyr:code-sample:: button
2 :name: Button
3 :relevant-api: gpio_interface
10 A simple button demo showcasing the use of GPIO input with interrupts.
11 The sample prints a message to the console each time a button is pressed.
13 .. NOTE:: If you are looking into an implementation of button events with
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
[all …]
/Zephyr-latest/samples/subsys/display/lvgl/boards/
Dnative_posix.overlay4 * SPDX-License-Identifier: Apache-2.0
7 #include <zephyr/dt-bindings/input/input-event-codes.h>
8 #include <zephyr/dt-bindings/lvgl/lvgl.h>
16 compatible = "gpio-qdec";
18 steps-per-period = <4>;
20 sample-time-us = <2000>;
21 idle-timeout-ms = <200>;
25 compatible = "gpio-keys";
29 zephyr,code = <INPUT_KEY_R>;
34 zephyr,code = <INPUT_KEY_B>;
[all …]
/Zephyr-latest/modules/lvgl/input/
Dlvgl_encoder_input.c4 * SPDX-License-Identifier: Apache-2.0
25 struct lvgl_common_input_data *data = dev->data; in lvgl_encoder_process_event()
26 const struct lvgl_encoder_input_config *cfg = dev->config; in lvgl_encoder_process_event()
28 if (evt->code == cfg->rotation_input_code) { in lvgl_encoder_process_event()
29 data->pending_event.enc_diff = evt->value; in lvgl_encoder_process_event()
30 } else if (evt->code == cfg->button_input_code) { in lvgl_encoder_process_event()
31 data->pending_event.state = in lvgl_encoder_process_event()
32 evt->value ? LV_INDEV_STATE_PRESSED : LV_INDEV_STATE_RELEASED; in lvgl_encoder_process_event()
33 data->pending_event.enc_diff = 0; in lvgl_encoder_process_event()
34 data->pending_event.key = LV_KEY_ENTER; in lvgl_encoder_process_event()
[all …]
Dlvgl_button_input.c4 * SPDX-License-Identifier: Apache-2.0
26 struct lvgl_common_input_data *data = dev->data; in lvgl_button_process_event()
27 const struct lvgl_button_input_config *cfg = dev->config; in lvgl_button_process_event()
30 for (i = 0; i < cfg->num_codes; i++) { in lvgl_button_process_event()
31 if (evt->code == cfg->input_codes[i]) { in lvgl_button_process_event()
36 if (i == cfg->num_codes) { in lvgl_button_process_event()
37 LOG_DBG("Ignored input event: %u", evt->code); in lvgl_button_process_event()
41 data->pending_event.btn_id = i; in lvgl_button_process_event()
42 data->pending_event.state = evt->value ? LV_INDEV_STATE_PRESSED : LV_INDEV_STATE_RELEASED; in lvgl_button_process_event()
44 if (k_msgq_put(cfg->common_config.event_msgq, &data->pending_event, K_NO_WAIT) != 0) { in lvgl_button_process_event()
[all …]
/Zephyr-latest/boards/ti/cc3235sf_launchxl/
Dcc3235sf_launchxl.dts4 * SPDX-License-Identifier: Apache-2.0
7 /dts-v1/;
10 #include "cc3235sf_launchxl-pinctrl.dtsi"
11 #include <zephyr/dt-bindings/input/input-event-codes.h>
15 compatible = "ti,cc3235sf-launchxl", "ti,cc3235sf", "ti,cc32xx";
18 uart-0 = &uart0;
19 uart-1 = &uart1;
20 i2c-0 = &i2c0;
34 zephyr,shell-uart = &uart0;
38 compatible = "gpio-leds";
[all …]
/Zephyr-latest/boards/snps/em_starterkit/
Dboard.dtsi1 /* SPDX-License-Identifier: Apache-2.0 */
4 #include <zephyr/dt-bindings/input/input-event-codes.h>
23 compatible = "gpio-leds";
64 compatible = "gpio-keys";
68 label = "Push button switch 0";
69 zephyr,code = <INPUT_KEY_0>;
74 label = "Push button switch 1";
75 zephyr,code = <INPUT_KEY_1>;
80 label = "Push button switch 2";
81 zephyr,code = <INPUT_KEY_2>;
[all …]
/Zephyr-latest/boards/ti/cc3220sf_launchxl/
Dcc3220sf_launchxl.dts1 /* SPDX-License-Identifier: Apache-2.0 */
3 /dts-v1/;
7 #include "cc3220sf_launchxl-pinctrl.dtsi"
8 #include <zephyr/dt-bindings/input/input-event-codes.h>
12 compatible = "ti,cc3220sf-launchxl", "ti,cc3220sf", "ti,cc32xx";
15 uart-0 = &uart0;
16 uart-1 = &uart1;
17 i2c-0 = &i2c0;
31 zephyr,shell-uart = &uart0;
35 compatible = "gpio-leds";
[all …]
/Zephyr-latest/boards/nxp/lpcxpresso51u68/
Dlpcxpresso51u68.dts4 * SPDX-License-Identifier: Apache-2.0
7 /dts-v1/;
10 #include "lpcxpresso51u68-pinctrl.dtsi"
11 #include <zephyr/dt-bindings/input/input-event-codes.h>
21 zephyr,shell-uart = &flexcomm0;
31 usart-0 = &flexcomm0;
35 compatible = "gpio-leds";
50 gpio-keys {
51 compatible = "gpio-keys";
53 label = "Wakeup button";
[all …]
/Zephyr-latest/include/zephyr/input/
Dinput.h4 * SPDX-License-Identifier: Apache-2.0
11 * @brief Input Interface
12 * @defgroup input_interface Input Interface
21 #include <zephyr/dt-bindings/input/input-event-codes.h>
30 * @brief Input event structure.
32 * This structure represents a single input event, for example a key or button
33 * press for a single button, or an absolute or relative coordinate for a
44 * Event code (see @ref INPUT_KEY_CODES, @ref INPUT_BTN_CODES,
47 uint16_t code; member
53 * @brief Report a new input event.
[all …]
/Zephyr-latest/boards/nordic/nrf5340_audio_dk/
Dnrf5340_audio_dk_nrf5340_shared.dtsi1 #include <zephyr/dt-bindings/input/input-event-codes.h>
5 compatible = "gpio-leds";
45 compatible = "gpio-keys";
48 label = "Push button 1";
49 zephyr,code = <INPUT_KEY_VOLUMEDOWN>;
53 label = "Push button 2";
54 zephyr,code = <INPUT_KEY_VOLUMEUP>;
58 label = "Push button 3";
59 zephyr,code = <INPUT_KEY_3>;
63 label = "Push button 4";
[all …]
/Zephyr-latest/samples/subsys/display/lvgl/
DREADME.rst1 .. zephyr:code-sample:: lvgl
3 :relevant-api: display_interface input_interface
5 Display a "Hello World" and react to user input using LVGL.
12 Based on the available input devices on the board used to run the sample,
17 (:dtcompatible:`zephyr,lvgl-pointer-input`), a button widget is displayed
19 * Button
20 The button pseudo device (:dtcompatible:`zephyr,lvgl-button-input`) maps
24 The encoder pseudo device (:dtcompatible:`zephyr,lvgl-encoder-input`)
29 The keypad pseudo device (:dtcompatible:`zephyr,lvgl-keypad-input`) can
32 keypad device, a button matrix is displayed at the bottom of the screen
[all …]
/Zephyr-latest/boards/waveshare/nrf51_ble400/
Dnrf51_ble400.dts4 * SPDX-License-Identifier: Apache-2.0
7 /dts-v1/;
9 #include "nrf51_ble400-pinctrl.dtsi"
10 #include <zephyr/dt-bindings/input/input-event-codes.h>
18 zephyr,shell-uart = &uart0;
19 zephyr,bt-mon-uart = &uart0;
20 zephyr,bt-c2h-uart = &uart0;
38 compatible = "gpio-leds";
62 /* Push button switch 0 KEY1 */
63 compatible = "gpio-keys";
[all …]
/Zephyr-latest/boards/nordic/nrf52dk/
Dnrf52dk_nrf52805.dts4 * SPDX-License-Identifier: Apache-2.0
7 /dts-v1/;
9 #include "nrf52dk_nrf52805-pinctrl.dtsi"
10 #include <zephyr/dt-bindings/input/input-event-codes.h>
14 compatible = "nordic,nrf52-dk-nrf52805";
18 zephyr,shell-uart = &uart0;
19 zephyr,uart-mcumgr = &uart0;
20 zephyr,bt-mon-uart = &uart0;
21 zephyr,bt-c2h-uart = &uart0;
24 zephyr,code-partition = &slot0_partition;
[all …]
Dnrf52dk_nrf52810.dts6 * SPDX-License-Identifier: Apache-2.0
9 /dts-v1/;
11 #include "nrf52dk_nrf52810-pinctrl.dtsi"
12 #include <zephyr/dt-bindings/input/input-event-codes.h>
16 compatible = "nordic,nrf52-dk-nrf52810";
20 zephyr,shell-uart = &uart0;
21 zephyr,uart-mcumgr = &uart0;
22 zephyr,bt-mon-uart = &uart0;
23 zephyr,bt-c2h-uart = &uart0;
26 zephyr,code-partition = &slot0_partition;
[all …]
/Zephyr-latest/doc/services/input/
Dindex.rst3 Input chapter
6 The input subsystem provides an API for dispatching input events from input
9 Input Events
12 The subsystem is built around the :c:struct:`input_event` structure. An input
14 of a single button, or a movement in a single axis.
19 multi-axis device have been reported.
21 Input Devices
24 An input device can report input events directly using :c:func:`input_report`
25 or any related function; for example buttons or other on-off input entities
48 on the :kconfig:option:`CONFIG_INPUT_MODE` option. If the input thread is used,
[all …]
/Zephyr-latest/boards/nordic/nrf52840dk/
Dnrf52840dk_nrf52811.dts4 * SPDX-License-Identifier: Apache-2.0
7 /dts-v1/;
9 #include "nrf52840dk_nrf52811-pinctrl.dtsi"
10 #include <zephyr/dt-bindings/input/input-event-codes.h>
14 compatible = "nordic,nrf52840-dk-nrf52811";
18 zephyr,shell-uart = &uart0;
19 zephyr,uart-mcumgr = &uart0;
20 zephyr,bt-mon-uart = &uart0;
21 zephyr,bt-c2h-uart = &uart0;
24 zephyr,code-partition = &slot0_partition;
[all …]
/Zephyr-latest/boards/nordic/nrf51dk/
Dnrf51dk_nrf51822.dts4 * SPDX-License-Identifier: Apache-2.0
7 /dts-v1/;
9 #include "nrf51dk_nrf51822-pinctrl.dtsi"
10 #include <zephyr/dt-bindings/input/input-event-codes.h>
14 compatible = "nordic,nrf51-dk-nrf51822";
18 zephyr,shell-uart = &uart0;
19 zephyr,uart-mcumgr = &uart0;
20 zephyr,bt-mon-uart = &uart0;
21 zephyr,bt-c2h-uart = &uart0;
24 zephyr,code-partition = &slot0_partition;
[all …]
/Zephyr-latest/boards/ti/common/
Dlaunchxl.dtsi4 * SPDX-License-Identifier: Apache-2.0
8 #include "launchxl-pinctrl.dtsi"
9 #include <zephyr/dt-bindings/input/input-event-codes.h>
20 mcuboot-led0 = &led1;
21 mcuboot-button0 = &btn1;
28 zephyr,shell-uart = &uart0;
30 zephyr,code-partition = &slot0_partition;
34 compatible = "gpio-leds";
46 compatible = "gpio-keys";
49 label = "Push button 1";
[all …]
/Zephyr-latest/boards/waveshare/open103z/
Dwaveshare_open103z.dts4 * SPDX-License-Identifier: Apache-2.0
7 /dts-v1/;
9 #include <st/f1/stm32f103z(c-d-e)tx-pinctrl.dtsi>
10 #include <zephyr/dt-bindings/input/input-event-codes.h>
18 zephyr,shell-uart = &usart1;
25 compatible = "gpio-leds";
45 compatible = "gpio-keys";
46 button: button { label
47 label = "User button";
49 zephyr,code = <INPUT_KEY_0>;
[all …]
/Zephyr-latest/boards/silabs/starter_kits/slstk3400a/
Dslstk3400a.dts4 * SPDX-License-Identifier: Apache-2.0
7 /dts-v1/;
9 #include <zephyr/dt-bindings/input/input-event-codes.h>
17 zephyr,shell-uart = &usart1;
31 compatible = "gpio-leds";
43 compatible = "gpio-keys";
47 label = "User Push Button 0";
48 zephyr,code = <INPUT_KEY_0>;
53 label = "User Push Button 1";
54 zephyr,code = <INPUT_KEY_1>;
[all …]

12345678910>>...18