projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rename myself
[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..9c10a19d96c4938ba04931168fae0f8f38227526 100644
(file)
--- 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/)
* the GNU General Public License.
*
* Copyright 2003, 2004 Develer S.r.l. (http://www.develer.com/)
- * Copyright 2000 Bern
ardo
Innocenti <bernie@codewiz.org>
+ * Copyright 2000 Bern
ie
Innocenti <bernie@codewiz.org>
*
* -->
*
*
* -->
*
@@
-38,19
+38,22
@@
* \author Daniele Basile <asterix@develer.com>
*/
* \author Daniele Basile <asterix@develer.com>
*/
+#include "hw/hw_ser.h" /* Required for bus macros overrides */
+#include "hw/hw_cpu.h" /* CLOCK_FREQ */
+
+#include "cfg/cfg_ser.h"
+#include <cfg/debug.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;