dm36x: IRQ dispatcher, extra brackets required inside macro.

This commit is contained in:
Kelvin Lawson
2013-09-17 20:36:25 +01:00
parent e73d2a533c
commit d9b901c2b4

View File

@@ -178,7 +178,7 @@ __interrupt_dispatcher (void)
{
/* Reload timer and enable interupts */
TIMER0_REG(DM36X_TIMER_PRD12) = (TIMER_CLK / SYSTEM_TICKS_PER_SEC) - 1; /* Set period to 100 ticks per second (PRD12) */
TIMER0_REG(DM36X_TIMER_INTCTL_STAT) = (1 << 1) | (1 << 0); /* Enable/ack Compare/Match interrupt for Timer 1:2 */
TIMER0_REG(DM36X_TIMER_INTCTL_STAT) |= (1 << 1) | (1 << 0); /* Enable/ack Compare/Match interrupt for Timer 1:2 */
/*
* Let the Atomthreads kernel know we're about to enter an OS-aware
@@ -191,10 +191,15 @@ __interrupt_dispatcher (void)
/* Call the interrupt exit routine */
atomIntExit(TRUE);
/* Ack the interrupt */
INTC_REG((vector >= 32) ? DM36X_INTC_IRQ1 : DM36X_INTC_IRQ0) = (1 << (vector >= 32) ? (vector - 32) : vector);
}
else
{
/* Unexpected vector */
uart_write_halt ("Unexpected IRQ vector\n");
}
/* Ack the interrupt */
INTC_REG(((vector >= 32) ? DM36X_INTC_IRQ1 : DM36X_INTC_IRQ0)) = (1 << ((vector >= 32) ? (vector - 32) : vector));
}
}