Lines Matching refs:echo_gpios
30 struct gpio_dt_spec echo_gpios; member
50 if (!gpio_is_ready_dt(&cfg->echo_gpios)) { in hcsr04_configure_gpios()
51 LOG_ERR("GPIO '%s' not ready", cfg->echo_gpios.port->name); in hcsr04_configure_gpios()
54 ret = gpio_pin_configure_dt(&cfg->echo_gpios, GPIO_INPUT); in hcsr04_configure_gpios()
56 LOG_ERR("Failed to configure '%s' as output: %d", cfg->echo_gpios.port->name, ret); in hcsr04_configure_gpios()
68 ret = gpio_pin_interrupt_configure(cfg->echo_gpios.port, cfg->echo_gpios.pin, in hcsr04_configure_interrupt()
71 LOG_ERR("Failed to configure '%s' as interrupt: %d", cfg->echo_gpios.port->name, in hcsr04_configure_interrupt()
75 gpio_init_callback(&data->gpio_cb, &hcsr04_gpio_callback, BIT(cfg->echo_gpios.pin)); in hcsr04_configure_interrupt()
76 ret = gpio_add_callback(cfg->echo_gpios.port, &data->gpio_cb); in hcsr04_configure_interrupt()
78 LOG_ERR("Failed to add callback on '%s': %d", cfg->echo_gpios.port->name, ret); in hcsr04_configure_interrupt()
110 if (gpio_pin_get(dev, cfg->echo_gpios.pin) == 1) { in hcsr04_gpio_callback()
114 gpio_pin_interrupt_configure_dt(&cfg->echo_gpios, GPIO_INT_DISABLE); in hcsr04_gpio_callback()
125 ret = gpio_pin_interrupt_configure_dt(&cfg->echo_gpios, GPIO_INT_EDGE_BOTH); in hcsr04_sample_fetch()
182 .echo_gpios = GPIO_DT_SPEC_INST_GET(index, echo_gpios), \