Lines Matching refs:chan_id
52 uint8_t chan_id, uint32_t ticks, in counter_alarm_callback() argument
59 if (data->callback[chan_id]) { in counter_alarm_callback()
60 data->callback[chan_id](wdt_dev, chan_id); in counter_alarm_callback()
63 if (data->flags[chan_id] & WDT_FLAG_RESET_SOC) { in counter_alarm_callback()
69 static int timeout_set(const struct device *dev, int chan_id, bool cancel) in timeout_set() argument
76 .ticks = data->timeout[chan_id], in timeout_set()
82 int err = counter_cancel_channel_alarm(counter, chan_id); in timeout_set()
89 return counter_set_channel_alarm(counter, chan_id, &alarm_cfg); in timeout_set()
98 int chan_id; in wdt_counter_install_timeout() local
126 chan_id = data->alloc_cnt; in wdt_counter_install_timeout()
127 data->timeout[chan_id] = timeout_ticks; in wdt_counter_install_timeout()
128 data->callback[chan_id] = cfg->callback; in wdt_counter_install_timeout()
129 data->flags[chan_id] = cfg->flags; in wdt_counter_install_timeout()
131 int err = timeout_set(dev, chan_id, false); in wdt_counter_install_timeout()
137 return chan_id; in wdt_counter_install_timeout()
140 static int wdt_counter_feed(const struct device *dev, int chan_id) in wdt_counter_feed() argument
144 if (chan_id > counter_get_num_of_channels(config->counter)) { in wdt_counter_feed()
149 return timeout_set(dev, chan_id, true); in wdt_counter_feed()