X-Git-Url: https://sigrok.org/gitweb/?p=libsigrok.git;a=blobdiff_plain;f=hardware%2Frigol-ds%2Fprotocol.h;h=0117628ca04e72e6451d4b5680c670889db19497;hp=269e0f0f4677d72690fd8b696310478ffaadead9;hb=43cd4637285833706f8a404ca027bcf0ee75b9ae;hpb=569d4dbd3e4c6cef0456c2afcc9a1e3d995d96ee diff --git a/hardware/rigol-ds/protocol.h b/hardware/rigol-ds/protocol.h index 269e0f0f..0117628c 100644 --- a/hardware/rigol-ds/protocol.h +++ b/hardware/rigol-ds/protocol.h @@ -31,8 +31,8 @@ /* Size of acquisition buffers */ #define ACQ_BUFFER_SIZE 32768 -#define MAX_ANALOG_PROBES 4 -#define MAX_DIGITAL_PROBES 16 +#define MAX_ANALOG_CHANNELS 4 +#define MAX_DIGITAL_CHANNELS 16 enum protocol_version { PROTOCOL_V1, /* VS5000 */ @@ -97,13 +97,13 @@ struct dev_context { const uint64_t (*vdivs)[2]; uint64_t num_vdivs; - /* Probe groups */ - struct sr_probe_group analog_groups[MAX_ANALOG_PROBES]; - struct sr_probe_group digital_group; + /* Channel groups */ + struct sr_channel_group analog_groups[MAX_ANALOG_CHANNELS]; + struct sr_channel_group digital_group; /* Acquisition settings */ - GSList *enabled_analog_probes; - GSList *enabled_digital_probes; + GSList *enabled_analog_channels; + GSList *enabled_digital_channels; uint64_t limit_frames; void *cb_data; enum data_source data_source; @@ -111,17 +111,17 @@ struct dev_context { uint64_t digital_frame_size; /* Device settings */ - gboolean analog_channels[MAX_ANALOG_PROBES]; - gboolean digital_channels[MAX_DIGITAL_PROBES]; + gboolean analog_channels[MAX_ANALOG_CHANNELS]; + gboolean digital_channels[MAX_DIGITAL_CHANNELS]; gboolean la_enabled; float timebase; - float vdiv[MAX_ANALOG_PROBES]; - int vert_reference[MAX_ANALOG_PROBES]; - float vert_offset[MAX_ANALOG_PROBES]; + float vdiv[MAX_ANALOG_CHANNELS]; + int vert_reference[MAX_ANALOG_CHANNELS]; + float vert_offset[MAX_ANALOG_CHANNELS]; char *trigger_source; float horiz_triggerpos; char *trigger_slope; - char *coupling[MAX_ANALOG_PROBES]; + char *coupling[MAX_ANALOG_CHANNELS]; /* Operational state */ @@ -131,6 +131,8 @@ struct dev_context { GSList *channel_entry; /* Number of bytes received for current channel. */ uint64_t num_channel_bytes; + /* Number of bytes of block header read */ + uint64_t num_header_bytes; /* Number of bytes in current data block, if 0 block header expected */ uint64_t num_block_bytes; /* Number of data block bytes already read */