]> sigrok.org Git - libsigrok.git/commitdiff
Add initial support for the UNI-T UT60G.
authorUwe Hermann <redacted>
Fri, 3 Jan 2014 21:32:16 +0000 (22:32 +0100)
committerUwe Hermann <redacted>
Mon, 6 Jan 2014 18:06:51 +0000 (19:06 +0100)
README.devices
hardware/serial-dmm/api.c
hardware/serial-dmm/protocol.c
hardware/serial-dmm/protocol.h
hardware/uni-t-dmm/api.c
hardware/uni-t-dmm/protocol.c
hardware/uni-t-dmm/protocol.h
hwdriver.c

index c51e1d7227754de6f2e0f0b474820f3550334d53..ca4439b91abbf7249b91797172862b41b4b6635f 100644 (file)
@@ -295,6 +295,7 @@ a short list for convenience:
  - PCE PCE-DM32: Briefly press the "RS232" button.
  - RadioShack 22-812: Press and hold "SELECT" and "RANGE" together.
  - TekPower TP4000ZC: Briefly press the "RS232" 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 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
index b5892758977a3ce8bdad07134d5256877de0f8be..ea1ba90a8f1207a647212315424927646f6f7a7e 100644 (file)
@@ -64,6 +64,7 @@ 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 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;
 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;
@@ -243,6 +244,14 @@ SR_PRIV struct dmm_info dmms[] = {
                &uni_t_ut60e_ser_driver_info,
                receive_data_UNI_T_UT60E_SER,
        },
+       {
+               /* Note: ES51986 baudrate is actually 19230! */
+               "UNI-T", "UT60G (UT-D02 cable)", "19200/7o1/rts=0/dtr=1",
+               19200, ES519XX_11B_PACKET_SIZE, NULL,
+               sr_es519xx_19200_11b_packet_valid, sr_es519xx_19200_11b_parse,
+               NULL,
+               &uni_t_ut60g_ser_driver_info, receive_data_UNI_T_UT60G_SER,
+       },
        {
                "UNI-T", "UT61B (UT-D02 cable)", "2400/8n1/rts=0/dtr=1",
                2400, FS9922_PACKET_SIZE, NULL,
@@ -576,6 +585,7 @@ DRV(voltcraft_vc830_ser, VOLTCRAFT_VC830_SER, "voltcraft-vc830-ser", "Voltcraft
 DRV(voltcraft_vc840_ser, VOLTCRAFT_VC840_SER, "voltcraft-vc840-ser", "Voltcraft VC-840 (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)")
 DRV(uni_t_ut61b_ser, UNI_T_UT61B_SER, "uni-t-ut61b-ser", "UNI-T UT61B (UT-D02 cable)")
 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)")
index 8a1db9fbc2a9b43e28ea94555b5d398df61698ea..efb687aa6d5035e2e37f1a797334a99fbc77fb79 100644 (file)
@@ -183,6 +183,7 @@ RECEIVE_DATA(VOLTCRAFT_VC830_SER, fs9922)
 RECEIVE_DATA(VOLTCRAFT_VC840_SER, fs9721)
 RECEIVE_DATA(UNI_T_UT60A_SER, fs9721)
 RECEIVE_DATA(UNI_T_UT60E_SER, fs9721)
+RECEIVE_DATA(UNI_T_UT60G_SER, es519xx)
 RECEIVE_DATA(UNI_T_UT61B_SER, fs9922)
 RECEIVE_DATA(UNI_T_UT61C_SER, fs9922)
 RECEIVE_DATA(UNI_T_UT61D_SER, fs9922)
index 078901e580df09e5a3768930472a538ad5dc7ae2..569aedcc9866edfa4778195f93d8b39c864e392f 100644 (file)
@@ -47,6 +47,7 @@ enum {
        VOLTCRAFT_VC840_SER,
        UNI_T_UT60A_SER,
        UNI_T_UT60E_SER,
+       UNI_T_UT60G_SER,
        UNI_T_UT61B_SER,
        UNI_T_UT61C_SER,
        UNI_T_UT61D_SER,
@@ -54,7 +55,7 @@ enum {
        ISO_TECH_IDM103N,
 };
 
-#define DMM_COUNT 28
+#define DMM_COUNT 29
 
 struct dmm_info {
        /** Manufacturer/brand. */
@@ -130,6 +131,7 @@ 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_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);
 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);
index d44ca26620a2e8019b1e8ccf12aae2f054fe7cdd..99c026a9059bcc3c89a5c0648b85b62dfb3d9801 100644 (file)
@@ -40,6 +40,7 @@ static const int32_t hwcaps[] = {
 SR_PRIV struct sr_dev_driver tecpel_dmm_8061_driver_info;
 SR_PRIV struct sr_dev_driver uni_t_ut60a_driver_info;
 SR_PRIV struct sr_dev_driver uni_t_ut60e_driver_info;
+SR_PRIV struct sr_dev_driver uni_t_ut60g_driver_info;
 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;
@@ -71,6 +72,22 @@ SR_PRIV struct dmm_info udmms[] = {
                sr_fs9721_00_temp_c,
                &uni_t_ut60e_driver_info, receive_data_UNI_T_UT60E,
        },
+       {
+               /*
+                * Important: The actual baudrate of the Cyrustek ES51986 chip
+                * used in this DMM is 19230. However, the WCH CH9325 chip
+                * (UART to USB/HID) used in (some versions of) the UNI-T
+                * UT-D04 cable doesn't support 19230 baud. It only supports
+                * 19200, and setting an unsupported baudrate will result in
+                * the default of 2400 being used (which will not work with
+                * this DMM, of course).
+                */
+               "UNI-T", "UT60G", 19200,
+               ES519XX_11B_PACKET_SIZE,
+               sr_es519xx_19200_11b_packet_valid, sr_es519xx_19200_11b_parse,
+               NULL,
+               &uni_t_ut60g_driver_info, receive_data_UNI_T_UT60G,
+       },
        {
                "UNI-T", "UT61B", 2400,
                FS9922_PACKET_SIZE,
@@ -399,6 +416,7 @@ SR_PRIV struct sr_dev_driver ID##_driver_info = { \
 DRV(tecpel_dmm_8061, TECPEL_DMM_8061, "tecpel-dmm-8061", "Tecpel DMM-8061")
 DRV(uni_t_ut60a, UNI_T_UT60A, "uni-t-ut60a", "UNI-T UT60A")
 DRV(uni_t_ut60e, UNI_T_UT60E, "uni-t-ut60e", "UNI-T UT60E")
+DRV(uni_t_ut60g, UNI_T_UT60G, "uni-t-ut60g", "UNI-T UT60G")
 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")
index 189cefd0536e544f7762dfbda647536e1d3c6649..5b9c57bbb9a7fec876730e8e5dfbef8a5b428f2d 100644 (file)
@@ -303,6 +303,7 @@ SR_PRIV int receive_data_##ID_UPPER(int fd, int revents, void *cb_data) { \
 RECEIVE_DATA(TECPEL_DMM_8061, fs9721)
 RECEIVE_DATA(UNI_T_UT60A, fs9721)
 RECEIVE_DATA(UNI_T_UT60E, fs9721)
+RECEIVE_DATA(UNI_T_UT60G, es519xx)
 RECEIVE_DATA(UNI_T_UT61B, fs9922)
 RECEIVE_DATA(UNI_T_UT61C, fs9922)
 RECEIVE_DATA(UNI_T_UT61D, fs9922)
index 3a0441067d6d06ae5a7e83bb2262ff1b4d01329a..1fa1830b1a03022f100bafbd8b9fb8e1339171a1 100644 (file)
@@ -33,6 +33,7 @@ enum {
        TECPEL_DMM_8061,
        UNI_T_UT60A,
        UNI_T_UT60E,
+       UNI_T_UT60G,
        UNI_T_UT61B,
        UNI_T_UT61C,
        UNI_T_UT61D,
@@ -86,6 +87,7 @@ struct dev_context {
 SR_PRIV int receive_data_TECPEL_DMM_8061(int fd, int revents, void *cb_data);
 SR_PRIV int receive_data_UNI_T_UT60A(int fd, int revents, void *cb_data);
 SR_PRIV int receive_data_UNI_T_UT60E(int fd, int revents, void *cb_data);
+SR_PRIV int receive_data_UNI_T_UT60G(int fd, int revents, void *cb_data);
 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);
index 3b9df9238e79692c4c90a5e7a19709def1a1cc4f..6ff5ebc59860fd1e0e9c519cddc55792dad5d953 100644 (file)
@@ -220,6 +220,7 @@ 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 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;
 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;
@@ -230,6 +231,7 @@ extern SR_PRIV struct sr_dev_driver iso_tech_idm103n_driver_info;
 extern SR_PRIV struct sr_dev_driver tecpel_dmm_8061_driver_info;
 extern SR_PRIV struct sr_dev_driver uni_t_ut60a_driver_info;
 extern SR_PRIV struct sr_dev_driver uni_t_ut60e_driver_info;
+extern SR_PRIV struct sr_dev_driver uni_t_ut60g_driver_info;
 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;
@@ -358,6 +360,7 @@ static struct sr_dev_driver *drivers_list[] = {
        &voltcraft_vc840_ser_driver_info,
        &uni_t_ut60a_ser_driver_info,
        &uni_t_ut60e_ser_driver_info,
+       &uni_t_ut60g_ser_driver_info,
        &uni_t_ut61b_ser_driver_info,
        &uni_t_ut61c_ser_driver_info,
        &uni_t_ut61d_ser_driver_info,
@@ -368,6 +371,7 @@ static struct sr_dev_driver *drivers_list[] = {
        &tecpel_dmm_8061_driver_info,
        &uni_t_ut60a_driver_info,
        &uni_t_ut60e_driver_info,
+       &uni_t_ut60g_driver_info,
        &uni_t_ut61b_driver_info,
        &uni_t_ut61c_driver_info,
        &uni_t_ut61d_driver_info,