/* Configures external clock mode of the GPTM. Used ETI as the clock source. 
The  */
void TimerETIConfigure(unsigned long ulBase, unsigned long ulEXIPrescale, unsigned long ulEXIPolarity, unsigned char ucFilter)
/* Configures external clock mode of the GPTM. Used ETI as the clock source. 
The  */
void TimerETIConfigure(unsigned long ulBase, unsigned long ulEXIPrescale, unsigned long ulEXIPolarity, unsigned char ucFilter)
{
    xASSERT((ulBase == TIMER1_BASE) || (ulBase == TIMER0_BASE));
    xASSERT((ulEXIPrescale == TIMER_ETIPSC_OFF) || 
            (ulEXIPrescale == TIMER_ETIPSC_2) ||
            (ulEXIPrescale == TIMER_ETIPSC_4) ||
            (ulEXIPrescale == TIMER_ETIPSC_8));
    xASSERT((ulEXIPolarity == TIMER_ETIPOL_NONINVERTED) ||
            (ulEXIPolarity == TIMER_ETIPOL_INVERTED));
    xASSERT((ucFilter >= 0) && (ucFilter <= 0x0F));
    xHWREG(ulBase + TIMER_TRCFR) &= ~(TIMER_TRCFR_ETIPOL | TIMER_TRCFR_ETIPSC_M |
	                                  TIMER_TRCFR_ETF_M);
    xHWREG(ulBase + TIMER_TRCFR) |= (ulEXIPrescale | ulEXIPolarity | 
                                     ((unsigned long)ucFilter << 8));
}