]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/link-mso19/protocol.h
output/csv: use intermediate time_t var, silence compiler warning
[libsigrok.git] / src / hardware / link-mso19 / protocol.h
index 809d7f87177648b5756f57b20a03a30a410639b6..d6eb872b8a9d14f7dd2f0aef89e5e7524cbb4907 100644 (file)
@@ -26,7 +26,7 @@
 #include <string.h>
 #include <glib.h>
 #include <libudev.h>
-#include "libsigrok.h"
+#include <libsigrok/libsigrok.h>
 #include "libsigrok-internal.h"
 
 #define LOG_PREFIX "link-mso19"
@@ -34,7 +34,6 @@
 #define USB_VENDOR             "3195"
 #define USB_PRODUCT            "f190"
 
-#define NUM_CHANNELS           (1 + 8)
 #define NUM_TRIGGER_STAGES     4
 #define TRIGGER_TYPE           "01"    //the first r/f is used for the whole group
 #define SERIALCOMM             "460800/8n1/flow=2"
@@ -85,7 +84,6 @@ struct mso_prototrig {
        uint8_t spimode;
 };
 
-/* Private, per-device-instance driver context. */
 struct dev_context {
        /* info */
        uint8_t hwmodel;
@@ -98,10 +96,11 @@ struct dev_context {
        uint16_t offset_range;
        uint64_t limit_samples;
        uint64_t num_samples;
+
        /* register cache */
        uint8_t ctlbase1;
        uint8_t ctlbase2;
-       /* state */
+
        uint8_t la_threshold;
        uint64_t cur_rate;
        uint8_t dso_probe_attn;
@@ -116,7 +115,6 @@ struct dev_context {
        double dso_trigger_voltage;
        uint16_t dso_trigger_width;
        struct mso_prototrig protocol_trigger;
-       void *cb_data;
        uint16_t buffer_n;
        char buffer[4096];
 };
@@ -135,7 +133,7 @@ SR_PRIV int mso_read_buffer(struct sr_dev_inst *sdi);
 SR_PRIV int mso_arm(const struct sr_dev_inst *sdi);
 SR_PRIV int mso_force_capture(struct sr_dev_inst *sdi);
 SR_PRIV int mso_dac_out(const struct sr_dev_inst *sdi, uint16_t val);
-SR_PRIV inline uint16_t mso_calc_raw_from_mv(struct dev_context *devc);
+SR_PRIV uint16_t mso_calc_raw_from_mv(struct dev_context *devc);
 SR_PRIV int mso_reset_fsm(struct sr_dev_inst *sdi);
 SR_PRIV int mso_toggle_led(struct sr_dev_inst *sdi, int state);
 
@@ -202,12 +200,7 @@ static const struct rate_map rate_map[] = {
 
 /* FIXME: Determine corresponding voltages */
 static const uint16_t la_threshold_map[] = {
-       0x8600,
-       0x8770,
-       0x88ff,
-       0x8c70,
-       0x8eff,
-       0x8fff,
+       0x8600, 0x8770, 0x88ff, 0x8c70, 0x8eff, 0x8fff,
 };
 
 #endif