]> sigrok.org Git - libsigrok.git/commitdiff
serial-dmm: Add Voltcraft VC-820 (UT-D02) support.
authorUwe Hermann <redacted>
Sun, 16 Dec 2012 21:03:28 +0000 (22:03 +0100)
committerUwe Hermann <redacted>
Mon, 17 Dec 2012 13:21:12 +0000 (14:21 +0100)
This works with the UNI-T UT-D02 (RS232) cable. For the USB/HID
based cable (UNI-T UT-D04), the uni-t-dmm driver must be used.

hardware/serial-dmm/api.c
hardware/serial-dmm/protocol.c
hardware/serial-dmm/protocol.h
hwdriver.c

index 0067e8c5fe44b82da11b27d8f88a9e73f15828b7..bbf821ee28b5b7ac344488c02a42091cf605edb6 100644 (file)
@@ -58,6 +58,7 @@ SR_PRIV struct sr_dev_driver peaktech_4370_driver_info;
 SR_PRIV struct sr_dev_driver pce_pce_dm32_driver_info;
 SR_PRIV struct sr_dev_driver radioshack_22_168_driver_info;
 SR_PRIV struct sr_dev_driver radioshack_22_812_driver_info;
+SR_PRIV struct sr_dev_driver voltcraft_vc820_ser_driver_info;
 
 SR_PRIV struct dmm_info dmms[] = {
        {
@@ -137,6 +138,13 @@ SR_PRIV struct dmm_info dmms[] = {
                NULL,
                &radioshack_22_812_driver_info, receive_data_RADIOSHACK_22_812,
        },
+       {
+               "Voltcraft", "VC-820 (UT-D02 cable)", "2400/8n1/rts=0/dtr=1",
+               2400, FS9721_PACKET_SIZE, NULL,
+               sr_fs9721_packet_valid, sr_fs9721_parse,
+               NULL,
+               &voltcraft_vc820_ser_driver_info, receive_data_VOLTCRAFT_VC820,
+       },
 };
 
 /* Properly close and free all devices. */
@@ -528,3 +536,5 @@ DRV(peaktech_4370, PEAKTECH_4370, "peaktech-4370", "PeakTech 4370")
 DRV(pce_pce_dm32, PCE_PCE_DM32, "pce-pce-dm32", "PCE PCE-DM32")
 DRV(radioshack_22_168, RADIOSHACK_22_168, "radioshack-22-168", "RadioShack 22-168")
 DRV(radioshack_22_812, RADIOSHACK_22_812, "radioshack-22-812", "RadioShack 22-812")
+DRV(voltcraft_vc820_ser, VOLTCRAFT_VC820, "voltcraft-vc820-ser", "Voltcraft VC-820 (UT-D02 cable)")
+DRV(voltcraft_vc840_ser, VOLTCRAFT_VC840, "voltcraft-vc840-ser", "Voltcraft VC-840 (UT-D02 cable)")
index 8d038396d11ba0ebc3f672df650da9c5af70ef6e..4fea8def3369e0c5e747dd502cd09eaa45745891 100644 (file)
@@ -203,3 +203,4 @@ RECEIVE_DATA(PEAKTECH_4370, metex14)
 RECEIVE_DATA(PCE_PCE_DM32, fs9721)
 RECEIVE_DATA(RADIOSHACK_22_168, metex14)
 RECEIVE_DATA(RADIOSHACK_22_812, rs9lcd)
+RECEIVE_DATA(VOLTCRAFT_VC820, fs9721)
index 77f89c741defe2ab3bf4fdc59925d7af5e67ade7..e419b34d75f504bce0c4a181fae03b19f8bd79c1 100644 (file)
@@ -42,9 +42,10 @@ enum {
        PCE_PCE_DM32,
        RADIOSHACK_22_168,
        RADIOSHACK_22_812,
+       VOLTCRAFT_VC820,
 };
 
-#define DMM_COUNT 11
+#define DMM_COUNT 12
 
 struct dmm_info {
        char *vendor;
@@ -94,6 +95,7 @@ SR_PRIV int receive_data_PEAKTECH_4370(int fd, int revents, void *cb_data);
 SR_PRIV int receive_data_PCE_PCE_DM32(int fd, int revents, void *cb_data);
 SR_PRIV int receive_data_RADIOSHACK_22_168(int fd, int revents, void *cb_data);
 SR_PRIV int receive_data_RADIOSHACK_22_812(int fd, int revents, void *cb_data);
+SR_PRIV int receive_data_VOLTCRAFT_VC820(int fd, int revents, void *cb_data);
 
 SR_PRIV void dmm_details_tp4000zc(struct sr_datafeed_analog *analog, void *info);
 SR_PRIV void dmm_details_dt4000zc(struct sr_datafeed_analog *analog, void *info);
index 2b04e2298ef082f47ecfff8deb5de01bc6dcf59a..a42f4fba25be4bec245372b2c8e6513fdbb5370b 100644 (file)
@@ -125,6 +125,7 @@ extern SR_PRIV struct sr_dev_driver peaktech_4370_driver_info;
 extern SR_PRIV struct sr_dev_driver pce_pce_dm32_driver_info;
 extern SR_PRIV struct sr_dev_driver radioshack_22_168_driver_info;
 extern SR_PRIV struct sr_dev_driver radioshack_22_812_driver_info;
+extern SR_PRIV struct sr_dev_driver voltcraft_vc820_ser_driver_info;
 #endif
 #ifdef HAVE_HW_UNI_T_DMM
 extern SR_PRIV struct sr_dev_driver uni_t_ut61d_driver_info;
@@ -190,6 +191,7 @@ static struct sr_dev_driver *drivers_list[] = {
        &pce_pce_dm32_driver_info,
        &radioshack_22_168_driver_info,
        &radioshack_22_812_driver_info,
+       &voltcraft_vc820_ser_driver_info,
 #endif
 #ifdef HAVE_HW_UNI_T_DMM
        &uni_t_ut61d_driver_info,