From: batt Date: Mon, 29 Jan 2007 11:30:30 +0000 (+0000) Subject: Reimplement ser_clearstatus as a macro. X-Git-Tag: 1.0.0~500 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=166a481f3faddfa24e3f0e9149a56d8d1e2baefd;p=bertos.git Reimplement ser_clearstatus as a macro. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@741 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/drv/ser.c b/drv/ser.c index 15bd2b56..5b9f2a36 100755 --- a/drv/ser.c +++ b/drv/ser.c @@ -28,6 +28,9 @@ /*#* *#* $Log$ + *#* 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. *#* @@ -456,11 +459,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. diff --git a/drv/ser.h b/drv/ser.h index d184ad88..ba8eab97 100755 --- a/drv/ser.h +++ b/drv/ser.h @@ -14,6 +14,9 @@ /*#* *#* $Log$ + *#* Revision 1.36 2007/01/29 11:30:30 batt + *#* Reimplement ser_clearstatus as a macro. + *#* *#* Revision 1.35 2007/01/27 20:47:12 batt *#* Add clear status. *#* @@ -306,8 +309,6 @@ 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); @@ -318,6 +319,7 @@ extern void ser_close(struct Serial *port); */ #define ser_getstatus(h) ((h)->status) #define ser_setstatus(h, x) ((h)->status = (x)) +#define ser_clearstatus(h) ser_setstatus(h, 0) /* \} */ #endif /* DRV_SER_H */