• Home
  • Raw
  • Download

Lines Matching refs:timer_idx

56                                           uint8_t timer_idx);
212 const uint8_t timer_idx = bta_pm_action_to_timer_idx(power_mode); in bta_dm_pm_stop_timer_by_mode() local
213 if (timer_idx == BTA_DM_PM_MODE_TIMER_MAX) return; in bta_dm_pm_stop_timer_by_mode()
218 if (bta_dm_cb.pm_timer[i].srvc_id[timer_idx] != BTA_ID_MAX) { in bta_dm_pm_stop_timer_by_mode()
219 bta_dm_pm_stop_timer_by_index(&bta_dm_cb.pm_timer[i], timer_idx); in bta_dm_pm_stop_timer_by_mode()
226 bta_dm_cb.pm_timer[i].pm_action[timer_idx] = power_mode; in bta_dm_pm_stop_timer_by_mode()
269 static void bta_dm_pm_start_timer(tBTA_PM_TIMER* p_timer, uint8_t timer_idx, in bta_dm_pm_start_timer() argument
276 if (p_timer->srvc_id[timer_idx] == BTA_ID_MAX) p_timer->active++; in bta_dm_pm_start_timer()
278 if (p_timer->pm_action[timer_idx] < pm_action) in bta_dm_pm_start_timer()
279 p_timer->pm_action[timer_idx] = pm_action; in bta_dm_pm_start_timer()
281 p_timer->srvc_id[timer_idx] = srvc_id; in bta_dm_pm_start_timer()
284 alarm_set_on_mloop(p_timer->timer[timer_idx], timeout_ms, in bta_dm_pm_start_timer()
285 bta_dm_pm_timer_cback, p_timer->timer[timer_idx]); in bta_dm_pm_start_timer()
299 uint8_t timer_idx) { in bta_dm_pm_stop_timer_by_index() argument
300 if ((p_timer == NULL) || (timer_idx >= BTA_DM_PM_MODE_TIMER_MAX)) return; in bta_dm_pm_stop_timer_by_index()
304 if (p_timer->srvc_id[timer_idx] == BTA_ID_MAX) { in bta_dm_pm_stop_timer_by_index()
311 p_timer->srvc_id[timer_idx] = BTA_ID_MAX; in bta_dm_pm_stop_timer_by_index()
318 alarm_cancel(p_timer->timer[timer_idx]); in bta_dm_pm_stop_timer_by_index()
520 uint8_t timer_idx, available_timer = BTA_DM_PM_MODE_TIMER_MAX; in bta_dm_pm_set_mode() local
608 timer_idx = bta_pm_action_to_timer_idx(pm_action); in bta_dm_pm_set_mode()
609 if (timer_idx != BTA_DM_PM_MODE_TIMER_MAX) { in bta_dm_pm_set_mode()
611 alarm_get_remaining_ms(bta_dm_cb.pm_timer[i].timer[timer_idx]); in bta_dm_pm_set_mode()
621 bta_dm_pm_stop_timer_by_index(&bta_dm_cb.pm_timer[i], timer_idx); in bta_dm_pm_set_mode()
622 bta_dm_pm_start_timer(&bta_dm_cb.pm_timer[i], timer_idx, timeout_ms, in bta_dm_pm_set_mode()
636 timer_idx = bta_pm_action_to_timer_idx(pm_action); in bta_dm_pm_set_mode()
637 if (timer_idx != BTA_DM_PM_MODE_TIMER_MAX) { in bta_dm_pm_set_mode()
638 bta_dm_pm_start_timer(&bta_dm_cb.pm_timer[available_timer], timer_idx, in bta_dm_pm_set_mode()