|
|
@@ -638,6 +638,27 @@ UINT32 bta_sys_get_remaining_ticks(TIMER_LIST_ENT *p_target_tle)
|
|
|
}
|
|
|
|
|
|
|
|
|
+/*******************************************************************************
|
|
|
+**
|
|
|
+** Function bta_sys_timer_is_active
|
|
|
+**
|
|
|
+** Description Get info of one-shot timer is active or not.
|
|
|
+**
|
|
|
+** Returns true if timer is exist and active, false otherwise.
|
|
|
+**
|
|
|
+*******************************************************************************/
|
|
|
+BOOLEAN bta_sys_timer_is_active(TIMER_LIST_ENT *p_tle)
|
|
|
+{
|
|
|
+ assert(p_tle != NULL);
|
|
|
+
|
|
|
+ osi_alarm_t *alarm = hash_map_get(bta_alarm_hash_map, p_tle);
|
|
|
+ if (alarm != NULL && osi_alarm_is_active(alarm)) {
|
|
|
+ return TRUE;
|
|
|
+ }
|
|
|
+
|
|
|
+ return FALSE;
|
|
|
+}
|
|
|
+
|
|
|
/*******************************************************************************
|
|
|
**
|
|
|
** Function bta_sys_stop_timer
|