]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/cem-dt-885x/protocol.h
drivers: Random SR_CONF_LIMIT_* cleanups.
[libsigrok.git] / src / hardware / cem-dt-885x / protocol.h
index 233ef8603876d103e0c403cd23daca8ed3e06303..f183ed11be26773eeee9b0f495b0e94da1105a3e 100644 (file)
@@ -22,7 +22,7 @@
 
 #include <stdint.h>
 #include <glib.h>
-#include "libsigrok.h"
+#include <libsigrok/libsigrok.h>
 #include "libsigrok-internal.h"
 
 #define LOG_PREFIX "cem-dt-885x"
 #define SAMPLES_PER_PACKET 50
 
 /* Various temporary storage, at least 8 bytes. */
-#define BUF_SIZE SAMPLES_PER_PACKET * 2
+#define BUF_SIZE (SAMPLES_PER_PACKET * 2)
 
 /* When in hold mode, force the last measurement out at this interval.
  * We're using 50ms, which duplicates the non-hold 20Hz update rate. */
-#define HOLD_REPEAT_INTERVAL 50 * 1000
+#define HOLD_REPEAT_INTERVAL (50 * 1000)
 
 enum {
        TOKEN_WEIGHT_TIME_FAST = 0x02,
@@ -87,24 +87,18 @@ enum {
        DATA_SOURCE_MEMORY,
 };
 
-/** Private, per-device-instance driver context. */
 struct dev_context {
-       /* Device state */
-       uint64_t cur_mqflags;
+       enum sr_mqflag cur_mqflags;
        int recording;
        int cur_meas_range;
        int cur_data_source;
 
-       /* Acquisition settings */
        uint64_t limit_samples;
 
-       /* Operational state */
        int state;
        uint64_t num_samples;
        gboolean enable_data_source_memory;
 
-       /* Temporary state across callbacks */
-       void *cb_data;
        unsigned char cmd;
        unsigned char token;
        int buf_len;