X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fbrymen-dmm%2Fparser.c;h=aaa2c3f48f5295ba1be973c50d2114ea6d6a2041;hb=8a63a4064eb5a759dd438e5d1fe9e9d21d7a3e69;hp=e4b12274d41d862b3f08c6b85182545a300e39d5;hpb=155b680da482cea2381becb73c51cfb838bff31e;p=libsigrok.git
diff --git a/src/hardware/brymen-dmm/parser.c b/src/hardware/brymen-dmm/parser.c
index e4b12274..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(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;