Lines Matching +full:data +full:- +full:pin +full:- +full:start
4 * SPDX-License-Identifier: Apache-2.0
48 /* start a secondary one-shot ticker after ticks_delay, in time_slot_delay()
57 ticks_delay, /* one-shot delayed timeout */ in time_slot_delay()
82 const struct coex_ticker_config *config = dev->config; in time_slot_callback_work()
87 /* Read grant pin */ in time_slot_callback_work()
88 if (gpio_pin_get_dt(&config->grant_spec) == 0) { in time_slot_callback_work()
94 /* Schedule another check for grant pin and abort any events scheduled */ in time_slot_callback_work()
104 /* Enable coex pin interrupt */ in time_slot_callback_work()
105 gpio_pin_interrupt_configure_dt(&config->grant_spec, GPIO_INT_EDGE_TO_INACTIVE); in time_slot_callback_work()
133 const struct coex_ticker_config *cfg = dev->config; in coex_ticker_grant_start()
138 HAL_TICKER_US_TO_TICKS(cfg->grant_delay_us - COEX_RADIO_WORK_DELAY_US), in coex_ticker_grant_start()
144 return -EBUSY; in coex_ticker_grant_start()
156 struct coex_ticker_data *data = CONTAINER_OF(cb, struct coex_ticker_data, grant_irq_cb); in coex_ticker_grant_irq_handler() local
157 const struct coex_ticker_config *config = data->dev->config; in coex_ticker_grant_irq_handler()
163 gpio_pin_interrupt_configure_dt(&config->grant_spec, GPIO_INT_DISABLE); in coex_ticker_grant_irq_handler()
164 coex_ticker_grant_start(data->dev); in coex_ticker_grant_irq_handler()
170 const struct coex_ticker_config *config = dev->config; in coex_ticker_init()
171 struct coex_ticker_data *data = dev->data; in coex_ticker_init() local
174 data->dev = dev; in coex_ticker_init()
177 res = gpio_pin_configure_dt(&config->grant_spec, GPIO_INPUT); in coex_ticker_init()
182 gpio_init_callback(&data->grant_irq_cb, in coex_ticker_init()
184 BIT(config->grant_spec.pin)); in coex_ticker_init()
186 res = gpio_add_callback(config->grant_spec.port, &data->grant_irq_cb); in coex_ticker_init()
191 res = gpio_pin_interrupt_configure_dt(&config->grant_spec, GPIO_INT_EDGE_TO_INACTIVE); in coex_ticker_init()
203 static struct coex_ticker_data data; variable
205 DEVICE_DT_INST_DEFINE(0, &coex_ticker_init, NULL, &data, &config,