]> sigrok.org Git - libsigrok.git/blobdiff - hardware/rigol-ds/protocol.h
rigol-ds: Use correct live waveform size for Agilent DSO1000 series.
[libsigrok.git] / hardware / rigol-ds / protocol.h
index d1c67fd8af2754e5edb7752c5f386de20abc54c1..1c658ec64207b2bf415d9cd66fefdcc42253eb08 100644 (file)
@@ -31,6 +31,7 @@
 #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
@@ -45,6 +46,7 @@ enum rigol_ds_series {
        RIGOL_DS4000,
        RIGOL_DS6000,
        RIGOL_VS5000,
+       AGILENT_DSO1000,
 };
 
 enum rigol_protocol_flavor {
@@ -61,6 +63,7 @@ enum data_source {
 };
 
 struct rigol_ds_model {
+       char *vendor;
        char *name;
        enum rigol_ds_series series;
        enum rigol_protocol_flavor protocol;
@@ -114,10 +117,13 @@ struct dev_context {
        char *coupling[2];
 
        /* Operational state */
+
+       /* Number of frames received in total. */
        uint64_t num_frames;
-       /* FIXME: misnomer, actually this is number of frame samples? */
-       uint64_t num_frame_bytes;
-       struct sr_probe *channel_frame;
+       /* The channel we are currently receiving data for. */
+       struct sr_probe *channel;
+       /* Number of samples received in current frame. */
+       uint64_t num_frame_samples;
        /* Number of bytes in current data block, if 0 block header expected */
        uint64_t num_block_bytes;
        /* Number of data block bytes already read */
@@ -132,6 +138,7 @@ struct dev_context {
 };
 
 SR_PRIV int rigol_ds_capture_start(const struct sr_dev_inst *sdi);
+SR_PRIV int rigol_ds_channel_start(const struct sr_dev_inst *sdi);
 SR_PRIV int rigol_ds_receive(int fd, int revents, void *cb_data);
 SR_PRIV int rigol_ds_get_dev_cfg(const struct sr_dev_inst *sdi);