ps_arunkumar
Member level 1
I got a program with my LPC2148 development kit. The program is for enabling interrupt on the controller. I couldn't understand the following piece of code. Also, the following line, confuses me what is it doing. I have attached the whole program. Please help me what is the line following line do and brief explanation is really appreciated.
VICIntSelect &= ~ VIC_BIT(VIC_EINT2);
VICIntSelect &= ~ VIC_BIT(VIC_EINT2);
Code:
void init_ext_interrupt()
{
EXTMODE = EXTMODE_EXTMODE2_MASK;
EXTPOLAR &= ~EXTPOLAR_EXTPOLAR2_MASK;
PINSEL0 = (PINSEL0 & ~(3 << 30)) | (1 << 31);
/* initialize the interrupt vector */
VICIntSelect &= ~ VIC_BIT(VIC_EINT2); // EINT0 selected as IRQ
VICVectAddr5 = (unsigned int)Ext_ISR; // address of the ISR
VICVectCntl5 = VIC_ENABLE | VIC_EINT2;
VICIntEnable = VIC_BIT(VIC_EINT2); // EINT0 interrupt enabled
EXTINT &= ~EXTINT_EINT2_MASK;
}