/* Get the PWM duty of the PWM module. 
The  */
unsigned long xPWMDutyGet(unsigned long ulBase, unsigned long ulChannel)
/* Get the PWM duty of the PWM module. 
The  */
unsigned long xPWMDutyGet(unsigned long ulBase, unsigned long ulChannel)
{
    unsigned long ulCMRData;
    unsigned long ulCNRData;
    xASSERT(ulBase == PWMA_BASE);
    xASSERT(((ulChannel >= 0) || (ulChannel <= 1)));
    ulCNRData = (xHWREG(ulBase + PWM_CNR0 +(ulChannel * 12)));
    ulCMRData = (xHWREG(ulBase + PWM_CMR0 +(ulChannel * 12)));
    ulChannel = (ulCMRData + 1) * 100 / (ulCNRData + 1);
    return ulChannel;
}