]> sigrok.org Git - libsigrok.git/commitdiff
serial-dmm: Add support for the UNI-T UT61D.
authorUwe Hermann <redacted>
Mon, 29 Apr 2013 18:15:02 +0000 (20:15 +0200)
committerUwe Hermann <redacted>
Tue, 30 Apr 2013 18:22:17 +0000 (20:22 +0200)
This DMM is already supported via the uni-t-dmm driver when using the
USB/HID cable. The serial-dmm support makes it usable with the RS232
cable too.

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

index f59702cc3648ba4b108c01651775dada164a9e70..89ea0dc82d95f5b120000551c1a28ffc160ee02a 100644 (file)
@@ -55,6 +55,7 @@ SR_PRIV struct sr_dev_driver radioshack_22_805_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 sr_dev_driver voltcraft_vc840_ser_driver_info;
+SR_PRIV struct sr_dev_driver uni_t_ut61d_ser_driver_info;
 SR_PRIV struct sr_dev_driver uni_t_ut61e_ser_driver_info;
 
 SR_PRIV struct dmm_info dmms[] = {
@@ -158,6 +159,12 @@ SR_PRIV struct dmm_info dmms[] = {
                &voltcraft_vc840_ser_driver_info,
                receive_data_VOLTCRAFT_VC840_SER,
        },
+       {
+               "UNI-T", "UT61D (UT-D02 cable)", "2400/8n1/rts=0/dtr=1",
+               2400, FS9922_PACKET_SIZE, NULL,
+               sr_fs9922_packet_valid, sr_fs9922_parse, NULL,
+               &uni_t_ut61d_ser_driver_info, receive_data_UNI_T_UT61D_SER,
+       },
        {
                /* Note: ES51922 baudrate is actually 19230! */
                "UNI-T", "UT61E (UT-D02 cable)", "19200/7o1/rts=0/dtr=1",
@@ -508,4 +515,5 @@ DRV(radioshack_22_805, RADIOSHACK_22_805, "radioshack-22-805", "RadioShack 22-80
 DRV(radioshack_22_812, RADIOSHACK_22_812, "radioshack-22-812", "RadioShack 22-812")
 DRV(voltcraft_vc820_ser, VOLTCRAFT_VC820_SER, "voltcraft-vc820-ser", "Voltcraft VC-820 (UT-D02 cable)")
 DRV(voltcraft_vc840_ser, VOLTCRAFT_VC840_SER, "voltcraft-vc840-ser", "Voltcraft VC-840 (UT-D02 cable)")
+DRV(uni_t_ut61d_ser, UNI_T_UT61D_SER, "uni-t-ut61d-ser", "UNI-T UT61D (UT-D02 cable)")
 DRV(uni_t_ut61e_ser, UNI_T_UT61E_SER, "uni-t-ut61e-ser", "UNI-T UT61E (UT-D02 cable)")
index 52efecb3526ad566cf2046016657f50138cdddcd..04d0dc69caeb0ca19da433c83edd7e91f987303f 100644 (file)
@@ -222,4 +222,5 @@ RECEIVE_DATA(RADIOSHACK_22_805, metex14)
 RECEIVE_DATA(RADIOSHACK_22_812, rs9lcd)
 RECEIVE_DATA(VOLTCRAFT_VC820_SER, fs9721)
 RECEIVE_DATA(VOLTCRAFT_VC840_SER, fs9721)
+RECEIVE_DATA(UNI_T_UT61D_SER, fs9922)
 RECEIVE_DATA(UNI_T_UT61E_SER, es51922)
index f15eef321801b095c17fa10e420c380df245f831..aff12c27527160014d74f3598c44a7b03b406a41 100644 (file)
@@ -45,10 +45,11 @@ enum {
        RADIOSHACK_22_812,
        VOLTCRAFT_VC820_SER,
        VOLTCRAFT_VC840_SER,
+       UNI_T_UT61D_SER,
        UNI_T_UT61E_SER,
 };
 
-#define DMM_COUNT 15
+#define DMM_COUNT 16
 
 struct dmm_info {
        char *vendor;
@@ -104,6 +105,7 @@ SR_PRIV int receive_data_RADIOSHACK_22_805(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_SER(int fd, int revents, void *cb_data);
 SR_PRIV int receive_data_VOLTCRAFT_VC840_SER(int fd, int revents, void *cb_data);
+SR_PRIV int receive_data_UNI_T_UT61D_SER(int fd, int revents, void *cb_data);
 SR_PRIV int receive_data_UNI_T_UT61E_SER(int fd, int revents, void *cb_data);
 
 SR_PRIV void dmm_details_tp4000zc(struct sr_datafeed_analog *analog, void *info);
index c0381432a2dd94ef75b6815d427ef71a17f5ad3a..079573453075bc75f904e375f3d9aae8040f7832 100644 (file)
@@ -160,6 +160,7 @@ extern SR_PRIV struct sr_dev_driver radioshack_22_805_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;
 extern SR_PRIV struct sr_dev_driver voltcraft_vc840_ser_driver_info;
+extern SR_PRIV struct sr_dev_driver uni_t_ut61d_ser_driver_info;
 extern SR_PRIV struct sr_dev_driver uni_t_ut61e_ser_driver_info;
 #endif
 #ifdef HAVE_HW_UNI_T_DMM
@@ -242,6 +243,7 @@ static struct sr_dev_driver *drivers_list[] = {
        &radioshack_22_812_driver_info,
        &voltcraft_vc820_ser_driver_info,
        &voltcraft_vc840_ser_driver_info,
+       &uni_t_ut61d_ser_driver_info,
        &uni_t_ut61e_ser_driver_info,
 #endif
 #ifdef HAVE_HW_UNI_T_DMM