/* Enables and registers ADC interrupt handler for specified channel */
void ADCIntRegister(unsigned long ulBase, unsigned long ulChannel, void(*pfnHandler)(void))
/* Enables and registers ADC interrupt handler for specified channel */
void ADCIntRegister(unsigned long ulBase, unsigned long ulChannel, void(*pfnHandler)(void))
{
  unsigned long ulIntNo;
  ulIntNo = (ulChannel == ADC_CH_0)? INT_ADCCH0 :
            (ulChannel == ADC_CH_1)? INT_ADCCH1 :
            (ulChannel == ADC_CH_2)? INT_ADCCH2 : INT_ADCCH3;
  IntRegister(ulIntNo,pfnHandler);
  IntEnable(ulIntNo);
}