X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Frigol-ds%2Fprotocol.h;h=5e5f01ba3b4fc0a5575c156c393cf9a927cd91fd;hb=c1aae90038456a61d0f9313d34e6107c3440d3e7;hp=0117628ca04e72e6451d4b5680c670889db19497;hpb=155b680da482cea2381becb73c51cfb838bff31e;p=libsigrok.git diff --git a/src/hardware/rigol-ds/protocol.h b/src/hardware/rigol-ds/protocol.h index 0117628c..5e5f01ba 100644 --- a/src/hardware/rigol-ds/protocol.h +++ b/src/hardware/rigol-ds/protocol.h @@ -23,13 +23,16 @@ #include #include -#include "libsigrok.h" +#include #include "libsigrok-internal.h" #define LOG_PREFIX "rigol-ds" /* Size of acquisition buffers */ -#define ACQ_BUFFER_SIZE 32768 +#define ACQ_BUFFER_SIZE (32 * 1024) + +/* Maximum number of samples to retrieve at once. */ +#define ACQ_BLOCK_SIZE (30 * 1000) #define MAX_ANALOG_CHANNELS 4 #define MAX_DIGITAL_CHANNELS 16 @@ -38,6 +41,7 @@ enum protocol_version { PROTOCOL_V1, /* VS5000 */ PROTOCOL_V2, /* DS1000 */ PROTOCOL_V3, /* DS2000, DSO1000 */ + PROTOCOL_V4, /* DS1000Z */ }; enum data_format { @@ -98,12 +102,11 @@ struct dev_context { uint64_t num_vdivs; /* Channel groups */ - struct sr_channel_group analog_groups[MAX_ANALOG_CHANNELS]; - struct sr_channel_group digital_group; + struct sr_channel_group **analog_groups; + struct sr_channel_group *digital_group; /* Acquisition settings */ - GSList *enabled_analog_channels; - GSList *enabled_digital_channels; + GSList *enabled_channels; uint64_t limit_frames; void *cb_data; enum data_source data_source;