]> sigrok.org Git - libsigrok.git/commitdiff
brymen-dmm: Make serial write call block.
authorMartin Ling <redacted>
Tue, 16 Sep 2014 01:47:28 +0000 (02:47 +0100)
committerUwe Hermann <redacted>
Wed, 24 Sep 2014 21:30:00 +0000 (23:30 +0200)
This call is executed from an event handler and was previously nonblocking,
but has no partial write handling. It sends a short packet so should be OK
to block, most likely the output buffer will be empty anyway.

src/hardware/brymen-dmm/parser.c

index e4b12274d41d862b3f08c6b85182545a300e39d5..cfde37bfde5dde84906e4070b3d891c7f7e3dbea 100644 (file)
@@ -78,7 +78,7 @@ 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(serial, &cmdout, sizeof(cmdout));
+       written = serial_write_blocking(serial, &cmdout, sizeof(cmdout));
        if (written != sizeof(cmdout))
                return SR_ERR;