X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fhameg-hmo%2Fprotocol.h;h=43220dd789a78c6f2ce10a9981af29a3bb34844c;hb=f6ce25ec05e8707ee3783b111ea13779f237c3b3;hp=932e3ec3ee1c62d85d5d6633979db270ca3fcee4;hpb=562b7ae513ed755ee93f233d6a460259cea535de;p=libsigrok.git diff --git a/src/hardware/hameg-hmo/protocol.h b/src/hardware/hameg-hmo/protocol.h index 932e3ec3..43220dd7 100644 --- a/src/hardware/hameg-hmo/protocol.h +++ b/src/hardware/hameg-hmo/protocol.h @@ -23,13 +23,16 @@ #include #include #include -#include "libsigrok.h" +#include #include "libsigrok-internal.h" #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]; @@ -40,11 +43,11 @@ struct scope_config { const char *(*analog_names)[]; const char *(*digital_names)[]; - const int32_t (*hw_caps)[]; - const uint8_t num_hwcaps; + const uint32_t (*devopts)[]; + const uint8_t num_devopts; - const int32_t (*analog_hwcaps)[]; - const uint8_t num_analog_hwcaps; + 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; @@ -73,6 +77,7 @@ struct analog_channel_state { float vertical_offset; gboolean state; + char probe_unit; }; struct scope_state { @@ -88,9 +93,8 @@ struct scope_state { uint64_t sample_rate; }; -/** Private, per-device-instance driver context. */ struct dev_context { - void *model_config; + const void *model_config; void *model_state; struct sr_channel_group **analog_groups; @@ -101,6 +105,9 @@ struct dev_context { uint64_t num_frames; uint64_t frame_limit; + + size_t pod_count; + GByteArray *logic_data; }; SR_PRIV int hmo_init_device(struct sr_dev_inst *sdi);