X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fdmm%2Fbm52x.c;h=e5379f12f734388b09e22e0656d56318f4ce19eb;hb=70a23b5019ed4d29316683739894fae1abcd7c58;hp=69c017194aa0ebc31983bb9f3d29092f1b663039;hpb=6bee394deeedd22a54126bd2ec93702385b4b99b;p=libsigrok.git diff --git a/src/dmm/bm52x.c b/src/dmm/bm52x.c index 69c01719..e5379f12 100644 --- a/src/dmm/bm52x.c +++ b/src/dmm/bm52x.c @@ -23,9 +23,10 @@ * * Brymen BM52x serial protocol parser. The USB protocol (for the cable) * and the packet description (for the meter) were retrieved from: - * http://brymen.com/product-html/Download2.html - * http://brymen.com/product-html/PD02BM520s_protocolDL.html - * http://brymen.com/product-html/images/DownloadList/ProtocolList/BM520-BM520s_List/BM520-BM520s-10000-count-professional-dual-display-mobile-logging-DMMs-protocol.zip + * http://www.brymen.com/Download2.html + * http://www.brymen.com/PD02BM520s_protocolDL.html + * http://www.brymen.com/images/DownloadList/ProtocolList/BM520-BM520s_List/BM520-BM520s-10000-count-professional-dual-display-mobile-logging-DMMs-protocol.zip + * http://web.archive.org/web/20180119175327/http://brymen.com/product-html/images/DownloadList/ProtocolList/BM520-BM520s_List/BM520-BM520s-10000-count-professional-dual-display-mobile-logging-DMMs-protocol.zip * * This parser was initially created for BM520s devices and tested with * BM525s. The Brymen BM820s family of devices uses the same protocol, @@ -649,6 +650,7 @@ static uint16_t bm52x_rec_checksum(const uint8_t *b, size_t l) * Retrieve the first/next chunk of recording information. * Support for live readings is theoretical, and unused/untested. */ +#ifdef HAVE_SERIAL_COMM static int bm52x_rec_next_rsp(struct sr_serial_dev_inst *serial, enum bm52x_reqtype req, struct brymen_bm52x_state *state) { @@ -726,6 +728,17 @@ static int bm52x_rec_next_rsp(struct sr_serial_dev_inst *serial, return SR_OK; } +#else /* have serial comm */ +static int bm52x_rec_next_rsp(struct sr_serial_dev_inst *serial, + enum bm52x_reqtype req, struct brymen_bm52x_state *state) +{ + (void)serial; + (void)req; + (void)state; + (void)bm52x_rec_checksum; + return SR_ERR_NA; +} +#endif /* have serial comm */ /** Make sure a minimum amount of response data is available. */ static const uint8_t *bm52x_rec_ensure(struct sr_serial_dev_inst *serial, @@ -1350,7 +1363,7 @@ SR_PRIV int brymen_bm52x_config_get(void *st, uint32_t key, GVariant **data, const struct sr_dev_inst *sdi, const struct sr_channel_group *cg) { struct brymen_bm52x_state *state; - char text[20]; + char text[32]; state = st; @@ -1416,7 +1429,7 @@ SR_PRIV int brymen_bm52x_config_list(void *st, uint32_t key, GVariant **data, int ret; size_t count, idx; GVariantBuilder gvb; - char name[20]; + char name[32]; /* * Have common keys handled by caller's common code.