]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/kern-scale/protocol.h
kern-scale: Convert to SR_DF_ANALOG.
[libsigrok.git] / src / hardware / kern-scale / protocol.h
index fce47003a669e68dbd4ce6076ce507532e5eec2a..ba4942ad6795d9a3efaa8c8d0b21371daca9207a 100644 (file)
@@ -40,7 +40,7 @@ struct scale_info {
        gboolean (*packet_valid)(const uint8_t *);
        /** Packet parsing function. */
        int (*packet_parse)(const uint8_t *, float *,
-                           struct sr_datafeed_analog_old *, void *);
+                           struct sr_datafeed_analog *, void *);
        /** Size of chipset info struct. */
        gsize info_size;
 };
@@ -49,20 +49,7 @@ struct scale_info {
 
 /** Private, per-device-instance driver context. */
 struct dev_context {
-       /** The current sampling limit (in number of samples). */
-       uint64_t limit_samples;
-
-       /** The time limit (in milliseconds). */
-       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;
-
-       /** The starting time of current sampling run. */
-       int64_t starttime;
+       struct sr_sw_limits limits;
 
        uint8_t buf[SCALE_BUFSIZE];
        int bufoffset;