Skip to content

Commit

Permalink
bugfix: interrupt driver
Browse files Browse the repository at this point in the history
  • Loading branch information
sjohann81 committed Mar 14, 2019
1 parent e6baa9d commit 7bd185a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions software/lib/interrupt.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,6 @@ void irq0_handler(void)

do {
if (irq & 0x1) {
/* call irq handler */
gpio_vector[i]();
/* toggle interrupt cause */
switch (i) {
case 0:
Expand All @@ -202,6 +200,8 @@ void irq0_handler(void)
default:
break;
};
/* call irq handler */
gpio_vector[i]();
}
irq >>= 1;
++i;
Expand All @@ -212,10 +212,10 @@ void irq0_handler(void)

do {
if (irq & 0x1) {
/* call irq handler */
timer_vector[i]();
/* toggle interrupt cause */
TIMERCAUSEINV ^= (irq & 0x1) << i;
/* call irq handler */
timer_vector[i]();
}
irq >>= 1;
++i;
Expand All @@ -239,11 +239,11 @@ void irq_enable(void)
{
#ifndef DEBUG_PORT
uint16_t d;

d = (uint16_t)(CPU_SPEED / 57600);
UART0DIV = d;
UART0 = 0;

PAALTCFG0 |= MASK_UART0;
#endif
/* enable mask for Segment 0 (tied to IRQ0 line) */
Expand Down

0 comments on commit 7bd185a

Please sign in to comment.