/* Gets timer count rate. 
This function returns the number of counts per second */
tmrHw_RATE_t tmrHw_getCountRate(tmrHw_ID_t timerId)
/* Gets timer count rate. 
This function returns the number of counts per second */
tmrHw_RATE_t tmrHw_getCountRate(tmrHw_ID_t timerId)
{
	uint32_t divider = 0;
	switch (pTmrHw[timerId].Control & tmrHw_CONTROL_PRESCALE_MASK) {
	case tmrHw_CONTROL_PRESCALE_1:
		divider = 1;
		break;
	case tmrHw_CONTROL_PRESCALE_16:
		divider = 16;
		break;
	case tmrHw_CONTROL_PRESCALE_256:
		divider = 256;
		break;
	default:
		tmrHw_ASSERT(0);
	}
	if (timerId == 0 || timerId == 1) {
		return tmrHw_divide(tmrHw_LOW_RESOLUTION_CLOCK, divider);
	} else {
		return tmrHw_divide(tmrHw_HIGH_RESOLUTION_CLOCK, divider);
	}
	return 0;
}