X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=drv%2Fser.c;h=10757d0e3b91b8f0b0db6f8f05bff6d215c8df6f;hb=3110ae0831fa4ba081c9206663390e21c7a4f78a;hp=15bd2b568813f34357dbc19a2f7653165cf270f2;hpb=ce73a2884628b0beac1f41f403bf0df9096ab38c;p=bertos.git diff --git a/drv/ser.c b/drv/ser.c old mode 100755 new mode 100644 index 15bd2b56..10757d0e --- a/drv/ser.c +++ b/drv/ser.c @@ -1,9 +1,34 @@ /** * \file * * * \brief Buffered serial I/O driver @@ -28,6 +53,15 @@ /*#* *#* $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. + *#* *#* Revision 1.35 2007/01/27 20:47:12 batt *#* Add clear status. *#* @@ -133,6 +167,9 @@ *#*/ #include "ser.h" + +#include "wdt.h" + #include "ser_p.h" #include #include @@ -198,6 +235,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(); @@ -242,6 +280,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(); @@ -456,11 +495,6 @@ void ser_setparity(struct Serial *port, int 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. @@ -493,6 +527,7 @@ void ser_drain(struct Serial *ser) /* Give up timeslice to other processes. */ proc_switch(); #endif + wdt_reset(); } }