diff --git a/hardware/rigol-ds/api.c b/hardware/rigol-ds/api.c index 66df606b..201a6f5d 100644 --- a/hardware/rigol-ds/api.c +++ b/hardware/rigol-ds/api.c @@ -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; diff --git a/hardware/rigol-ds/protocol.c b/hardware/rigol-ds/protocol.c index cd460e9f..af369e9c 100644 --- a/hardware/rigol-ds/protocol.c +++ b/hardware/rigol-ds/protocol.c @@ -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); } diff --git a/hardware/rigol-ds/protocol.h b/hardware/rigol-ds/protocol.h index caf4cde3..853fbe6e 100644 --- a/hardware/rigol-ds/protocol.h +++ b/hardware/rigol-ds/protocol.h @@ -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,