Searched refs:sw0_spec (Results 1 – 1 of 1) sorted by relevance
/Zephyr-latest/samples/drivers/i2s/echo/src/ |
D | main.c | 34 static struct gpio_dt_spec sw0_spec = GPIO_DT_SPEC_GET(SW0_NODE, gpios); variable 76 if (!gpio_is_ready_dt(&sw0_spec)) { in init_buttons() 77 printk("%s is not ready\n", sw0_spec.port->name); in init_buttons() 81 ret = gpio_pin_configure_dt(&sw0_spec, GPIO_INPUT); in init_buttons() 84 sw0_spec.port->name, sw0_spec.pin, ret); in init_buttons() 88 ret = gpio_pin_interrupt_configure_dt(&sw0_spec, in init_buttons() 92 sw0_spec.port->name, sw0_spec.pin, ret); in init_buttons() 96 gpio_init_callback(&sw0_cb_data, sw0_handler, BIT(sw0_spec.pin)); in init_buttons() 97 gpio_add_callback(sw0_spec.port, &sw0_cb_data); in init_buttons() 98 printk("Press \"%s\" to toggle the echo effect\n", sw0_spec.port->name); in init_buttons()
|