]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/gmc-mh-1x-2x/protocol.h
dev_acquisition_{start,stop}(): Drop duplicate 'cb_data' parameter.
[libsigrok.git] / src / hardware / gmc-mh-1x-2x / protocol.h
index 6f751224bd8fafab471eb9f98d9c045d22b10080..b368576b92858395010a43e624d0279e931c5de9 100644 (file)
 
 #include <stdint.h>
 #include <glib.h>
-#include "libsigrok.h"
+#include <libsigrok/libsigrok.h>
 #include "libsigrok-internal.h"
 
 #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 */
@@ -89,13 +90,10 @@ struct dev_context {
        uint64_t limit_samples; /**< Target number of samples */
        uint64_t limit_msec;    /**< Target sampling time */
 
-       /* Opaque pointer passed in by frontend. */
-       void *cb_data;
-
        /* 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,10 +118,8 @@ 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);
 SR_PRIV int gmc_decode_model_bd(uint8_t mcode);
 SR_PRIV int gmc_decode_model_sm(uint8_t mcode);
 SR_PRIV int gmc_mh_1x_2x_receive_data(int fd, int revents, void *cb_data);