From: Uwe Hermann Date: Wed, 24 May 2017 17:04:17 +0000 (+0200) Subject: serial-dmm: Use a custom dummy struct for m2110. X-Git-Tag: libsigrok-0.5.0~51 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=9d12555fba786b0e820a530efbfb574b5ad13245;p=libsigrok.git serial-dmm: Use a custom dummy struct for m2110. This DMM/parser is not related to metex14, don't use that struct. --- diff --git a/src/hardware/serial-dmm/api.c b/src/hardware/serial-dmm/api.c index a54fe03f..e39480e9 100644 --- a/src/hardware/serial-dmm/api.c +++ b/src/hardware/serial-dmm/api.c @@ -426,14 +426,16 @@ SR_REGISTER_DEV_DRIVER_LIST(serial_dmm_drivers, &sr_fs9922_z1_diode ), /* }}} */ - /* metex14 based meters {{{ */ + /* m2110 based meters {{{ */ DMM( - "bbcgm-2010", metex14, + "bbcgm-2010", m2110, "BBC Goertz Metrawatt", "M2110", "1200/7n2", 1200, BBCGM_M2110_PACKET_SIZE, 0, 0, NULL, sr_m2110_packet_valid, sr_m2110_parse, NULL ), + /* }}} */ + /* metex14 based meters {{{ */ DMM( "mastech-mas345", metex14, "MASTECH", "MAS345", "600/7n2/rts=0/dtr=1", 600, diff --git a/src/libsigrok-internal.h b/src/libsigrok-internal.h index fa4432fb..2e041a26 100644 --- a/src/libsigrok-internal.h +++ b/src/libsigrok-internal.h @@ -1210,6 +1210,9 @@ SR_PRIV int sr_dtm0660_parse(const uint8_t *buf, float *floatval, #define BBCGM_M2110_PACKET_SIZE 9 +/* Dummy info struct. The parser does not use it. */ +struct m2110_info { int dummy; }; + SR_PRIV gboolean sr_m2110_packet_valid(const uint8_t *buf); SR_PRIV int sr_m2110_parse(const uint8_t *buf, float *floatval, struct sr_datafeed_analog *analog, void *info);