projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix hw include. Reformat.
[bertos.git]
/
bertos
/
cpu
/
arm
/
drv
/
ser_at91.c
diff --git
a/bertos/cpu/arm/drv/ser_at91.c
b/bertos/cpu/arm/drv/ser_at91.c
index f42af89de65cc185e05ce26321402607a5a27cf1..bc1555c25c75434dd638cef0e2430f52c996f974 100644
(file)
--- a/
bertos/cpu/arm/drv/ser_at91.c
+++ b/
bertos/cpu/arm/drv/ser_at91.c
@@
-38,19
+38,22
@@
* \author Daniele Basile <asterix@develer.com>
*/
* \author Daniele Basile <asterix@develer.com>
*/
+#include "hw_ser.h" /* Required for bus macros overrides */
+#include "hw_cpu.h" /* CLOCK_FREQ */
+
+#include <cfg/debug.h>
+
+#include <appconfig.h>
+
#include <io/arm.h>
#include <cpu/attr.h>
#include <io/arm.h>
#include <cpu/attr.h>
+
#include <drv/ser.h>
#include <drv/ser_p.h>
#include <drv/ser.h>
#include <drv/ser_p.h>
-#include <hw/hw_ser.h> /* Required for bus macros overrides */
-#include <hw/hw_cpu.h> /* CLOCK_FREQ */
-
#include <mware/fifobuf.h>
#include <mware/fifobuf.h>
-#include <cfg/debug.h>
-#include <appconfig.h>
#define SERIRQ_PRIORITY 4 ///< default priority for serial irqs.
#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);
/* 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;
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);
/* 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;
char c = US1_RHR;
struct FIFOBuffer * const rxfifo = &ser_uart1->rxfifo;