X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fserial-dmm%2Fprotocol.h;h=8c21f9d975847dcce16cde3eb5866cef45b70edb;hb=4b1a9d5d8641080bf10e269aa12a3fc17460365f;hp=4cdbea3b501278480323c1b2534e9fab99bd3e07;hpb=8852eb75d14730484e66f9e0ff2b177934615a6f;p=libsigrok.git diff --git a/src/hardware/serial-dmm/protocol.h b/src/hardware/serial-dmm/protocol.h index 4cdbea3b..8c21f9d9 100644 --- a/src/hardware/serial-dmm/protocol.h +++ b/src/hardware/serial-dmm/protocol.h @@ -26,11 +26,11 @@ struct dmm_info { /** libsigrok driver info struct. */ struct sr_dev_driver di; /** Manufacturer/brand. */ - char *vendor; + const char *vendor; /** Model. */ - char *device; + const char *device; /** serialconn string. */ - char *conn; + const char *conn; /** Baud rate. */ uint32_t baudrate; /** Packet size in bytes. */ @@ -47,9 +47,9 @@ struct dmm_info { gboolean (*packet_valid)(const uint8_t *); /** Packet parsing function. */ int (*packet_parse)(const uint8_t *, float *, - struct sr_datafeed_analog *, void *); + struct sr_datafeed_analog_old *, void *); /** */ - void (*dmm_details)(struct sr_datafeed_analog *, void *); + void (*dmm_details)(struct sr_datafeed_analog_old *, void *); /** Size of chipset info struct. */ gsize info_size; }; @@ -58,20 +58,7 @@ struct dmm_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[DMM_BUFSIZE]; int bufoffset;