Lines Matching refs:chan_id
218 static int atcpit100_set_alarm(const struct device *dev, uint8_t chan_id, in atcpit100_set_alarm() argument
227 if (chan_id >= CH_NUM_PER_COUNTER) { in atcpit100_set_alarm()
235 if (data->ch_data[chan_id].alarm_callback) { in atcpit100_set_alarm()
252 data->ch_data[chan_id].alarm_callback = alarm_cfg->callback; in atcpit100_set_alarm()
253 data->ch_data[chan_id].alarm_user_data = alarm_cfg->user_data; in atcpit100_set_alarm()
275 data->ch_data[chan_id].alarm_callback = NULL; in atcpit100_set_alarm()
294 sys_write32((reg - 1), PIT_CH_RELD(dev, chan_id)); in atcpit100_set_alarm()
298 reg |= TIMER0_CHANNEL(chan_id); in atcpit100_set_alarm()
303 reg |= TIMER0_CHANNEL(chan_id); in atcpit100_set_alarm()
312 static int atcpit100_cancel_alarm(const struct device *dev, uint8_t chan_id) in atcpit100_cancel_alarm() argument
318 if (chan_id >= CH_NUM_PER_COUNTER) { in atcpit100_cancel_alarm()
326 reg &= ~TIMER0_CHANNEL(chan_id); in atcpit100_cancel_alarm()
331 reg &= ~TIMER0_CHANNEL(chan_id); in atcpit100_cancel_alarm()
335 sys_write32(TIMER0_CHANNEL(chan_id), PIT_ISTA(dev)); in atcpit100_cancel_alarm()
337 data->ch_data[chan_id].alarm_callback = NULL; in atcpit100_cancel_alarm()