X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Ftondaj-sl-814%2Fprotocol.c;fp=src%2Fhardware%2Ftondaj-sl-814%2Fprotocol.c;h=44d12ec4f40866f61e477493d6c8974cac93ea26;hb=32c45845f70c41137cbfa7e772bf79791e269895;hp=a3696b69e79eb1b5e394f6e4dc35d708b8e693b4;hpb=428d79a810fd4e2b905faf06f0b2e6cadaed82fe;p=libsigrok.git diff --git a/src/hardware/tondaj-sl-814/protocol.c b/src/hardware/tondaj-sl-814/protocol.c index a3696b69..44d12ec4 100644 --- a/src/hardware/tondaj-sl-814/protocol.c +++ b/src/hardware/tondaj-sl-814/protocol.c @@ -134,7 +134,8 @@ SR_PRIV int tondaj_sl_814_receive_data(int fd, int revents, void *cb_data) buf[2] = 0x0d; sr_spew("Sending init command: %02x %02x %02x.", buf[0], buf[1], buf[2]); - if ((ret = serial_write_blocking(serial, buf, 3, 0)) < 0) { + if ((ret = serial_write_blocking(serial, buf, 3, + serial_timeout(serial, 3))) < 0) { sr_err("Error sending init command: %d.", ret); return FALSE; } @@ -160,7 +161,8 @@ SR_PRIV int tondaj_sl_814_receive_data(int fd, int revents, void *cb_data) buf[2] = 0x0d; sr_spew("Sending data request command: %02x %02x %02x.", buf[0], buf[1], buf[2]); - if ((ret = serial_write_blocking(serial, buf, 3, 0)) < 0) { + if ((ret = serial_write_blocking(serial, buf, 3, + serial_timeout(serial, 3))) < 0) { sr_err("Error sending request command: %d.", ret); return FALSE; }