diff options
| author | bernard <[email protected]> | 2015-01-04 12:25:20 +0800 |
|---|---|---|
| committer | bernard <[email protected]> | 2015-01-04 12:25:20 +0800 |
| commit | a6251a439e7385f531cf0567082f3a778f2f43e9 (patch) | |
| tree | 88beb74e831e22ff3afcfe97c94023967272085e /components/drivers | |
| parent | 46bca6f84a18576bf134bd184e825e905f83802d (diff) | |
Use open_flag for serial device.
Diffstat (limited to 'components/drivers')
| -rw-r--r-- | components/drivers/serial/serial.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/components/drivers/serial/serial.c b/components/drivers/serial/serial.c index f04b1df4f4..bcdd4db519 100644 --- a/components/drivers/serial/serial.c +++ b/components/drivers/serial/serial.c @@ -26,6 +26,7 @@ * 2013-02-20 bernard use RT_SERIAL_RB_BUFSZ to define * the size of ring buffer. * 2014-07-10 bernard rewrite serial framework + * 2014-12-31 bernard use open_flag for poll_tx stream mode. */ #include <rthw.h> @@ -67,7 +68,7 @@ rt_inline int _serial_poll_tx(struct rt_serial_device *serial, const rt_uint8_t * to be polite with serial console add a line feed * to the carriage return character */ - if (*data == '\n' && (serial->parent.flag & RT_DEVICE_FLAG_STREAM)) + if (*data == '\n' && (serial->parent.open_flag & RT_DEVICE_FLAG_STREAM)) { serial->ops->putc(serial, '\r'); } |
