X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=drv%2Fser.c;h=f18a7006769f164dff0db3c8a06a9e1fb4af01a1;hb=5f3952176a4e9a00ca8dd5ec4a6b994958f89e0a;hp=598ea8853ab6ce3bd1985f5484166a80f2a509b6;hpb=23d4877db88a9a6ba9a59a2335410cfd38867d76;p=bertos.git diff --git a/drv/ser.c b/drv/ser.c old mode 100755 new mode 100644 index 598ea885..f18a7006 --- a/drv/ser.c +++ b/drv/ser.c @@ -28,6 +28,21 @@ /*#* *#* $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. + *#* + *#* Revision 1.34 2006/11/20 15:07:40 batt + *#* Revert unneeded locked functions. + *#* *#* Revision 1.33 2006/11/17 18:15:55 batt *#* Avoid race conditions. *#* @@ -127,6 +142,9 @@ *#*/ #include "ser.h" + +#include "wdt.h" + #include "ser_p.h" #include #include @@ -192,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(); @@ -236,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(); @@ -460,26 +480,6 @@ void ser_purge(struct Serial *port) fifo_flush_locked(&port->txfifo); } -/** - * Get status of port \c port. - */ -serstatus_t ser_getstatus(struct Serial *port) -{ - serstatus_t status; - ATOMIC(status = port->status); - - return status; -} - - -/** - * Set new \c port status. - */ -void ser_setstatus(struct Serial *port, serstatus_t status) -{ - ATOMIC(port->status = status); -} - /** * Wait until all pending output is completely @@ -502,6 +502,7 @@ void ser_drain(struct Serial *ser) /* Give up timeslice to other processes. */ proc_switch(); #endif + wdt_reset(); } }