Home
last modified time | relevance | path

Searched refs:echo_gpios (Results 1 – 2 of 2) sorted by relevance

/Zephyr-latest/drivers/sensor/hc_sr04/
Dhc_sr04.c30 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()
[all …]
/Zephyr-latest/tests/drivers/sensor/hc-sr04/src/
Dmain.c16 #define HC_SR04_GPIO_IN DT_GPIO_CTLR(DT_INST(0, hc_sr04), echo_gpios)
17 #define HC_SR04_PIN_IN DT_GPIO_PIN(DT_INST(0, hc_sr04), echo_gpios)