X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=hardware%2Ffluke-dmm%2Ffluke-dmm.h;h=4291be06c5183e69a8440f31cf4d3d6da8df4699;hb=4374219bc8c26997bb5c13c57f0babe3a61cd47e;hp=7174531c4ee8df49fa030076a083704ff537bd16;hpb=acd29accb3a458ab6a494e3f6c42dacc56a4c7a8;p=libsigrok.git diff --git a/hardware/fluke-dmm/fluke-dmm.h b/hardware/fluke-dmm/fluke-dmm.h index 7174531c..4291be06 100644 --- a/hardware/fluke-dmm/fluke-dmm.h +++ b/hardware/fluke-dmm/fluke-dmm.h @@ -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 * @@ -17,9 +17,10 @@ * along with this program. If not, see . */ +#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 @@ -27,17 +28,17 @@ enum { FLUKE_187 = 1, 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. */ @@ -45,16 +46,23 @@ struct dev_context { const struct flukedmm_profile *profile; uint64_t limit_samples; uint64_t limit_msec; - struct sr_serial_dev_inst *serial; - char *serialcomm; /* 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