X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fgmc-mh-1x-2x%2Fprotocol.h;h=87034e6b784e1ef90098d86952e733faad839214;hb=da005885c8ebbf98772f75126764f758b2640d11;hp=6f751224bd8fafab471eb9f98d9c045d22b10080;hpb=5791bdf6048e7151e24e5bb0cdf592781fc3d03a;p=libsigrok.git diff --git a/src/hardware/gmc-mh-1x-2x/protocol.h b/src/hardware/gmc-mh-1x-2x/protocol.h index 6f751224..87034e6b 100644 --- a/src/hardware/gmc-mh-1x-2x/protocol.h +++ b/src/hardware/gmc-mh-1x-2x/protocol.h @@ -32,7 +32,8 @@ #define LOG_PREFIX "gmc-mh-1x-2x" -#define GMC_BUFSIZE 266 +#define GMC_BUFSIZE 266 +#define GMC_REPLY_SIZE 14 /** Message ID bits 4, 5 */ #define MSGID_MASK 0x30 /**< Mask to get message ID bits */ @@ -95,7 +96,7 @@ 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 */ @@ -120,7 +121,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);