volatile bit bINT0Flag = 0;
volatile bit bINT1Flag = 0;
int main(void)
{
IT0 = 1; /* Trigger by falling edge. */
IT1 = 1;
EX0 = 1; /* Enable external interrupt. */
EX1 = 1;
EA = 1; /* Enable global Interrupts. */
while (1)
{
if (1 == bINT0Flag)
{
bINT0Flag = 0;
/* LED on */
UART_PutStr("LED on.\r\n");
}
if (1 == bINT1Flag)
{
bINT1Flag = 0;
/* LED off */
UART_PutStr("LED off.\r\n");
}
}
}