X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fgmc-mh-1x-2x%2Fprotocol.h;h=5d20e9214e2cafbae09fc220fee3f390c69d4908;hb=b1f8310376265f622c6f7d81c0cc0580598ea973;hp=aa19be38a8a8d161ae7723f88d41b81293140242;hpb=155b680da482cea2381becb73c51cfb838bff31e;p=libsigrok.git diff --git a/src/hardware/gmc-mh-1x-2x/protocol.h b/src/hardware/gmc-mh-1x-2x/protocol.h index aa19be38..5d20e921 100644 --- a/src/hardware/gmc-mh-1x-2x/protocol.h +++ b/src/hardware/gmc-mh-1x-2x/protocol.h @@ -75,6 +75,7 @@ enum model { METRAHIT_26SM = METRAHIT_25S + 1, /**< Send mode */ METRAHIT_26S = METRAHIT_26SM + 1, /**< Bidi mode */ METRAHIT_26M = METRAHIT_26S + 1, /**< Bidi mode */ + /* The Metrahit 27x and 28Cx have a totally different protocol */ METRAHIT_28S = METRAHIT_26M + 1, METRAHIT_29S = METRAHIT_28S + 1, }; @@ -94,14 +95,13 @@ struct dev_context { /* Operational state */ gboolean settings_ok; /**< Settings msg received yet. */ int msg_type; /**< Message type (MSGID_INF, ...). */ - int msg_len; /**< Message lengh (valid when msg, curr. type known).*/ + int msg_len; /**< Message length (valid when msg, curr. type known).*/ int mq; /**< Measured quantity */ int unit; /**< Measured unit */ uint64_t mqflags; /**< Measured quantity flags */ float value; /**< Measured value */ float scale; /**< Scale for value. */ int8_t scale1000; /**< Additional scale factor 1000x. */ - gboolean vmains_29S; /**< Measured ctmv is V mains (29S only). */ int addr; /**< Device address (1..15). */ int cmd_idx; /**< Parameter "Idx" (Index) of current command, if required. */ int cmd_seq; /**< Command sequence. Used to query status every n messages. */ @@ -120,7 +120,7 @@ struct dev_context { }; /* Forward declarations */ -SR_PRIV int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi, +SR_PRIV int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi, const struct sr_channel_group *cg); SR_PRIV void create_cmd_14(guchar addr, guchar func, guchar* params, guchar* buf); SR_PRIV void dump_msg14(guchar* buf, gboolean raw);