/* Select The Timer counter detect phase. This function is to select The Timer counter detect phase.  */
void xTimerCounterDetectPhaseSelect(unsigned long ulBase, unsigned long ulChannel, unsigned long ulPhase)
/* Select The Timer counter detect phase. This function is to select The Timer counter detect phase.  */
void xTimerCounterDetectPhaseSelect(unsigned long ulBase, unsigned long ulChannel, unsigned long ulPhase)
{
    (void) ulChannel;
    xASSERT( (ulBase == xTIMER0_BASE) ||
             (ulBase == xTIMER1_BASE) ||
             (ulBase == xTIMER2_BASE) ||
             (ulBase == xTIMER3_BASE) );
    xASSERT( (ulChannel == xTIMER0_BASE) ||
             (ulChannel == xTIMER1_BASE) );
    xASSERT( (ulPhase == xTIMER_COUNTER_RISING) ||
             (ulPhase == xTIMER_COUNTER_FALLING) );
    if(ulPhase == xTIMER_COUNTER_FALLING)
    {
        xHWREG(ulBase + TIMER_CTCR) = 0x10;
    }
    else
    {
        xHWREG(ulBase + TIMER_CTCR) = 0x01;
    }
}