mirror of
https://github.com/kelvinlawson/atomthreads.git
synced 2026-01-11 18:33:16 +01:00
dm36x: IRQ dispatcher, extra brackets required inside macro.
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user