X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fhameg-hmo%2Fprotocol.h;h=975ea7e342e311b3c3234e03f29323d5bc997b1a;hb=29a9b1a0bd0af79e0eb2adee594f42895452344c;hp=d169311b2eec7d9cd5ca498dd0d3892c5856b670;hpb=aac306330012568bbf31026b335f54a893310633;p=libsigrok.git diff --git a/src/hardware/hameg-hmo/protocol.h b/src/hardware/hameg-hmo/protocol.h index d169311b..975ea7e3 100644 --- a/src/hardware/hameg-hmo/protocol.h +++ b/src/hardware/hameg-hmo/protocol.h @@ -28,17 +28,19 @@ #define LOG_PREFIX "hameg-hmo" -#define MAX_INSTRUMENT_VERSIONS 10 -#define MAX_COMMAND_SIZE 128 -#define MAX_ANALOG_CHANNEL_COUNT 4 -#define MAX_DIGITAL_CHANNEL_COUNT 16 -#define MAX_DIGITAL_GROUP_COUNT 2 +#define DIGITAL_CHANNELS_PER_POD 8 + +#define MAX_INSTRUMENT_VERSIONS 10 +#define MAX_COMMAND_SIZE 128 +#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]; const uint8_t analog_channels; const uint8_t digital_channels; - const uint8_t digital_pods; + uint8_t digital_pods; const char *(*analog_names)[]; const char *(*digital_names)[]; @@ -71,8 +73,8 @@ struct scope_config { const uint64_t (*vdivs)[][2]; const uint8_t num_vdivs; - const uint8_t num_xdivs; - const uint8_t num_ydivs; + unsigned int num_xdivs; + const unsigned int num_ydivs; const char *(*scpi_dialect)[]; }; @@ -104,7 +106,7 @@ struct scope_state { int trigger_source; int trigger_slope; - char *trigger_pattern; + char trigger_pattern[MAX_ANALOG_CHANNEL_COUNT + MAX_DIGITAL_CHANNEL_COUNT]; uint64_t sample_rate; };