Home
last modified time | relevance | path

Searched refs:button (Results 1 – 25 of 740) sorted by relevance

12345678910>>...30

/Zephyr-4.3.0/samples/bluetooth/st_ble_sensor/src/
Dbutton_svc.c25 static const struct gpio_dt_spec button = GPIO_DT_SPEC_GET(DT_ALIAS(sw0), gpios); variable
32 if (!gpio_is_ready_dt(&button)) { in button_init()
34 button.port->name); in button_init()
38 ret = gpio_pin_configure_dt(&button, GPIO_INPUT); in button_init()
41 ret, button.port->name, button.pin); in button_init()
46 gpio_init_callback(&gpio_cb, handler, BIT(button.pin)); in button_init()
47 gpio_add_callback(button.port, &gpio_cb); in button_init()
48 ret = gpio_pin_interrupt_configure_dt(&button, GPIO_INT_EDGE_TO_ACTIVE); in button_init()
51 "GPIO %s pin %d", ret, button.port->name, button.pin); in button_init()
/Zephyr-4.3.0/samples/bluetooth/encrypted_advertising/peripheral/src/
Dmain.c32 static const struct gpio_dt_spec button = GPIO_DT_SPEC_GET_OR(SW0_NODE, gpios, {0}); variable
52 printk("Confirm passkey by pressing button at %s pin %d...\n", button.port->name, in get_passkey_confirmation()
53 button.pin); in get_passkey_confirmation()
74 if (!gpio_is_ready_dt(&button)) { in setup_btn()
75 LOG_ERR("Error: button device %s is not ready", button.port->name); in setup_btn()
79 ret = gpio_pin_configure_dt(&button, GPIO_INPUT); in setup_btn()
81 LOG_ERR("Error %d: failed to configure %s pin %d", ret, button.port->name, in setup_btn()
82 button.pin); in setup_btn()
86 ret = gpio_pin_interrupt_configure_dt(&button, GPIO_INT_EDGE_TO_ACTIVE); in setup_btn()
89 button.port->name, button.pin); in setup_btn()
[all …]
/Zephyr-4.3.0/samples/bluetooth/encrypted_advertising/central/src/
Dmain.c36 static const struct gpio_dt_spec button = GPIO_DT_SPEC_GET_OR(SW0_NODE, gpios, {0}); variable
58 printk("Confirm passkey by pressing button at %s pin %d...\n", button.port->name, in get_passkey_confirmation()
59 button.pin); in get_passkey_confirmation()
80 if (!gpio_is_ready_dt(&button)) { in setup_btn()
81 LOG_ERR("Error: button device %s is not ready", button.port->name); in setup_btn()
85 ret = gpio_pin_configure_dt(&button, GPIO_INPUT); in setup_btn()
87 LOG_ERR("Error %d: failed to configure %s pin %d", ret, button.port->name, in setup_btn()
88 button.pin); in setup_btn()
92 ret = gpio_pin_interrupt_configure_dt(&button, GPIO_INT_EDGE_TO_ACTIVE); in setup_btn()
95 button.port->name, button.pin); in setup_btn()
[all …]
/Zephyr-4.3.0/samples/basic/button/src/
Dmain.c28 static const struct gpio_dt_spec button = GPIO_DT_SPEC_GET_OR(SW0_NODE, gpios, variable
49 if (!gpio_is_ready_dt(&button)) { in main()
51 button.port->name); in main()
55 ret = gpio_pin_configure_dt(&button, GPIO_INPUT); in main()
58 ret, button.port->name, button.pin); in main()
62 ret = gpio_pin_interrupt_configure_dt(&button, in main()
66 ret, button.port->name, button.pin); in main()
70 gpio_init_callback(&button_cb_data, button_pressed, BIT(button.pin)); in main()
71 gpio_add_callback(button.port, &button_cb_data); in main()
72 printk("Set up button at %s pin %d\n", button.port->name, button.pin); in main()
[all …]
/Zephyr-4.3.0/samples/boards/nxp/mimxrt1060_evk/system_off/src/
Dmain.c31 static const struct gpio_dt_spec button = GPIO_DT_SPEC_GET_OR(SW0_NODE, gpios, { 0 }); variable
38 if (!gpio_is_ready_dt(&button)) { in main()
39 printk("Error: button device %s is not ready\n", button.port->name); in main()
44 int ret = gpio_pin_configure_dt(&button, GPIO_INPUT); in main()
47 printk("Error %d: failed to configure %s pin %d\n", ret, button.port->name, in main()
48 button.pin); in main()
52 ret = gpio_pin_interrupt_configure_dt(&button, GPIO_INT_EDGE_TO_ACTIVE); in main()
55 button.port->name, button.pin); in main()
84 printk("Entering system off; press %s to restart sooner\n", button.port->name); in main()
/Zephyr-4.3.0/samples/boards/espressif/light_sleep/src/
Dmain.c28 static const struct gpio_dt_spec button = variable
33 if (!gpio_is_ready_dt(&button)) { in main()
34 printk("Error: button device %s is not ready\n", button.port->name); in main()
38 const int wakeup_level = (button.dt_flags & GPIO_ACTIVE_LOW) ? 0 : 1; in main()
40 esp_gpio_wakeup_enable(button.pin, in main()
49 if (gpio_pin_get_dt(&button) == wakeup_level) { in main()
50 printk("Waiting for GPIO%d to go high...\n", button.pin); in main()
53 } while (gpio_pin_get_dt(&button) == wakeup_level); in main()
/Zephyr-4.3.0/samples/bluetooth/mesh/src/
Dmicrobit.c16 static const struct gpio_dt_spec button = variable
53 gpio_pin_configure_dt(&button, GPIO_INPUT); in configure_button()
54 gpio_pin_interrupt_configure_dt(&button, GPIO_INT_EDGE_TO_ACTIVE); in configure_button()
56 gpio_init_callback(&button_cb, button_pressed, BIT(button.pin)); in configure_button()
58 gpio_add_callback(button.port, &button_cb); in configure_button()
72 gpio_pin_interrupt_configure_dt(&button, GPIO_INT_EDGE_TO_ACTIVE); in board_output_number()
87 gpio_pin_interrupt_configure_dt(&button, GPIO_INT_DISABLE); in board_prov_complete()
/Zephyr-4.3.0/samples/boards/st/power_mgmt/wkup_pins/src/
Dmain.c22 static const struct gpio_dt_spec button = GPIO_DT_SPEC_GET(WKUP_SRC_NODE, gpios); variable
28 printk("\nWake-up button is connected to %s pin %d\n", button.port->name, button.pin); in main()
35 gpio_pin_configure_dt(&button, GPIO_INPUT | STM32_GPIO_WKUP); in main()
/Zephyr-4.3.0/samples/net/openthread/coap/src/
Dmain.c27 static const struct gpio_dt_spec button = GPIO_DT_SPEC_GET_OR(SW0_NODE, gpios, {0}); variable
55 button_init(&button); in main()
57 gpio_init_callback(&button_cb_data, button_pressed, BIT(button.pin)); in main()
58 gpio_add_callback_dt(&button, &button_cb_data); in main()
/Zephyr-4.3.0/samples/boards/nordic/dynamic_pinctrl/src/
Dremap.c34 const struct gpio_dt_spec button = GPIO_DT_SPEC_GET_OR(DT_ALIAS(sw0), in remap_pins() local
38 if (!gpio_is_ready_dt(&button)) { in remap_pins()
42 ret = gpio_pin_configure_dt(&button, GPIO_INPUT); in remap_pins()
48 if (gpio_pin_get_dt(&button)) { in remap_pins()
/Zephyr-4.3.0/samples/boards/renesas/comparator/src/
Dmain.c25 static const struct gpio_dt_spec button = GPIO_DT_SPEC_GET_OR(SW0_NODE, gpios, {0}); variable
83 if (!gpio_is_ready_dt(&button)) { in main()
84 printk("Error: button device %s is not ready\n", button.port->name); in main()
88 ret = gpio_pin_configure_dt(&button, GPIO_INPUT); in main()
90 printk("Error %d: failed to configure %s pin %d\n", ret, button.port->name, in main()
91 button.pin); in main()
/Zephyr-4.3.0/samples/shields/x_nucleo_53l0a1/src/
Dmain.c121 const struct gpio_dt_spec button = GPIO_DT_SPEC_GET(SW0_NODE, gpios); in main() local
126 if (!gpio_is_ready_dt(&button)) { in main()
128 button.port->name); in main()
132 gpio_pin_configure_dt(&button, GPIO_INPUT); in main()
133 gpio_pin_interrupt_configure_dt(&button, GPIO_INT_EDGE_RISING); in main()
134 gpio_init_callback(&button_cb_data, change_mode, BIT(button.pin)); in main()
135 gpio_add_callback(button.port, &button_cb_data); in main()
/Zephyr-4.3.0/drivers/input/
Dinput_sdl_touch_bottom.c21 window = SDL_GetWindowFromID(event->button.windowID); in event_targets_display()
55 data->x = event->button.x; in sdl_filter()
56 data->y = event->button.y; in sdl_filter()
/Zephyr-4.3.0/samples/basic/button/
DREADME.rst1 .. zephyr:code-sample:: button
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
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>`
36 will be turned on when the button is pressed, and turned off off when it is
68 label = "User button";
82 meant to apply to the button, such as ``(GPIO_PULL_UP | GPIO_ACTIVE_LOW)``
105 :zephyr-app: samples/basic/button
[all …]
/Zephyr-4.3.0/samples/bluetooth/mesh_provisioner/src/
Dmain.c319 static const struct gpio_dt_spec button = GPIO_DT_SPEC_GET_OR(SW0_NODE, gpios, {0}); variable
331 if (!gpio_is_ready_dt(&button)) { in button_init()
332 printk("Error: button device %s is not ready\n", button.port->name); in button_init()
335 ret = gpio_pin_configure_dt(&button, GPIO_INPUT); in button_init()
337 printk("Error %d: failed to configure %s pin %d\n", ret, button.port->name, in button_init()
338 button.pin); in button_init()
341 ret = gpio_pin_interrupt_configure_dt(&button, GPIO_INT_EDGE_TO_ACTIVE); in button_init()
344 button.port->name, button.pin); in button_init()
347 gpio_init_callback(&button_cb_data, button_pressed, BIT(button.pin)); in button_init()
348 gpio_add_callback(button.port, &button_cb_data); in button_init()
/Zephyr-4.3.0/samples/boards/nordic/mesh/onoff-app/
DREADME.rst16 FICR. Each button controls the state of its
19 The models for button 1 and LED 1 are in the node's root element.
20 The 3 remaining button/LED pairs are in elements 1 through 3.
24 After provisioning, the button clients must
30 If a button is pressed only once within a 1 second interval, it sends an
35 using one button for "on" and another for "off" would reduce the number
55 Prior to provisioning, each button controls its corresponding LED as one
59 binds button 2 and LED 1 to application key 1. It then configures button 2
71 bind 1 1 1001 # bind appkey 1 to button 2 on element 1 (unicast 0101)
72 pub-set 0101 c000 1 0 0 1001 # publish button 2 to group address c000
/Zephyr-4.3.0/boards/ti/cc3235sf_launchxl/
Dcc3235sf_launchxl.dts57 /* Push button 2 */
62 label = "Push button switch 2";
66 /* Push button 3 */
69 label = "Push button switch 3";
/Zephyr-4.3.0/samples/subsys/usb/legacy/hid-mouse/
DREADME.rst11 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,
16 will be performed on every button click if the bus is in suspended state.
31 - ``INPUT_KEY_0``: left button
32 - ``INPUT_KEY_1``: right button
98 When you press the button on your board, it will act as if the left
99 mouse button was pressed, and this information will be displayed
111 If your board has more than one button, they will act as right mouse button,
/Zephyr-4.3.0/samples/subsys/usb/hid-mouse/
DREADME.rst11 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,
16 will be performed on every button click if the bus is in suspended state.
28 - ``INPUT_KEY_0``: left button
29 - ``INPUT_KEY_1``: right button
95 When you press the button on your board, it will act as if the left
96 mouse button was pressed, and this information will be displayed
108 If your board has more than one button, they will act as right mouse button,
/Zephyr-4.3.0/samples/bluetooth/st_ble_sensor/
DREADME.rst11 GATT services. Currently only button notification and LED service are
24 Open ST Bluetooth LE Sensor app and click on "CONNECT TO A DEVICE" button to scan Bluetooth LE devi…
27 Push SW0 button on embedded device to test button service.
/Zephyr-4.3.0/boards/ti/cc3220sf_launchxl/
Dcc3220sf_launchxl.dts54 /* Push button 2 */
59 label = "Push button switch 2";
63 /* Push button 3 */
66 label = "Push button switch 3";
/Zephyr-4.3.0/boards/nordic/nrf5340_audio_dk/
Dnrf5340_audio_dk_nrf5340_shared.dtsi59 label = "Push button 1";
65 label = "Push button 2";
71 label = "Push button 3";
77 label = "Push button 4";
83 label = "Push button 5";
/Zephyr-4.3.0/boards/adafruit/macropad_rp2040/doc/
Dindex.rst11 individual RGB NeoPixels, a rotary encoder with push button, a 128x64 OLED display,
23 - Rotary encoder with push button
27 - Reset button
48 encoder button (BOOT) and, while continuing to hold it, pressing and releasing the reset button.
/Zephyr-4.3.0/samples/boards/st/power_mgmt/wkup_pins/boards/
Dnucleo_g031k8.overlay10 /* the board has no actual button, you need to connect PA0 to GND with a jumper wire */
14 user_button: button {
/Zephyr-4.3.0/boards/seeed/wio_terminal/doc/
Dindex.rst29 - 5-way user button
75 bootloader can be entered by quickly tapping the reset button twice.
79 button twice, and copy the UF2 file to the USB mass storage device. The device
85 #. Build the Zephyr kernel and the :code:`button` sample application:
88 :zephyr-app: samples/basic/button
93 #. Swipe the reset/power button down twice quickly to enter bootloader mode
98 :zephyr-app: samples/basic/button
104 (counting from the top left) user button at the top of the Wio Terminal.
124 :zephyr-app: samples/basic/button
133 :zephyr-app: samples/basic/button

12345678910>>...30