/* Get the PWM interrupt flag of the PWM module. 
//! The  */
xtBoolean xPWMIntFlagGet(unsigned long ulBase, unsigned long ulChannel, unsigned long ulIntType)
/* Get the PWM interrupt flag of the PWM module. 
//! The  */
xtBoolean xPWMIntFlagGet(unsigned long ulBase, unsigned long ulChannel, unsigned long ulIntType)
{
    xASSERT((ulBase == PWMA_BASE) || (ulBase == PWMB_BASE));
    xASSERT(((ulChannel >= 0) || (ulChannel <= 3)));
    xASSERT((ulIntType == PWM_INT_CAP_BOTH) || (ulIntType == PWM_INT_CAP_FALL) ||
            (ulIntType == PWM_INT_CAP_RISE) || (ulIntType == PWM_INT_PWM));
    if (ulIntType == PWM_INT_PWM)
    {
        return ((xHWREG(ulBase + PWM_PIER) & (PWM_PIER_PWMIE0 << ulChannel)) 
                ? xtrue : xfalse);
    }
    else
    {
        return ((xHWREG(ulBase + PWM_CCR0 + (ulChannel << 1)) & 
        (PWM_CCR0_CAPIF0 << ((ulChannel % 2) ? 16 : 0))) ? xtrue : xfalse);
    }
}