From: Uwe Hermann Date: Sun, 13 Sep 2015 21:53:55 +0000 (+0200) Subject: brymen-dmm: Fix blocking serial write timeout. X-Git-Tag: libsigrok-0.4.0~293 X-Git-Url: https://sigrok.org/gitweb/?p=libsigrok.git;a=commitdiff_plain;h=b9ed8eabfd5cc35cfc2c7b61d5d64fa18b478205 brymen-dmm: Fix blocking serial write timeout. This fixes bug #427. --- diff --git a/src/hardware/brymen-dmm/parser.c b/src/hardware/brymen-dmm/parser.c index ad2252ba..7341d381 100644 --- a/src/hardware/brymen-dmm/parser.c +++ b/src/hardware/brymen-dmm/parser.c @@ -79,7 +79,8 @@ static int bm_send_command(uint8_t command, uint8_t arg1, uint8_t arg2, /* TODO: How to compute the checksum? Hardware seems to ignore it. */ /* Request reading. */ - written = serial_write_blocking(serial, &cmdout, sizeof(cmdout), 0); + written = serial_write_blocking(serial, &cmdout, sizeof(cmdout), + serial_timeout(serial, sizeof(cmdout))); if (written != sizeof(cmdout)) return SR_ERR;