X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fcpu%2Farm%2Fdrv%2Fser_at91.c;h=9c10a19d96c4938ba04931168fae0f8f38227526;hb=4cc44c9888a0336b9d01121ec0b7ad95f4a76195;hp=f42af89de65cc185e05ce26321402607a5a27cf1;hpb=431fce597e801ef85c582084f13236806c5ef55e;p=bertos.git diff --git a/bertos/cpu/arm/drv/ser_at91.c b/bertos/cpu/arm/drv/ser_at91.c index f42af89d..9c10a19d 100644 --- a/bertos/cpu/arm/drv/ser_at91.c +++ b/bertos/cpu/arm/drv/ser_at91.c @@ -27,7 +27,7 @@ * the GNU General Public License. * * Copyright 2003, 2004 Develer S.r.l. (http://www.develer.com/) - * Copyright 2000 Bernardo Innocenti + * Copyright 2000 Bernie Innocenti * * --> * @@ -38,19 +38,22 @@ * \author Daniele Basile */ +#include "hw/hw_ser.h" /* Required for bus macros overrides */ +#include "hw/hw_cpu.h" /* CLOCK_FREQ */ + +#include "cfg/cfg_ser.h" +#include + + #include #include + #include #include -#include /* Required for bus macros overrides */ -#include /* CLOCK_FREQ */ - #include -#include -#include #define SERIRQ_PRIORITY 4 ///< default priority for serial irqs. @@ -792,6 +795,7 @@ static void uart0_irq_rx(void) /* Should be read before US_CRS */ ser_uart0->status |= US0_CSR & (SERRF_RXSROVERRUN | SERRF_FRAMEERROR); + US0_CR = BV(US_RSTSTA); char c = US0_RHR; struct FIFOBuffer * const rxfifo = &ser_uart0->rxfifo; @@ -856,6 +860,7 @@ static void uart1_irq_rx(void) /* Should be read before US_CRS */ ser_uart1->status |= US1_CSR & (SERRF_RXSROVERRUN | SERRF_FRAMEERROR); + US1_CR = BV(US_RSTSTA); char c = US1_RHR; struct FIFOBuffer * const rxfifo = &ser_uart1->rxfifo;