From: Uwe Hermann Date: Sat, 25 Oct 2014 15:14:30 +0000 (+0200) Subject: Add support for the UNI-T UT71x series (aka Voltcraft VC-920/940/960). X-Git-Tag: libsigrok-0.4.0~827 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=8769478c0749a1a74a87a5476d6bfb9ef7e8f93f;p=libsigrok.git Add support for the UNI-T UT71x series (aka Voltcraft VC-920/940/960). Tested on the Voltcraft VC-920 and VC-940 (both UT-D02 and UT-D04 cables), but it should work for all devices in this series without any changes. --- diff --git a/README.devices b/README.devices index 1ea445bc..0382ebc8 100644 --- a/README.devices +++ b/README.devices @@ -319,6 +319,8 @@ a short list for convenience: - Tenma 72-7750: Briefly press the "RS232C" button. - UNI-T UT60G: Briefly press the "RS232C" button. - UNI-T UT61B/C/D: Press the "REL/RS232/USB" button for roughly 1 second. + - UNI-T UT71x: Press the "SEND/-/MAXMIN" button for roughly 1 second. + Briefly pressing the "EXIT" button leaves this mode again. - UNI-T UT325: Briefly press the "SEND" button (as per manual). However, it appears that in practice you don't have to press the button (at least on some versions of the device), simply connect the device via USB. diff --git a/src/drivers.c b/src/drivers.c index b8c70602..37a30ffb 100644 --- a/src/drivers.c +++ b/src/drivers.c @@ -148,6 +148,9 @@ extern SR_PRIV struct sr_dev_driver voltcraft_me42_driver_info; extern SR_PRIV struct sr_dev_driver voltcraft_vc820_ser_driver_info; extern SR_PRIV struct sr_dev_driver voltcraft_vc830_ser_driver_info; extern SR_PRIV struct sr_dev_driver voltcraft_vc840_ser_driver_info; +extern SR_PRIV struct sr_dev_driver voltcraft_vc920_ser_driver_info; +extern SR_PRIV struct sr_dev_driver voltcraft_vc940_ser_driver_info; +extern SR_PRIV struct sr_dev_driver voltcraft_vc960_ser_driver_info; extern SR_PRIV struct sr_dev_driver uni_t_ut60a_ser_driver_info; extern SR_PRIV struct sr_dev_driver uni_t_ut60e_ser_driver_info; extern SR_PRIV struct sr_dev_driver uni_t_ut60g_ser_driver_info; @@ -155,6 +158,11 @@ extern SR_PRIV struct sr_dev_driver uni_t_ut61b_ser_driver_info; extern SR_PRIV struct sr_dev_driver uni_t_ut61c_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; +extern SR_PRIV struct sr_dev_driver uni_t_ut71a_ser_driver_info; +extern SR_PRIV struct sr_dev_driver uni_t_ut71b_ser_driver_info; +extern SR_PRIV struct sr_dev_driver uni_t_ut71c_ser_driver_info; +extern SR_PRIV struct sr_dev_driver uni_t_ut71d_ser_driver_info; +extern SR_PRIV struct sr_dev_driver uni_t_ut71e_ser_driver_info; extern SR_PRIV struct sr_dev_driver iso_tech_idm103n_driver_info; extern SR_PRIV struct sr_dev_driver tenma_72_7745_ser_driver_info; extern SR_PRIV struct sr_dev_driver tenma_72_7750_ser_driver_info; @@ -181,9 +189,17 @@ extern SR_PRIV struct sr_dev_driver uni_t_ut61b_driver_info; extern SR_PRIV struct sr_dev_driver uni_t_ut61c_driver_info; extern SR_PRIV struct sr_dev_driver uni_t_ut61d_driver_info; extern SR_PRIV struct sr_dev_driver uni_t_ut61e_driver_info; +extern SR_PRIV struct sr_dev_driver uni_t_ut71a_driver_info; +extern SR_PRIV struct sr_dev_driver uni_t_ut71b_driver_info; +extern SR_PRIV struct sr_dev_driver uni_t_ut71c_driver_info; +extern SR_PRIV struct sr_dev_driver uni_t_ut71d_driver_info; +extern SR_PRIV struct sr_dev_driver uni_t_ut71e_driver_info; extern SR_PRIV struct sr_dev_driver voltcraft_vc820_driver_info; extern SR_PRIV struct sr_dev_driver voltcraft_vc830_driver_info; extern SR_PRIV struct sr_dev_driver voltcraft_vc840_driver_info; +extern SR_PRIV struct sr_dev_driver voltcraft_vc920_driver_info; +extern SR_PRIV struct sr_dev_driver voltcraft_vc940_driver_info; +extern SR_PRIV struct sr_dev_driver voltcraft_vc960_driver_info; extern SR_PRIV struct sr_dev_driver tenma_72_7745_driver_info; extern SR_PRIV struct sr_dev_driver tenma_72_7750_driver_info; #endif @@ -328,6 +344,9 @@ SR_PRIV struct sr_dev_driver *drivers_list[] = { &voltcraft_vc820_ser_driver_info, &voltcraft_vc830_ser_driver_info, &voltcraft_vc840_ser_driver_info, + &voltcraft_vc920_ser_driver_info, + &voltcraft_vc940_ser_driver_info, + &voltcraft_vc960_ser_driver_info, &uni_t_ut60a_ser_driver_info, &uni_t_ut60e_ser_driver_info, &uni_t_ut60g_ser_driver_info, @@ -335,6 +354,11 @@ SR_PRIV struct sr_dev_driver *drivers_list[] = { &uni_t_ut61c_ser_driver_info, &uni_t_ut61d_ser_driver_info, &uni_t_ut61e_ser_driver_info, + &uni_t_ut71a_ser_driver_info, + &uni_t_ut71b_ser_driver_info, + &uni_t_ut71c_ser_driver_info, + &uni_t_ut71d_ser_driver_info, + &uni_t_ut71e_ser_driver_info, &iso_tech_idm103n_driver_info, &tenma_72_7745_ser_driver_info, &tenma_72_7750_ser_driver_info, @@ -361,9 +385,17 @@ SR_PRIV struct sr_dev_driver *drivers_list[] = { &uni_t_ut61c_driver_info, &uni_t_ut61d_driver_info, &uni_t_ut61e_driver_info, + &uni_t_ut71a_driver_info, + &uni_t_ut71b_driver_info, + &uni_t_ut71c_driver_info, + &uni_t_ut71d_driver_info, + &uni_t_ut71e_driver_info, &voltcraft_vc820_driver_info, &voltcraft_vc830_driver_info, &voltcraft_vc840_driver_info, + &voltcraft_vc920_driver_info, + &voltcraft_vc940_driver_info, + &voltcraft_vc960_driver_info, &tenma_72_7745_driver_info, &tenma_72_7750_driver_info, #endif diff --git a/src/hardware/serial-dmm/api.c b/src/hardware/serial-dmm/api.c index 7fdfd50e..bdcabef0 100644 --- a/src/hardware/serial-dmm/api.c +++ b/src/hardware/serial-dmm/api.c @@ -64,6 +64,9 @@ SR_PRIV struct sr_dev_driver voltcraft_me42_driver_info; SR_PRIV struct sr_dev_driver voltcraft_vc820_ser_driver_info; SR_PRIV struct sr_dev_driver voltcraft_vc830_ser_driver_info; SR_PRIV struct sr_dev_driver voltcraft_vc840_ser_driver_info; +SR_PRIV struct sr_dev_driver voltcraft_vc920_ser_driver_info; +SR_PRIV struct sr_dev_driver voltcraft_vc940_ser_driver_info; +SR_PRIV struct sr_dev_driver voltcraft_vc960_ser_driver_info; SR_PRIV struct sr_dev_driver uni_t_ut60a_ser_driver_info; SR_PRIV struct sr_dev_driver uni_t_ut60e_ser_driver_info; SR_PRIV struct sr_dev_driver uni_t_ut60g_ser_driver_info; @@ -71,6 +74,11 @@ SR_PRIV struct sr_dev_driver uni_t_ut61b_ser_driver_info; SR_PRIV struct sr_dev_driver uni_t_ut61c_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 sr_dev_driver uni_t_ut71a_ser_driver_info; +SR_PRIV struct sr_dev_driver uni_t_ut71b_ser_driver_info; +SR_PRIV struct sr_dev_driver uni_t_ut71c_ser_driver_info; +SR_PRIV struct sr_dev_driver uni_t_ut71d_ser_driver_info; +SR_PRIV struct sr_dev_driver uni_t_ut71e_ser_driver_info; SR_PRIV struct sr_dev_driver iso_tech_idm103n_driver_info; SR_PRIV struct sr_dev_driver tenma_72_7745_ser_driver_info; SR_PRIV struct sr_dev_driver tenma_72_7750_ser_driver_info; @@ -247,6 +255,27 @@ SR_PRIV struct dmm_info dmms[] = { &voltcraft_vc840_ser_driver_info, receive_data_VOLTCRAFT_VC840_SER, }, + { + "Voltcraft", "VC-920 (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", + 2400, UT71X_PACKET_SIZE, 0, 0, NULL, + sr_ut71x_packet_valid, sr_ut71x_parse, NULL, + &voltcraft_vc920_ser_driver_info, + receive_data_VOLTCRAFT_VC920_SER, + }, + { + "Voltcraft", "VC-940 (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", + 2400, UT71X_PACKET_SIZE, 0, 0, NULL, + sr_ut71x_packet_valid, sr_ut71x_parse, NULL, + &voltcraft_vc940_ser_driver_info, + receive_data_VOLTCRAFT_VC940_SER, + }, + { + "Voltcraft", "VC-960 (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", + 2400, UT71X_PACKET_SIZE, 0, 0, NULL, + sr_ut71x_packet_valid, sr_ut71x_parse, NULL, + &voltcraft_vc960_ser_driver_info, + receive_data_VOLTCRAFT_VC960_SER, + }, { "UNI-T", "UT60A (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", 2400, FS9721_PACKET_SIZE, 0, 0, NULL, @@ -297,6 +326,36 @@ SR_PRIV struct dmm_info dmms[] = { NULL, &uni_t_ut61e_ser_driver_info, receive_data_UNI_T_UT61E_SER, }, + { + "UNI-T", "UT71A (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", + 2400, UT71X_PACKET_SIZE, 0, 0, NULL, + sr_ut71x_packet_valid, sr_ut71x_parse, NULL, + &uni_t_ut71a_ser_driver_info, receive_data_UNI_T_UT71A_SER, + }, + { + "UNI-T", "UT71B (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", + 2400, UT71X_PACKET_SIZE, 0, 0, NULL, + sr_ut71x_packet_valid, sr_ut71x_parse, NULL, + &uni_t_ut71b_ser_driver_info, receive_data_UNI_T_UT71B_SER, + }, + { + "UNI-T", "UT71C (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", + 2400, UT71X_PACKET_SIZE, 0, 0, NULL, + sr_ut71x_packet_valid, sr_ut71x_parse, NULL, + &uni_t_ut71c_ser_driver_info, receive_data_UNI_T_UT71C_SER, + }, + { + "UNI-T", "UT71D (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", + 2400, UT71X_PACKET_SIZE, 0, 0, NULL, + sr_ut71x_packet_valid, sr_ut71x_parse, NULL, + &uni_t_ut71d_ser_driver_info, receive_data_UNI_T_UT71D_SER, + }, + { + "UNI-T", "UT71E (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", + 2400, UT71X_PACKET_SIZE, 0, 0, NULL, + sr_ut71x_packet_valid, sr_ut71x_parse, NULL, + &uni_t_ut71e_ser_driver_info, receive_data_UNI_T_UT71E_SER, + }, { "ISO-TECH", "IDM103N", "2400/7o1/rts=0/dtr=1", 2400, ES519XX_11B_PACKET_SIZE, 0, 0, NULL, @@ -626,6 +685,9 @@ DRV(voltcraft_me42, VOLTCRAFT_ME42, "voltcraft-me42", "Voltcraft ME-42") DRV(voltcraft_vc820_ser, VOLTCRAFT_VC820_SER, "voltcraft-vc820-ser", "Voltcraft VC-820 (UT-D02 cable)") DRV(voltcraft_vc830_ser, VOLTCRAFT_VC830_SER, "voltcraft-vc830-ser", "Voltcraft VC-830 (UT-D02 cable)") DRV(voltcraft_vc840_ser, VOLTCRAFT_VC840_SER, "voltcraft-vc840-ser", "Voltcraft VC-840 (UT-D02 cable)") +DRV(voltcraft_vc920_ser, VOLTCRAFT_VC920_SER, "voltcraft-vc920-ser", "Voltcraft VC-920 (UT-D02 cable)") +DRV(voltcraft_vc940_ser, VOLTCRAFT_VC940_SER, "voltcraft-vc940-ser", "Voltcraft VC-940 (UT-D02 cable)") +DRV(voltcraft_vc960_ser, VOLTCRAFT_VC960_SER, "voltcraft-vc960-ser", "Voltcraft VC-960 (UT-D02 cable)") DRV(uni_t_ut60a_ser, UNI_T_UT60A_SER, "uni-t-ut60a-ser", "UNI-T UT60A (UT-D02 cable)") DRV(uni_t_ut60e_ser, UNI_T_UT60E_SER, "uni-t-ut60e-ser", "UNI-T UT60E (UT-D02 cable)") DRV(uni_t_ut60g_ser, UNI_T_UT60G_SER, "uni-t-ut60g-ser", "UNI-T UT60G (UT-D02 cable)") @@ -633,6 +695,11 @@ DRV(uni_t_ut61b_ser, UNI_T_UT61B_SER, "uni-t-ut61b-ser", "UNI-T UT61B (UT-D02 ca DRV(uni_t_ut61c_ser, UNI_T_UT61C_SER, "uni-t-ut61c-ser", "UNI-T UT61C (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)") +DRV(uni_t_ut71a_ser, UNI_T_UT71A_SER, "uni-t-ut71a-ser", "UNI-T UT71A (UT-D02 cable)") +DRV(uni_t_ut71b_ser, UNI_T_UT71B_SER, "uni-t-ut71b-ser", "UNI-T UT71B (UT-D02 cable)") +DRV(uni_t_ut71c_ser, UNI_T_UT71C_SER, "uni-t-ut71c-ser", "UNI-T UT71C (UT-D02 cable)") +DRV(uni_t_ut71d_ser, UNI_T_UT71D_SER, "uni-t-ut71d-ser", "UNI-T UT71D (UT-D02 cable)") +DRV(uni_t_ut71e_ser, UNI_T_UT71E_SER, "uni-t-ut71e-ser", "UNI-T UT71E (UT-D02 cable)") DRV(iso_tech_idm103n, ISO_TECH_IDM103N, "iso-tech-idm103n", "ISO-TECH IDM103N") DRV(tenma_72_7745_ser, TENMA_72_7745_SER, "tenma-72-7745-ser", "Tenma 72-7745 (UT-D02 cable)") DRV(tenma_72_7750_ser, TENMA_72_7750_SER, "tenma-72-7750-ser", "Tenma 72-7750 (UT-D02 cable)") diff --git a/src/hardware/serial-dmm/protocol.c b/src/hardware/serial-dmm/protocol.c index e667ca49..6b34e2e4 100644 --- a/src/hardware/serial-dmm/protocol.c +++ b/src/hardware/serial-dmm/protocol.c @@ -213,6 +213,9 @@ RECEIVE_DATA(VOLTCRAFT_ME42, metex14) RECEIVE_DATA(VOLTCRAFT_VC820_SER, fs9721) RECEIVE_DATA(VOLTCRAFT_VC830_SER, fs9922) RECEIVE_DATA(VOLTCRAFT_VC840_SER, fs9721) +RECEIVE_DATA(VOLTCRAFT_VC920_SER, ut71x) +RECEIVE_DATA(VOLTCRAFT_VC940_SER, ut71x) +RECEIVE_DATA(VOLTCRAFT_VC960_SER, ut71x) RECEIVE_DATA(UNI_T_UT60A_SER, fs9721) RECEIVE_DATA(UNI_T_UT60E_SER, fs9721) RECEIVE_DATA(UNI_T_UT60G_SER, es519xx) @@ -220,6 +223,11 @@ RECEIVE_DATA(UNI_T_UT61B_SER, fs9922) RECEIVE_DATA(UNI_T_UT61C_SER, fs9922) RECEIVE_DATA(UNI_T_UT61D_SER, fs9922) RECEIVE_DATA(UNI_T_UT61E_SER, es519xx) +RECEIVE_DATA(UNI_T_UT71A_SER, ut71x) +RECEIVE_DATA(UNI_T_UT71B_SER, ut71x) +RECEIVE_DATA(UNI_T_UT71C_SER, ut71x) +RECEIVE_DATA(UNI_T_UT71D_SER, ut71x) +RECEIVE_DATA(UNI_T_UT71E_SER, ut71x) RECEIVE_DATA(ISO_TECH_IDM103N, es519xx) RECEIVE_DATA(TENMA_72_7745_SER, fs9721) RECEIVE_DATA(TENMA_72_7750_SER, es519xx) diff --git a/src/hardware/serial-dmm/protocol.h b/src/hardware/serial-dmm/protocol.h index 24689467..b4ab0563 100644 --- a/src/hardware/serial-dmm/protocol.h +++ b/src/hardware/serial-dmm/protocol.h @@ -46,6 +46,9 @@ enum { VOLTCRAFT_VC820_SER, VOLTCRAFT_VC830_SER, VOLTCRAFT_VC840_SER, + VOLTCRAFT_VC920_SER, + VOLTCRAFT_VC940_SER, + VOLTCRAFT_VC960_SER, UNI_T_UT60A_SER, UNI_T_UT60E_SER, UNI_T_UT60G_SER, @@ -53,6 +56,11 @@ enum { UNI_T_UT61C_SER, UNI_T_UT61D_SER, UNI_T_UT61E_SER, + UNI_T_UT71A_SER, + UNI_T_UT71B_SER, + UNI_T_UT71C_SER, + UNI_T_UT71D_SER, + UNI_T_UT71E_SER, ISO_TECH_IDM103N, TENMA_72_7745_SER, TENMA_72_7750_SER, @@ -146,6 +154,9 @@ SR_PRIV int receive_data_VOLTCRAFT_ME42(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_VC830_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_VOLTCRAFT_VC920_SER(int fd, int revents, void *cb_data); +SR_PRIV int receive_data_VOLTCRAFT_VC940_SER(int fd, int revents, void *cb_data); +SR_PRIV int receive_data_VOLTCRAFT_VC960_SER(int fd, int revents, void *cb_data); SR_PRIV int receive_data_UNI_T_UT60A_SER(int fd, int revents, void *cb_data); SR_PRIV int receive_data_UNI_T_UT60E_SER(int fd, int revents, void *cb_data); SR_PRIV int receive_data_UNI_T_UT60G_SER(int fd, int revents, void *cb_data); @@ -153,6 +164,11 @@ SR_PRIV int receive_data_UNI_T_UT61B_SER(int fd, int revents, void *cb_data); SR_PRIV int receive_data_UNI_T_UT61C_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 int receive_data_UNI_T_UT71A_SER(int fd, int revents, void *cb_data); +SR_PRIV int receive_data_UNI_T_UT71B_SER(int fd, int revents, void *cb_data); +SR_PRIV int receive_data_UNI_T_UT71C_SER(int fd, int revents, void *cb_data); +SR_PRIV int receive_data_UNI_T_UT71D_SER(int fd, int revents, void *cb_data); +SR_PRIV int receive_data_UNI_T_UT71E_SER(int fd, int revents, void *cb_data); SR_PRIV int receive_data_ISO_TECH_IDM103N(int fd, int revents, void *cb_data); SR_PRIV int receive_data_TENMA_72_7745_SER(int fd, int revents, void *cb_data); SR_PRIV int receive_data_TENMA_72_7750_SER(int fd, int revents, void *cb_data); diff --git a/src/hardware/uni-t-dmm/api.c b/src/hardware/uni-t-dmm/api.c index f09710e6..a69885d6 100644 --- a/src/hardware/uni-t-dmm/api.c +++ b/src/hardware/uni-t-dmm/api.c @@ -45,9 +45,17 @@ SR_PRIV struct sr_dev_driver uni_t_ut61b_driver_info; SR_PRIV struct sr_dev_driver uni_t_ut61c_driver_info; SR_PRIV struct sr_dev_driver uni_t_ut61d_driver_info; SR_PRIV struct sr_dev_driver uni_t_ut61e_driver_info; +SR_PRIV struct sr_dev_driver uni_t_ut71a_driver_info; +SR_PRIV struct sr_dev_driver uni_t_ut71b_driver_info; +SR_PRIV struct sr_dev_driver uni_t_ut71c_driver_info; +SR_PRIV struct sr_dev_driver uni_t_ut71d_driver_info; +SR_PRIV struct sr_dev_driver uni_t_ut71e_driver_info; SR_PRIV struct sr_dev_driver voltcraft_vc820_driver_info; SR_PRIV struct sr_dev_driver voltcraft_vc830_driver_info; SR_PRIV struct sr_dev_driver voltcraft_vc840_driver_info; +SR_PRIV struct sr_dev_driver voltcraft_vc920_driver_info; +SR_PRIV struct sr_dev_driver voltcraft_vc940_driver_info; +SR_PRIV struct sr_dev_driver voltcraft_vc960_driver_info; SR_PRIV struct sr_dev_driver tenma_72_7745_driver_info; SR_PRIV struct sr_dev_driver tenma_72_7750_driver_info; @@ -110,6 +118,31 @@ SR_PRIV struct dmm_info udmms[] = { NULL, &uni_t_ut61e_driver_info, receive_data_UNI_T_UT61E, }, + { + "UNI-T", "UT71A", 2400, UT71X_PACKET_SIZE, + sr_ut71x_packet_valid, sr_ut71x_parse, NULL, + &uni_t_ut71a_driver_info, receive_data_UNI_T_UT71A, + }, + { + "UNI-T", "UT71B", 2400, UT71X_PACKET_SIZE, + sr_ut71x_packet_valid, sr_ut71x_parse, NULL, + &uni_t_ut71b_driver_info, receive_data_UNI_T_UT71B, + }, + { + "UNI-T", "UT71C", 2400, UT71X_PACKET_SIZE, + sr_ut71x_packet_valid, sr_ut71x_parse, NULL, + &uni_t_ut71c_driver_info, receive_data_UNI_T_UT71C, + }, + { + "UNI-T", "UT71D", 2400, UT71X_PACKET_SIZE, + sr_ut71x_packet_valid, sr_ut71x_parse, NULL, + &uni_t_ut71d_driver_info, receive_data_UNI_T_UT71D, + }, + { + "UNI-T", "UT71E", 2400, UT71X_PACKET_SIZE, + sr_ut71x_packet_valid, sr_ut71x_parse, NULL, + &uni_t_ut71e_driver_info, receive_data_UNI_T_UT71E, + }, { "Voltcraft", "VC-820", 2400, FS9721_PACKET_SIZE, @@ -136,6 +169,21 @@ SR_PRIV struct dmm_info udmms[] = { sr_fs9721_00_temp_c, &voltcraft_vc840_driver_info, receive_data_VOLTCRAFT_VC840, }, + { + "Voltcraft", "VC-920", 2400, UT71X_PACKET_SIZE, + sr_ut71x_packet_valid, sr_ut71x_parse, NULL, + &voltcraft_vc920_driver_info, receive_data_VOLTCRAFT_VC920, + }, + { + "Voltcraft", "VC-940", 2400, UT71X_PACKET_SIZE, + sr_ut71x_packet_valid, sr_ut71x_parse, NULL, + &voltcraft_vc940_driver_info, receive_data_VOLTCRAFT_VC940, + }, + { + "Voltcraft", "VC-960", 2400, UT71X_PACKET_SIZE, + sr_ut71x_packet_valid, sr_ut71x_parse, NULL, + &voltcraft_vc960_driver_info, receive_data_VOLTCRAFT_VC960, + }, { "Tenma", "72-7745", 2400, FS9721_PACKET_SIZE, @@ -415,8 +463,16 @@ DRV(uni_t_ut61b, UNI_T_UT61B, "uni-t-ut61b", "UNI-T UT61B") DRV(uni_t_ut61c, UNI_T_UT61C, "uni-t-ut61c", "UNI-T UT61C") DRV(uni_t_ut61d, UNI_T_UT61D, "uni-t-ut61d", "UNI-T UT61D") DRV(uni_t_ut61e, UNI_T_UT61E, "uni-t-ut61e", "UNI-T UT61E") +DRV(uni_t_ut71a, UNI_T_UT71A, "uni-t-ut71a", "UNI-T UT71A") +DRV(uni_t_ut71b, UNI_T_UT71B, "uni-t-ut71b", "UNI-T UT71B") +DRV(uni_t_ut71c, UNI_T_UT71C, "uni-t-ut71c", "UNI-T UT71C") +DRV(uni_t_ut71d, UNI_T_UT71D, "uni-t-ut71d", "UNI-T UT71D") +DRV(uni_t_ut71e, UNI_T_UT71E, "uni-t-ut71e", "UNI-T UT71E") DRV(voltcraft_vc820, VOLTCRAFT_VC820, "voltcraft-vc820", "Voltcraft VC-820") DRV(voltcraft_vc830, VOLTCRAFT_VC830, "voltcraft-vc830", "Voltcraft VC-830") DRV(voltcraft_vc840, VOLTCRAFT_VC840, "voltcraft-vc840", "Voltcraft VC-840") +DRV(voltcraft_vc920, VOLTCRAFT_VC920, "voltcraft-vc920", "Voltcraft VC-920") +DRV(voltcraft_vc940, VOLTCRAFT_VC940, "voltcraft-vc940", "Voltcraft VC-940") +DRV(voltcraft_vc960, VOLTCRAFT_VC960, "voltcraft-vc960", "Voltcraft VC-960") DRV(tenma_72_7745, TENMA_72_7745, "tenma-72-7745", "Tenma 72-7745") DRV(tenma_72_7750, TENMA_72_7750, "tenma-72-7750", "Tenma 72-7750") diff --git a/src/hardware/uni-t-dmm/protocol.c b/src/hardware/uni-t-dmm/protocol.c index ca2568e8..37144980 100644 --- a/src/hardware/uni-t-dmm/protocol.c +++ b/src/hardware/uni-t-dmm/protocol.c @@ -226,19 +226,21 @@ static int get_and_handle_data(struct sr_dev_inst *sdi, int dmm, void *info) * Append the 1-7 data bytes of this chunk to pbuf. * * Special case: - * DMMs with Cyrustek ES51922 chip need serial settings of - * 19230/7o1. The WCH CH9325 UART to USB/HID chip used in (some + * DMMs with Cyrustek ES51922 chip and UT71x DMMs need serial settings + * of 7o1. The WCH CH9325 UART to USB/HID chip used in (some * versions of) the UNI-T UT-D04 cable however, will also send * the parity bit to the host in the 8-byte data chunks. This bit * is encoded in bit 7 of each of the 1-7 data bytes and must thus - * be removed in order for the actual ES51922 protocol parser to - * work properly. + * be removed in order for the actual protocol parser to work properly. */ num_databytes_in_chunk = buf[0] & 0x0f; for (i = 0; i < num_databytes_in_chunk; i++, devc->buflen++) { pbuf[devc->buflen] = buf[1 + i]; - if (udmms[dmm].packet_parse == sr_es519xx_19200_14b_parse) + if ((udmms[dmm].packet_parse == sr_es519xx_19200_14b_parse) || + (udmms[dmm].packet_parse == sr_ut71x_parse)) { + /* Mask off the parity bit. */ pbuf[devc->buflen] &= ~(1 << 7); + } } /* Now look for packets in that data. */ @@ -308,8 +310,16 @@ RECEIVE_DATA(UNI_T_UT61B, fs9922) RECEIVE_DATA(UNI_T_UT61C, fs9922) RECEIVE_DATA(UNI_T_UT61D, fs9922) RECEIVE_DATA(UNI_T_UT61E, es519xx) +RECEIVE_DATA(UNI_T_UT71A, ut71x) +RECEIVE_DATA(UNI_T_UT71B, ut71x) +RECEIVE_DATA(UNI_T_UT71C, ut71x) +RECEIVE_DATA(UNI_T_UT71D, ut71x) +RECEIVE_DATA(UNI_T_UT71E, ut71x) RECEIVE_DATA(VOLTCRAFT_VC820, fs9721) RECEIVE_DATA(VOLTCRAFT_VC830, fs9922) RECEIVE_DATA(VOLTCRAFT_VC840, fs9721) +RECEIVE_DATA(VOLTCRAFT_VC920, ut71x) +RECEIVE_DATA(VOLTCRAFT_VC940, ut71x) +RECEIVE_DATA(VOLTCRAFT_VC960, ut71x) RECEIVE_DATA(TENMA_72_7745, es519xx) RECEIVE_DATA(TENMA_72_7750, es519xx) diff --git a/src/hardware/uni-t-dmm/protocol.h b/src/hardware/uni-t-dmm/protocol.h index 08fb5373..85783082 100644 --- a/src/hardware/uni-t-dmm/protocol.h +++ b/src/hardware/uni-t-dmm/protocol.h @@ -38,9 +38,17 @@ enum { UNI_T_UT61C, UNI_T_UT61D, UNI_T_UT61E, + UNI_T_UT71A, + UNI_T_UT71B, + UNI_T_UT71C, + UNI_T_UT71D, + UNI_T_UT71E, VOLTCRAFT_VC820, VOLTCRAFT_VC830, VOLTCRAFT_VC840, + VOLTCRAFT_VC920, + VOLTCRAFT_VC940, + VOLTCRAFT_VC960, TENMA_72_7745, TENMA_72_7750, }; @@ -93,9 +101,17 @@ SR_PRIV int receive_data_UNI_T_UT61B(int fd, int revents, void *cb_data); SR_PRIV int receive_data_UNI_T_UT61C(int fd, int revents, void *cb_data); SR_PRIV int receive_data_UNI_T_UT61D(int fd, int revents, void *cb_data); SR_PRIV int receive_data_UNI_T_UT61E(int fd, int revents, void *cb_data); +SR_PRIV int receive_data_UNI_T_UT71A(int fd, int revents, void *cb_data); +SR_PRIV int receive_data_UNI_T_UT71B(int fd, int revents, void *cb_data); +SR_PRIV int receive_data_UNI_T_UT71C(int fd, int revents, void *cb_data); +SR_PRIV int receive_data_UNI_T_UT71D(int fd, int revents, void *cb_data); +SR_PRIV int receive_data_UNI_T_UT71E(int fd, int revents, void *cb_data); SR_PRIV int receive_data_VOLTCRAFT_VC820(int fd, int revents, void *cb_data); SR_PRIV int receive_data_VOLTCRAFT_VC830(int fd, int revents, void *cb_data); SR_PRIV int receive_data_VOLTCRAFT_VC840(int fd, int revents, void *cb_data); +SR_PRIV int receive_data_VOLTCRAFT_VC920(int fd, int revents, void *cb_data); +SR_PRIV int receive_data_VOLTCRAFT_VC940(int fd, int revents, void *cb_data); +SR_PRIV int receive_data_VOLTCRAFT_VC960(int fd, int revents, void *cb_data); SR_PRIV int receive_data_TENMA_72_7745(int fd, int revents, void *cb_data); SR_PRIV int receive_data_TENMA_72_7750(int fd, int revents, void *cb_data);