X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fhardware%2Fbrymen-dmm%2Fparser.c;h=aaa2c3f48f5295ba1be973c50d2114ea6d6a2041;hb=ce19d4c6157b2998aa88a2f32670dd7bdcca02e8;hp=cfde37bfde5dde84906e4070b3d891c7f7e3dbea;hpb=776313d997f1748ff89cb073f45e3560ad661136;p=libsigrok.git
diff --git a/src/hardware/brymen-dmm/parser.c b/src/hardware/brymen-dmm/parser.c
index cfde37bf..aaa2c3f4 100644
--- a/src/hardware/brymen-dmm/parser.c
+++ b/src/hardware/brymen-dmm/parser.c
@@ -17,6 +17,7 @@
* along with this program. If not, see .
*/
+#include
#include "protocol.h"
#define MAX_PACKET_LEN 22
@@ -78,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));
+ written = serial_write_blocking(serial, &cmdout, sizeof(cmdout),
+ serial_timeout(serial, sizeof(cmdout)));
if (written != sizeof(cmdout))
return SR_ERR;
@@ -190,7 +192,7 @@ static void parse_flags(const uint8_t *buf, struct brymen_flags *info)
}
SR_PRIV int brymen_parse(const uint8_t *buf, float *floatval,
- struct sr_datafeed_analog *analog, void *info)
+ struct sr_datafeed_analog_old *analog, void *info)
{
struct brymen_flags flags;
struct brymen_header *hdr;