X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=cpu%2Farm%2Fdrv%2Fser_at91.c;h=37a4f1b695470b281c1e61188d32159bd5928a3c;hb=42cfb32d63a5a136a8d17594f0ded8102a35887c;hp=9f3ed4b9f1ac64a75bb0f7237b737c29cc6b25ef;hpb=e66586db26103723ef23c549b1dd778548d1796c;p=bertos.git diff --git a/cpu/arm/drv/ser_at91.c b/cpu/arm/drv/ser_at91.c index 9f3ed4b9..37a4f1b6 100644 --- a/cpu/arm/drv/ser_at91.c +++ b/cpu/arm/drv/ser_at91.c @@ -703,18 +703,17 @@ static void uart0_irq_rx(void) /** * Serial IRQ dispatcher for USART0. */ -static void uart0_irq_dispatcher(void) __attribute__ ((naked)); +static void uart0_irq_dispatcher(void) __attribute__ ((interrupt)); static void uart0_irq_dispatcher(void) { - IRQ_ENTRY(); - if (US0_CSR & BV(US_RXRDY)) uart0_irq_rx(); if (US0_CSR & BV(US_TXRDY)) uart0_irq_tx(); - IRQ_EXIT(); + /* Inform hw that we have served the IRQ */ + AIC_EOICR = 0; } /** @@ -764,16 +763,15 @@ static void uart1_irq_rx(void) /** * Serial IRQ dispatcher for USART1. */ -static void uart1_irq_dispatcher(void) __attribute__ ((naked)); +static void uart1_irq_dispatcher(void) __attribute__ ((interrupt)); static void uart1_irq_dispatcher(void) { - IRQ_ENTRY(); - if (US1_CSR & BV(US_RXRDY)) uart1_irq_rx(); if (US1_CSR & BV(US_TXRDY)) uart1_irq_tx(); - IRQ_EXIT(); + /* Inform hw that we have served the IRQ */ + AIC_EOICR = 0; }