/* Get the PWM duty of the PWM module. 
The  */
unsigned long PWMDutyGet(unsigned long ulBase, unsigned long ulChannel)
/* Get the PWM duty of the PWM module. 
The  */
unsigned long PWMDutyGet(unsigned long ulBase, unsigned long ulChannel)
{
    unsigned long ulCMRData;
    unsigned long ulCNRData;
    xASSERT(PWMBaseValid(ulBase));
    xASSERT((ulChannel >= 0) || (ulChannel <= 3));
    ulCNRData = PWMARRGet(ulBase);
    ulCMRData = xHWREG(ulBase + TIMER_CCR1 + ulChannel * 4);
    ulChannel = (ulCMRData + 1) * 100 / (ulCNRData + 1);
    return ulChannel;
}