]> sigrok.org Git - libsigrok.git/blobdiff - hardware/fluke-dmm/fluke-dmm.h
build: Portability fixes.
[libsigrok.git] / hardware / fluke-dmm / fluke-dmm.h
index 5192ee8727dbf128859b98d517bc02290bdf88d3..d162bdd0e921d7525cb42c1c3ee8b33f9048c492 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * This file is part of the sigrok project.
+ * This file is part of the libsigrok project.
  *
  * Copyright (C) 2012 Bert Vermeulen <bert@biot.com>
  *
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#ifndef LIBSIGROK_HARDWARE_FLUKE_DMM_FLUKE_DMM_H
+#define LIBSIGROK_HARDWARE_FLUKE_DMM_FLUKE_DMM_H
 
-#ifndef LIBSIGROK_FLUKE_DMM_H
-#define LIBSIGROK_FLUKE_DMM_H
+#define LOG_PREFIX "fluke-dmm"
 
 #define FLUKEDMM_BUFSIZE  256
 
 /* Supported models */
 enum {
        FLUKE_187 = 1,
+       FLUKE_189,
+       FLUKE_287,
+       FLUKE_190,
 };
 
 /* Supported device profiles */
 struct flukedmm_profile {
        int model;
        const char *modelname;
-};
-
-/* Private driver context. */
-struct drv_context {
-       GSList *instances;
+       /* How often to poll, in ms. */
+       int poll_period;
+       /* If no response received, how long to wait before retrying. */
+       int timeout;
 };
 
 /* Private, per-device-instance driver context. */
@@ -44,15 +47,23 @@ struct dev_context {
        const struct flukedmm_profile *profile;
        uint64_t limit_samples;
        uint64_t limit_msec;
-       struct sr_serial_dev_inst *serial;
 
        /* Opaque pointer passed in by the frontend. */
        void *cb_data;
 
        /* Runtime. */
        uint64_t num_samples;
-       unsigned char buf[FLUKEDMM_BUFSIZE];
+       char buf[FLUKEDMM_BUFSIZE];
        int buflen;
+       int64_t cmd_sent_at;
+       int expect_response;
+       int meas_type;
+       int is_relative;
+       int mq;
+       int unit;
+       int mqflags;
 };
 
-#endif /* LIBSIGROK_FLUKE_DMM_H */
+SR_PRIV int fluke_receive_data(int fd, int revents, void *cb_data);
+
+#endif