/* Use a timer to perform a busy wait delay for a number of usecs.  */
void tmrHw_udelay(tmrHw_ID_t timerId, unsigned long usecs)
/* Use a timer to perform a busy wait delay for a number of usecs.  */
void tmrHw_udelay(tmrHw_ID_t timerId, unsigned long usecs)
{
	tmrHw_RATE_t usec_tick_rate;
	tmrHw_COUNT_t start_time;
	tmrHw_COUNT_t delta_time;
	start_time = tmrHw_GetCurrentCount(timerId);
	usec_tick_rate = tmrHw_divide(tmrHw_getCountRate(timerId), 1000000);
	delta_time = usecs * usec_tick_rate;
	while (delta_time > (tmrHw_GetCurrentCount(timerId) - start_time))
		;
}