Lines Matching refs:alarm_id

155 static int encode_alarm(const struct device *dev, struct tm *time_buffer, uint8_t alarm_id)  in encode_alarm()  argument
161 if (alarm_id == ALARM0_ID) { in encode_alarm()
163 } else if (alarm_id == ALARM1_ID) { in encode_alarm()
332 static void mcp7940n_handle_interrupt(const struct device *dev, uint8_t alarm_id) in mcp7940n_handle_interrupt() argument
341 if (alarm_id == ALARM0_ID) { in mcp7940n_handle_interrupt()
344 } else if (alarm_id == ALARM1_ID) { in mcp7940n_handle_interrupt()
363 if (data->counter_handler[alarm_id]) { in mcp7940n_handle_interrupt()
364 cb = data->counter_handler[alarm_id]; in mcp7940n_handle_interrupt()
365 ticks = data->counter_ticks[alarm_id]; in mcp7940n_handle_interrupt()
373 cb(data->mcp7940n, 0, ticks, data->alarm_user_data[alarm_id]); in mcp7940n_handle_interrupt()
488 static int mcp7940n_counter_set_alarm(const struct device *dev, uint8_t alarm_id, in mcp7940n_counter_set_alarm() argument
502 if (alarm_id == ALARM0_ID) { in mcp7940n_counter_set_alarm()
505 } else if (alarm_id == ALARM1_ID) { in mcp7940n_counter_set_alarm()
526 if (alarm_id == ALARM0_ID) { in mcp7940n_counter_set_alarm()
528 } else if (alarm_id == ALARM1_ID) { in mcp7940n_counter_set_alarm()
538 encode_alarm(dev, &time_buffer, alarm_id); in mcp7940n_counter_set_alarm()
552 data->counter_handler[alarm_id] = alarm_cfg->callback; in mcp7940n_counter_set_alarm()
553 data->counter_ticks[alarm_id] = current_time; in mcp7940n_counter_set_alarm()
554 data->alarm_user_data[alarm_id] = alarm_cfg->user_data; in mcp7940n_counter_set_alarm()
562 static int mcp7940n_counter_cancel_alarm(const struct device *dev, uint8_t alarm_id) in mcp7940n_counter_cancel_alarm() argument
570 if (alarm_id == ALARM0_ID) { in mcp7940n_counter_cancel_alarm()
572 } else if (alarm_id == ALARM1_ID) { in mcp7940n_counter_cancel_alarm()