/* This function is used to delete the timer.  */
void tls_timer_destroy(u8 timer_id)
/* This function is used to delete the timer.  */
void tls_timer_destroy(u8 timer_id)
{
    if (!(wm_timer_bitmap & BIT(timer_id)))
        return;
    tls_timer_stop(timer_id);
    timer_context[timer_id].callback = NULL;
    timer_context[timer_id].arg      = NULL;
    wm_timer_bitmap &= ~BIT(timer_id);
	if (wm_timer_bitmap == 0)
	{
		tls_close_peripheral_clock(TLS_PERIPHERAL_TYPE_TIMER);
	}
    return;
}