]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/hameg-hmo/protocol.h
hameg-hmo: Add SR_CONF_LIMIT_SAMPLES support.
[libsigrok.git] / src / hardware / hameg-hmo / protocol.h
index 6219ed635ef048fc014bb43200f1b3b2a79ebd15..8620dedc632ed55d760c98299e88673e635d7ffe 100644 (file)
 #define LOG_PREFIX "hameg-hmo"
 
 #define MAX_INSTRUMENT_VERSIONS 10
-#define MAX_COMMAND_SIZE 31
+#define MAX_COMMAND_SIZE 48
+#define MAX_ANALOG_CHANNEL_COUNT 4
+#define MAX_DIGITAL_CHANNEL_COUNT 16
+#define MAX_DIGITAL_GROUP_COUNT        2
 
 struct scope_config {
        const char *name[MAX_INSTRUMENT_VERSIONS];
@@ -43,8 +46,8 @@ struct scope_config {
        const uint32_t (*devopts)[];
        const uint8_t num_devopts;
 
-       const uint32_t (*analog_devopts)[];
-       const uint8_t num_analog_devopts;
+       const uint32_t (*devopts_cg_analog)[];
+       const uint8_t num_devopts_cg_analog;
 
        const char *(*coupling_options)[];
        const uint8_t num_coupling_options;
@@ -53,6 +56,7 @@ struct scope_config {
        const uint8_t num_trigger_sources;
 
        const char *(*trigger_slopes)[];
+       const uint8_t num_trigger_slopes;
 
        const uint64_t (*timebases)[][2];
        const uint8_t num_timebases;
@@ -89,7 +93,6 @@ struct scope_state {
        uint64_t sample_rate;
 };
 
-/** Private, per-device-instance driver context. */
 struct dev_context {
        const void *model_config;
        void *model_state;
@@ -99,9 +102,14 @@ struct dev_context {
 
        GSList *enabled_channels;
        GSList *current_channel;
+       uint64_t num_samples;
        uint64_t num_frames;
 
+       uint64_t samples_limit;
        uint64_t frame_limit;
+
+       size_t pod_count;
+       GByteArray *logic_data;
 };
 
 SR_PRIV int hmo_init_device(struct sr_dev_inst *sdi);