projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add comments. Set static prog_flush function.
[bertos.git]
/
drv
/
ser.c
diff --git
a/drv/ser.c
b/drv/ser.c
index 15bd2b568813f34357dbc19a2f7653165cf270f2..8c95a9d774c85b1c107e165d7a5867be5033f8fc 100755
(executable)
--- a/
drv/ser.c
+++ b/
drv/ser.c
@@
-28,6
+28,12
@@
/*#*
*#* $Log$
/*#*
*#* $Log$
+ *#* Revision 1.37 2007/06/07 14:35:12 batt
+ *#* Merge from project_ks.
+ *#*
+ *#* Revision 1.36 2007/01/29 11:30:29 batt
+ *#* Reimplement ser_clearstatus as a macro.
+ *#*
*#* Revision 1.35 2007/01/27 20:47:12 batt
*#* Add clear status.
*#*
*#* Revision 1.35 2007/01/27 20:47:12 batt
*#* Add clear status.
*#*
@@
-133,6
+139,11
@@
*#*/
#include "ser.h"
*#*/
#include "ser.h"
+
+#if CONFIG_WATCHDOG
+ #include "wdt.h"
+#endif
+
#include "ser_p.h"
#include <mware/formatwr.h>
#include <cfg/debug.h>
#include "ser_p.h"
#include <mware/formatwr.h>
#include <cfg/debug.h>
@@
-198,6
+209,9
@@
int ser_putchar(int c, struct Serial *port)
/* Attende finche' il buffer e' pieno... */
do
{
/* Attende finche' il buffer e' pieno... */
do
{
+#if CONFIG_WATCHDOG
+ wdt_reset();
+#endif
#if CONFIG_KERNEL && CONFIG_KERN_SCHED
/* Give up timeslice to other processes. */
proc_switch();
#if CONFIG_KERNEL && CONFIG_KERN_SCHED
/* Give up timeslice to other processes. */
proc_switch();
@@
-242,6
+256,9
@@
int ser_getchar(struct Serial *port)
/* Wait while buffer is empty */
do
{
/* Wait while buffer is empty */
do
{
+#if CONFIG_WATCHDOG
+ wdt_reset();
+#endif
#if CONFIG_KERNEL && CONFIG_KERN_SCHED
/* Give up timeslice to other processes. */
proc_switch();
#if CONFIG_KERNEL && CONFIG_KERN_SCHED
/* Give up timeslice to other processes. */
proc_switch();
@@
-456,11
+473,6
@@
void ser_setparity(struct Serial *port, int parity)
port->hw->table->setParity(port->hw, parity);
}
port->hw->table->setParity(port->hw, parity);
}
-void ser_clearstatus(struct Serial *port)
-{
- ser_setstatus(port, 0);
-}
-
/**
* Flush both the RX and TX buffers.
/**
* Flush both the RX and TX buffers.
@@
-493,6
+505,9
@@
void ser_drain(struct Serial *ser)
/* Give up timeslice to other processes. */
proc_switch();
#endif
/* Give up timeslice to other processes. */
proc_switch();
#endif
+ #if CONFIG_WATCHDOG
+ wdt_reset();
+ #endif
}
}
}
}