#if defined(__PIC24F__)
#include <p24Fxxxx.h>
#endif
#include "adc.h"

#ifdef _ADC_10B_V3

/*********************************************************************
* Function Name     : ConfigIntADC10
* Description       : This function configures ADC Interrupt.
* Parameters        : unsigned int config
* Return Value      : None
*********************************************************************/

void ConfigIntADC10(unsigned int config)
{
    /* Clearing the Interrupt Flag bit */
    IFS0bits.AD1IF = 0;
  
    /* Setting Priority */
    IPC3bits.AD1IP = config & 0x07;
  
    /* Setting the Interrupt enable bit */
    IEC0bits.AD1IE = (config & 0x08)>>3;
}

#else
#warning "Does not build on this target"
#endif
