/* Configure timer capture function. This function is used to configure timer capture function.  */
void TimerCounterCfg(unsigned long ulBase, unsigned long ulCfg)
/* Configure timer capture function. This function is used to configure timer capture function.  */
void TimerCounterCfg(unsigned long ulBase, unsigned long ulCfg)
{
    xASSERT((ulBase == TIMER0_BASE) || (ulBase == TIMER1_BASE) ||
            (ulBase == TIMER2_BASE) || (ulBase == TIMER3_BASE) );
    xASSERT( (ulCfg & ~BIT_MASK(32, 2, 0)) == 0 );
    xHWREG(ulBase + TIMER_CTCR) = ulCfg;
    xHWREG(ulBase + TIMER_CCR)  = 0x00;
}