Lines Matching refs:p_timer
55 static void bta_dm_pm_stop_timer_by_index(tBTA_PM_TIMER* p_timer,
269 static void bta_dm_pm_start_timer(tBTA_PM_TIMER* p_timer, uint8_t timer_idx, in bta_dm_pm_start_timer() argument
274 p_timer->in_use = true; in bta_dm_pm_start_timer()
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()
298 static void bta_dm_pm_stop_timer_by_index(tBTA_PM_TIMER* p_timer, 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()
308 CHECK(p_timer->in_use); in bta_dm_pm_stop_timer_by_index()
309 CHECK(p_timer->active > 0); 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()
314 p_timer->active--; in bta_dm_pm_stop_timer_by_index()
315 if (p_timer->active == 0) p_timer->in_use = false; in bta_dm_pm_stop_timer_by_index()
318 alarm_cancel(p_timer->timer[timer_idx]); in bta_dm_pm_stop_timer_by_index()