serial_stream_detect: Make read nonblocking.
This code implements its own waiting based on baudrate, so the read itself should be nonblocking. In general it will have been already, since drivers almost universally use the SERIAL_NONBLOCK flag.
This commit is contained in:
parent
2fe6210af6
commit
18e4d5bc45
|
@ -618,7 +618,7 @@ SR_PRIV int serial_stream_detect(struct sr_serial_dev_inst *serial,
|
|||
|
||||
i = ibuf = len = 0;
|
||||
while (ibuf < maxlen) {
|
||||
len = serial_read(serial, &buf[ibuf], 1);
|
||||
len = serial_read_nonblocking(serial, &buf[ibuf], 1);
|
||||
if (len > 0) {
|
||||
ibuf += len;
|
||||
} else if (len == 0) {
|
||||
|
|
Loading…
Reference in New Issue