]> sigrok.org Git - libsigrok.git/commitdiff
rigol-ds: Support VS5000 series devices.
authorMartin Ling <redacted>
Wed, 4 Dec 2013 21:38:05 +0000 (21:38 +0000)
committerMartin Ling <redacted>
Wed, 4 Dec 2013 21:38:05 +0000 (21:38 +0000)
hardware/rigol-ds/api.c
hardware/rigol-ds/protocol.c
hardware/rigol-ds/protocol.h

index 66df606bc468eb81f1101e7e151eb94579077f82..201a6f5d79e9ea414b93f050d9e78338f115c6e1 100644 (file)
@@ -164,6 +164,16 @@ static const struct rigol_ds_model supported_models[] = {
        {"DS2072", RIGOL_DS2000, PROTOCOL_IEEE488_2, {5, 1000000000}, {500, 1}, {500, 1000000}, false, 14},
        {"DS2102", RIGOL_DS2000, PROTOCOL_IEEE488_2, {5, 1000000000}, {500, 1}, {500, 1000000}, false, 14},
        {"DS2202", RIGOL_DS2000, PROTOCOL_IEEE488_2, {2, 1000000000}, {500, 1}, {500, 1000000}, false, 14},
+       {"VS5022", RIGOL_VS5000, PROTOCOL_LEGACY, {20, 1000000000}, {50, 1}, {2, 1000}, false, 14},
+       {"VS5022D", RIGOL_VS5000, PROTOCOL_LEGACY, {20, 1000000000}, {50, 1}, {2, 1000}, true, 14},
+       {"VS5042", RIGOL_VS5000, PROTOCOL_LEGACY, {10, 1000000000}, {50, 1}, {2, 1000}, false, 14},
+       {"VS5042D", RIGOL_VS5000, PROTOCOL_LEGACY, {10, 1000000000}, {50, 1}, {2, 1000}, true, 14},
+       {"VS5062", RIGOL_VS5000, PROTOCOL_LEGACY, {5, 1000000000}, {50, 1}, {2, 1000}, false, 14},
+       {"VS5062D", RIGOL_VS5000, PROTOCOL_LEGACY, {5, 1000000000}, {50, 1}, {2, 1000}, true, 14},
+       {"VS5102", RIGOL_VS5000, PROTOCOL_LEGACY, {2, 1000000000}, {50, 1}, {2, 1000}, false, 14},
+       {"VS5102D", RIGOL_VS5000, PROTOCOL_LEGACY, {2, 1000000000}, {50, 1}, {2, 1000}, true, 14},
+       {"VS5202", RIGOL_VS5000, PROTOCOL_LEGACY, {2, 1000000000}, {50, 1}, {2, 1000}, false, 14},
+       {"VS5202D", RIGOL_VS5000, PROTOCOL_LEGACY, {2, 1000000000}, {50, 1}, {2, 1000}, true, 14},
 };
 
 SR_PRIV struct sr_dev_driver rigol_ds_driver_info;
index cd460e9f483b47c2d14e154731c79576871c01d6..af369e9cf5881234d316c15faa1237b9e9999b3b 100644 (file)
@@ -469,7 +469,10 @@ SR_PRIV int rigol_ds_receive(int fd, int revents, void *cb_data)
                                        len < ACQ_BUFFER_SIZE ? len : ACQ_BUFFER_SIZE);
                } else {
                        waveform_size = probe->type == SR_PROBE_ANALOG ?
-                                       DS1000_ANALOG_LIVE_WAVEFORM_SIZE : DIGITAL_WAVEFORM_SIZE;
+                                       (devc->model->series == RIGOL_VS5000 ?
+                                               VS5000_ANALOG_LIVE_WAVEFORM_SIZE :
+                                               DS1000_ANALOG_LIVE_WAVEFORM_SIZE) :
+                                       DIGITAL_WAVEFORM_SIZE;
                        len = sr_scpi_read(scpi, (char *)devc->buffer,
                                        waveform_size - devc->num_frame_bytes);
                }
index caf4cde3c3fdb2b14b803645cb1e7c6cdfada52e..853fbe6e61e19a33a03f421664065cdb91b84012 100644 (file)
@@ -37,6 +37,7 @@
 
 #define DS1000_ANALOG_LIVE_WAVEFORM_SIZE 600
 #define DS2000_ANALOG_LIVE_WAVEFORM_SIZE 1400
+#define VS5000_ANALOG_LIVE_WAVEFORM_SIZE 2048
 /* Needs to be made configurable later */
 #define DS2000_ANALOG_MEM_WAVEFORM_SIZE_1C 14000
 #define DS2000_ANALOG_MEM_WAVEFORM_SIZE_2C 7000
@@ -50,10 +51,11 @@ enum rigol_ds_series {
        RIGOL_DS2000,
        RIGOL_DS4000,
        RIGOL_DS6000,
+       RIGOL_VS5000,
 };
 
 enum rigol_protocol_flavor {
-       /* Used by DS1000 series */
+       /* Used by DS1000 and VS5000 series */
        PROTOCOL_LEGACY,
        /* Used by DS2000, DS4000, DS6000, ... series */
        PROTOCOL_IEEE488_2,