Sistema l'errore da me commesso in fase di conversione...
[bertos.git] / drv / ser.c
old mode 100755 (executable)
new mode 100644 (file)
index 5b9f2a3..f18a700
--- a/drv/ser.c
+++ b/drv/ser.c
 
 /*#*
  *#* $Log$
+ *#* Revision 1.38  2007/06/21 17:07:21  batt
+ *#* Remove CONFIG_WATCHDOG stuff: watchdog macros expand to nothing when wdt is active.
+ *#*
+ *#* 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.
  *#*
  *#*/
 
 #include "ser.h"
+
+#include "wdt.h"
+
 #include "ser_p.h"
 #include <mware/formatwr.h>
 #include <cfg/debug.h>
@@ -201,6 +210,7 @@ int ser_putchar(int c, struct Serial *port)
                /* Attende finche' il buffer e' pieno... */
                do
                {
+                       wdt_reset();
 #if CONFIG_KERNEL && CONFIG_KERN_SCHED
                        /* Give up timeslice to other processes. */
                        proc_switch();
@@ -245,6 +255,7 @@ int ser_getchar(struct Serial *port)
                /* Wait while buffer is empty */
                do
                {
+                       wdt_reset();
 #if CONFIG_KERNEL && CONFIG_KERN_SCHED
                        /* Give up timeslice to other processes. */
                        proc_switch();
@@ -491,6 +502,7 @@ void ser_drain(struct Serial *ser)
                        /* Give up timeslice to other processes. */
                        proc_switch();
                #endif
+                       wdt_reset();
        }
 }