when flag is RT_DEVICE_FLAG_STREAM, paser '\n' break!
@@ -221,8 +221,11 @@ rt_inline int _serial_poll_rx(struct rt_serial_device *serial, rt_uint8_t *data,
*data = ch;
data ++; length --;
+ if(serial->parent.open_flag & RT_DEVICE_FLAG_STREAM)
+ {
if (ch == '\n') break;
}
+ }
return size - length;
}
