]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/mic-985xx/protocol.h
mic-985xx: Use software limit helpers
[libsigrok.git] / src / hardware / mic-985xx / protocol.h
index 42a01daf6151166e25f849e7a1b5c97c69eb21da..d3aaf37be9fed2ea62174f50381d9f9d3185bc1e 100644 (file)
@@ -36,9 +36,9 @@ enum {
 };
 
 struct mic_dev_info {
-       char *vendor;
-       char *device;
-       char *conn;
+       const char *vendor;
+       const char *device;
+       const char *conn;
        uint32_t max_sample_points;
        gboolean has_temperature;
        gboolean has_humidity;
@@ -54,19 +54,7 @@ extern SR_PRIV const struct mic_dev_info mic_devs[];
 
 /** Private, per-device-instance driver context. */
 struct dev_context {
-       /** The current sampling limit (in number of samples). */
-       uint64_t limit_samples;
-
-       /** The current sampling limit (in ms). */
-       uint64_t limit_msec;
-
-       /** Opaque pointer passed in by the frontend. */
-       void *cb_data;
-
-       /** The current number of already received samples. */
-       uint64_t num_samples;
-
-       int64_t starttime;
+       struct sr_sw_limits limits;
 
        uint8_t buf[SERIAL_BUFSIZE];
        int bufoffset;