X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fnorma-dmm%2Fprotocol.h;h=9891741ee88e0101b34be1bf51deb37c316f7ec2;hb=43ff1110fb317fba796f942bbc73c37a95973b8b;hp=082e736a617e0e71911e95dbd338ede9ef76041b;hpb=695dc859c15ba4190f5c1aa2e1a6e2dc6a6e5845;p=libsigrok.git diff --git a/src/hardware/norma-dmm/protocol.h b/src/hardware/norma-dmm/protocol.h index 082e736a..9891741e 100644 --- a/src/hardware/norma-dmm/protocol.h +++ b/src/hardware/norma-dmm/protocol.h @@ -28,14 +28,9 @@ #include #include "libsigrok-internal.h" -/** @file - * Norma DM9x0/Siemens B102x DMMs driver. - * @internal - */ - #define LOG_PREFIX "norma-dmm" -#define NMADMM_BUFSIZE 256 +#define NMADMM_BUFSIZE 256 #define NMADMM_TIMEOUT_MS 2000 /**< Request timeout. */ @@ -54,25 +49,16 @@ struct nmadmm_req { /** Strings for requests. */ extern const struct nmadmm_req nmadmm_requests[]; -/** Private, per-device-instance driver context. */ struct dev_context { - /* Model-specific information */ - char *version; /**< Version string */ int type; /**< DM9x0, e.g. 5 = DM950 */ - /* Acquisition settings */ - uint64_t limit_samples; /**< Target number of samples */ - uint64_t limit_msec; /**< Target sampling time */ + struct sr_sw_limits limits; - /* Operational state */ int last_req; /**< Last request. */ int64_t req_sent_at; /**< Request sent. */ gboolean last_req_pending; /**< Last request not answered yet. */ int lowbatt; /**< Low battery. 1=low, 2=critical. */ - /* Temporary state across callbacks */ - uint64_t num_samples; /**< Current #samples. */ - GTimer *elapsed_msec; /**< Used for limit_msec */ uint8_t buf[NMADMM_BUFSIZE]; /**< Buffer for read callback */ int buflen; /**< Data len in buf */ };