]> sigrok.org Git - libsigrok.git/commitdiff
Support for UNI-T UT60A/E multimeters via RS232 or USB
authorFlorian Knodt <redacted>
Fri, 5 Jul 2013 12:02:50 +0000 (14:02 +0200)
committerUwe Hermann <redacted>
Tue, 9 Jul 2013 20:57:55 +0000 (22:57 +0200)
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 1c5272d4670606e49cc9cc5225a0c7573e13dece..5871e71ff37951c4dda3def6abe5659ef0d37a46 100644 (file)
@@ -59,6 +59,8 @@ SR_PRIV struct sr_dev_driver voltcraft_m3650d_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 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_ut61d_ser_driver_info;
 SR_PRIV struct sr_dev_driver uni_t_ut61e_ser_driver_info;
 
@@ -194,6 +196,22 @@ SR_PRIV struct dmm_info dmms[] = {
                &voltcraft_vc840_ser_driver_info,
                receive_data_VOLTCRAFT_VC840_SER,
        },
+       {
+               "UNI-T", "UT60A (UT-D02 cable)", "2400/8n1/rts=0/dtr=1",
+               2400, FS9721_PACKET_SIZE, NULL,
+               sr_fs9721_packet_valid, sr_fs9721_parse,
+               NULL,
+               &uni_t_ut60a_ser_driver_info,
+               receive_data_UNI_T_UT60A_SER,
+       },
+       {
+               "UNI-T", "UT60E (UT-D02 cable)", "2400/8n1/rts=0/dtr=1",
+               2400, FS9721_PACKET_SIZE, NULL,
+               sr_fs9721_packet_valid, sr_fs9721_parse,
+               sr_fs9721_00_temp_c,
+               &uni_t_ut60e_ser_driver_info,
+               receive_data_UNI_T_UT60E_SER,
+       },
        {
                "UNI-T", "UT61D (UT-D02 cable)", "2400/8n1/rts=0/dtr=1",
                2400, FS9922_PACKET_SIZE, NULL,
@@ -526,5 +544,7 @@ DRV(voltcraft_m3650d, VOLTCRAFT_M3650D, "voltcraft-m3650d", "Voltcraft M-3650D")
 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(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_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 3f18027037c1fe01410067f58b39bfa779ae484f..b5a4843e9070276bd0daefd48c4cc11ee40fb241 100644 (file)
@@ -176,5 +176,7 @@ RECEIVE_DATA(VOLTCRAFT_M3650D, metex14)
 RECEIVE_DATA(VOLTCRAFT_VC820_SER, fs9721)
 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_UT61D_SER, fs9922)
 RECEIVE_DATA(UNI_T_UT61E_SER, es51922)
index 51cdc0435d04bb30cb46787ec4d0059e5ba1dcc7..88c3da8872fcac9d5257e934aabb66b9fb0bbdde 100644 (file)
@@ -49,11 +49,13 @@ enum {
        VOLTCRAFT_VC820_SER,
        VOLTCRAFT_VC830_SER,
        VOLTCRAFT_VC840_SER,
+       UNI_T_UT60A_SER,
+       UNI_T_UT60E_SER,
        UNI_T_UT61D_SER,
        UNI_T_UT61E_SER,
 };
 
-#define DMM_COUNT 20
+#define DMM_COUNT 22
 
 struct dmm_info {
        char *vendor;
@@ -113,6 +115,8 @@ SR_PRIV int receive_data_VOLTCRAFT_M3650D(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_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_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);
 
index 8968d876663fd2711f99e3ed8f50621912da6c0d..4e97336cc76b606a477f80d0a2ff2145468e2b47 100644 (file)
@@ -39,6 +39,8 @@ static const int32_t hwcaps[] = {
 
 SR_PRIV struct sr_dev_driver tecpel_dmm_8060_driver_info;
 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_ut61d_driver_info;
 SR_PRIV struct sr_dev_driver uni_t_ut61e_driver_info;
 SR_PRIV struct sr_dev_driver voltcraft_vc820_driver_info;
@@ -60,6 +62,20 @@ SR_PRIV struct dmm_info udmms[] = {
                sr_fs9721_00_temp_c,
                &tecpel_dmm_8061_driver_info, receive_data_TECPEL_DMM_8061,
        },
+       {
+               "UNI-T", "UT60A", 2400,
+               FS9721_PACKET_SIZE, NULL,
+               sr_fs9721_packet_valid, sr_fs9721_parse,
+               NULL,
+               &uni_t_ut60a_driver_info, receive_data_UNI_T_UT60A,
+       },
+       {
+               "UNI-T", "UT60E", 2400,
+               FS9721_PACKET_SIZE, NULL,
+               sr_fs9721_packet_valid, sr_fs9721_parse,
+               sr_fs9721_00_temp_c,
+               &uni_t_ut60e_driver_info, receive_data_UNI_T_UT60E,
+       },
        {
                "UNI-T", "UT61D", 2400,
                FS9922_PACKET_SIZE, NULL,
@@ -345,6 +361,8 @@ SR_PRIV struct sr_dev_driver ID##_driver_info = { \
 
 DRV(tecpel_dmm_8060, TECPEL_DMM_8060, "tecpel-dmm-8060", "Tecpel DMM-8060")
 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_ut61d, UNI_T_UT61D, "uni-t-ut61d", "UNI-T UT61D")
 DRV(uni_t_ut61e, UNI_T_UT61E, "uni-t-ut61e", "UNI-T UT61E")
 DRV(voltcraft_vc820, VOLTCRAFT_VC820, "voltcraft-vc820", "Voltcraft VC-820")
index 1344948c5aa28ab0f712644fadcca373d866dbe7..66f0f3b7813c79343efb910df3584a7333f41dd3 100644 (file)
@@ -57,7 +57,8 @@
  *  - UNI-T UT109: ?
  *  - UNI-T UT30A: ?
  *  - UNI-T UT30E: ?
- *  - UNI-T UT60E: Fortune Semiconductor FS9721_LP3
+ *  - UNI-T UT60A: Fortune Semiconductor FS9721_LP3 (?)
+ *  - UNI-T UT60E: Fortune Semiconductor FS9721_LP3 (?)
  *  - UNI-T UT60G: ?
  *  - UNI-T UT61B: ?
  *  - UNI-T UT61C: ?
@@ -305,6 +306,8 @@ SR_PRIV int receive_data_##ID_UPPER(int fd, int revents, void *cb_data) { \
 /* Driver-specific receive_data() wrappers */
 RECEIVE_DATA(TECPEL_DMM_8060, fs9721)
 RECEIVE_DATA(TECPEL_DMM_8061, fs9721)
+RECEIVE_DATA(UNI_T_UT60A, fs9721)
+RECEIVE_DATA(UNI_T_UT60E, fs9721)
 RECEIVE_DATA(UNI_T_UT61D, fs9922)
 RECEIVE_DATA(UNI_T_UT61E, es51922)
 RECEIVE_DATA(VOLTCRAFT_VC820, fs9721)
index 709ca20e148482a201bf7f7078f55ed18c1c1607..1f9b169a7fff921650ef77c2eec0b04d58366510 100644 (file)
@@ -40,6 +40,8 @@
 enum {
        TECPEL_DMM_8060,
        TECPEL_DMM_8061,
+       UNI_T_UT60A,
+       UNI_T_UT60E,
        UNI_T_UT61D,
        UNI_T_UT61E,
        VOLTCRAFT_VC820,
@@ -47,7 +49,7 @@ enum {
        VOLTCRAFT_VC840,
 };
 
-#define DMM_COUNT 7
+#define DMM_COUNT 9
 
 struct dmm_info {
        char *vendor;
@@ -94,6 +96,8 @@ struct dev_context {
 
 SR_PRIV int receive_data_TECPEL_DMM_8060(int fd, int revents, void *cb_data);
 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_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_VOLTCRAFT_VC820(int fd, int revents, void *cb_data);
index 3ef19a2ea9dbd0d80fddac2ee804f792382cc2a1..08383e97363086b1d8d8bccb30e6afe3d1171645 100644 (file)
@@ -184,12 +184,16 @@ extern SR_PRIV struct sr_dev_driver voltcraft_m3650d_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 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_ut61d_ser_driver_info;
 extern SR_PRIV struct sr_dev_driver uni_t_ut61e_ser_driver_info;
 #endif
 #ifdef HAVE_HW_UNI_T_DMM
 extern SR_PRIV struct sr_dev_driver tecpel_dmm_8060_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_ut61d_driver_info;
 extern SR_PRIV struct sr_dev_driver uni_t_ut61e_driver_info;
 extern SR_PRIV struct sr_dev_driver voltcraft_vc820_driver_info;
@@ -282,12 +286,16 @@ static struct sr_dev_driver *drivers_list[] = {
        &voltcraft_vc820_ser_driver_info,
        &voltcraft_vc830_ser_driver_info,
        &voltcraft_vc840_ser_driver_info,
+       &uni_t_ut60a_ser_driver_info,
+       &uni_t_ut60e_ser_driver_info,
        &uni_t_ut61d_ser_driver_info,
        &uni_t_ut61e_ser_driver_info,
 #endif
 #ifdef HAVE_HW_UNI_T_DMM
        &tecpel_dmm_8060_driver_info,
        &tecpel_dmm_8061_driver_info,
+       &uni_t_ut60a_driver_info,
+       &uni_t_ut60e_driver_info,
        &uni_t_ut61d_driver_info,
        &uni_t_ut61e_driver_info,
        &voltcraft_vc820_driver_info,