Lines Matching refs:button
36 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()
99 gpio_init_callback(&button_cb_data, button_pressed, BIT(button.pin)); in setup_btn()
100 gpio_add_callback(button.port, &button_cb_data); in setup_btn()
101 LOG_DBG("Set up button at %s pin %d", button.port->name, button.pin); in setup_btn()