]> sigrok.org Git - libsigrok.git/blobdiff - hardware/rigol-ds/protocol.h
rigol-ds: Send FRAME_BEGIN and FRAME_END per frame, not per channel.
[libsigrok.git] / hardware / rigol-ds / protocol.h
index e19ac490358d8151baa0d64c25c6e538bd6afa0e..121b3ea3f77dcd649e15390299962c74dabfe7c7 100644 (file)
 
 #define LOG_PREFIX "rigol-ds"
 
+/* Analog waveform block sizes */
 #define DS1000_ANALOG_LIVE_WAVEFORM_SIZE 600
 #define DS2000_ANALOG_LIVE_WAVEFORM_SIZE 1400
 #define VS5000_ANALOG_LIVE_WAVEFORM_SIZE 2048
 #define DSO1000_ANALOG_LIVE_WAVEFORM_SIZE 600
-/* Needs to be made configurable later */
 #define DS2000_ANALOG_MEM_WAVEFORM_SIZE_1C 14000
 #define DS2000_ANALOG_MEM_WAVEFORM_SIZE_2C 7000
-#define DIGITAL_WAVEFORM_SIZE 1210
+
+/* Digital waveform block size */
+#define DS1000_DIGITAL_WAVEFORM_SIZE 1200
+#define VS5000_DIGITAL_WAVEFORM_SIZE 4096
+
 /* Size of acquisition buffers */
 #define ACQ_BUFFER_SIZE 32768
 
 #define MAX_DIGITAL_PROBES 16
 
 enum rigol_ds_series {
+       RIGOL_VS5000,
        RIGOL_DS1000,
        RIGOL_DS1000Z,
        RIGOL_DS2000,
        RIGOL_DS4000,
        RIGOL_DS6000,
-       RIGOL_VS5000,
        AGILENT_DSO1000,
 };
 
@@ -107,6 +111,7 @@ struct dev_context {
        void *cb_data;
        enum data_source data_source;
        uint64_t analog_frame_size;
+       uint64_t digital_frame_size;
 
        /* Device settings */
        gboolean analog_channels[MAX_ANALOG_PROBES];
@@ -127,8 +132,8 @@ struct dev_context {
        uint64_t num_frames;
        /* GSList entry for the current channel. */
        GSList *channel_entry;
-       /* Number of samples received in current frame. */
-       uint64_t num_frame_samples;
+       /* Number of bytes received for current channel. */
+       uint64_t num_channel_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 */