From: batt Date: Sat, 27 Jan 2007 20:47:12 +0000 (+0000) Subject: Add clear status. X-Git-Tag: 1.0.0~503 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=ce73a2884628b0beac1f41f403bf0df9096ab38c;p=bertos.git Add clear status. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@738 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/drv/ser.c b/drv/ser.c index e4e4c337..15bd2b56 100755 --- a/drv/ser.c +++ b/drv/ser.c @@ -28,6 +28,9 @@ /*#* *#* $Log$ + *#* 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. *#* @@ -453,6 +456,11 @@ 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. diff --git a/drv/ser.h b/drv/ser.h index 27d49b40..d184ad88 100755 --- a/drv/ser.h +++ b/drv/ser.h @@ -14,6 +14,9 @@ /*#* *#* $Log$ + *#* 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. *#* @@ -303,6 +306,8 @@ extern void ser_resync(struct Serial *port, mtime_t delay); extern void ser_purge(struct Serial *port); extern void ser_drain(struct Serial *port); +extern void ser_clearstatus(struct Serial *port); + extern struct Serial *ser_open(unsigned int unit); extern void ser_close(struct Serial *port);