/* Determines whether the PWM is busy or not.  */
xtBoolean PWMIsBusy(unsigned long ulBase, unsigned long ulChannel)
/* Determines whether the PWM is busy or not.  */
xtBoolean PWMIsBusy(unsigned long ulBase, unsigned long ulChannel)
{
	unsigned long ulChannelTem = (ulBase == PWMA_BASE) ? ulChannel : (ulChannel - 4);
    return (xHWREG(ulBase + PWM_SYNCBUSY0 + ulChannelTem * 4) & PWM_SYNCBUSYx_S_BUSY);
}