devc->buflen = 0;
}
-
SR_PRIV int motech_lps_30x_receive_data(int fd, int revents, void *cb_data)
{
struct sr_dev_inst *sdi;
if (revents == G_IO_IN) { /* Serial data arrived. */
while (LINELEN_MAX - devc->buflen - 2 > 0) {
- len = serial_read(serial, devc->buf + devc->buflen, 1);
+ len = serial_read_nonblocking(serial, devc->buf + devc->buflen, 1);
if (len < 1)
break;