Home
last modified time | relevance | path

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

/Zephyr-latest/samples/drivers/i2s/echo/src/
Dmain.c39 static struct gpio_dt_spec sw1_spec = GPIO_DT_SPEC_GET(SW1_NODE, gpios); variable
104 if (!gpio_is_ready_dt(&sw1_spec)) { in init_buttons()
105 printk("%s is not ready\n", sw1_spec.port->name); in init_buttons()
109 ret = gpio_pin_configure_dt(&sw1_spec, GPIO_INPUT); in init_buttons()
112 sw1_spec.port->name, sw1_spec.pin, ret); in init_buttons()
116 ret = gpio_pin_interrupt_configure_dt(&sw1_spec, in init_buttons()
120 sw1_spec.port->name, sw1_spec.pin, ret); in init_buttons()
124 gpio_init_callback(&sw1_cb_data, sw1_handler, BIT(sw1_spec.pin)); in init_buttons()
125 gpio_add_callback(sw1_spec.port, &sw1_cb_data); in init_buttons()
126 printk("Press \"%s\" to stop/restart I2S streams\n", sw1_spec.port->name); in init_buttons()