]> sigrok.org Git - libsigrok.git/commitdiff
serial-dmm: Add UNI-T UT61E support (UT-D02 cable).
authorUwe Hermann <redacted>
Wed, 26 Dec 2012 00:53:50 +0000 (01:53 +0100)
committerUwe Hermann <redacted>
Thu, 3 Jan 2013 00:13:57 +0000 (01:13 +0100)
hardware/serial-dmm/api.c
hardware/serial-dmm/protocol.c
hardware/serial-dmm/protocol.h
hwdriver.c

index bb13110c726a15a159e7661c799215d75df65fe6..aa86f3b522f86e30bb8a98d4d65405aea0017152 100644 (file)
@@ -61,6 +61,7 @@ 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 sr_dev_driver voltcraft_vc840_ser_driver_info;
+SR_PRIV struct sr_dev_driver uni_t_ut61e_ser_driver_info;
 
 SR_PRIV struct dmm_info dmms[] = {
        {
@@ -156,6 +157,13 @@ SR_PRIV struct dmm_info dmms[] = {
                &voltcraft_vc840_ser_driver_info,
                receive_data_VOLTCRAFT_VC840_SER,
        },
+       {
+               /* Note: ES51922 baudrate is actually 19230! */
+               "UNI-T", "UT61E (UT-D02 cable)", "19200/7o1/rts=0/dtr=1",
+               19200, ES51922_PACKET_SIZE, NULL,
+               sr_es51922_packet_valid, sr_es51922_parse, NULL,
+               &uni_t_ut61e_ser_driver_info, receive_data_UNI_T_UT61E_SER,
+       },
 };
 
 /* Properly close and free all devices. */
@@ -555,3 +563,4 @@ DRV(radioshack_22_168, RADIOSHACK_22_168, "radioshack-22-168", "RadioShack 22-16
 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_ut61e_ser, UNI_T_UT61E_SER, "uni-t-ut61e-ser", "UNI-T UT61E (UT-D02 cable)")
index 90c43c69725fe0c6dc517d9625ba4701305a2cb6..15ddc74db641d6ec5fffde0fd70b294d7660b1c1 100644 (file)
@@ -215,3 +215,4 @@ RECEIVE_DATA(RADIOSHACK_22_168, metex14)
 RECEIVE_DATA(RADIOSHACK_22_812, rs9lcd)
 RECEIVE_DATA(VOLTCRAFT_VC820_SER, fs9721)
 RECEIVE_DATA(VOLTCRAFT_VC840_SER, fs9721)
+RECEIVE_DATA(UNI_T_UT61E_SER, es51922)
index a15469ec1a09f69d26ff7a20dfff4d232451c93a..51ad9c48c6e900c86c3a673e36004be8310d9be6 100644 (file)
@@ -44,9 +44,10 @@ enum {
        RADIOSHACK_22_812,
        VOLTCRAFT_VC820_SER,
        VOLTCRAFT_VC840_SER,
+       UNI_T_UT61E_SER,
 };
 
-#define DMM_COUNT 13
+#define DMM_COUNT 14
 
 struct dmm_info {
        char *vendor;
@@ -103,6 +104,7 @@ 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_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_UT61E_SER(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 455f02aa6c4d31225a4926fc37d1d365a328bc5d..bee5c022b22c2c291d17fa085cb3f11192046957 100644 (file)
@@ -130,6 +130,7 @@ 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;
 extern SR_PRIV struct sr_dev_driver voltcraft_vc840_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 uni_t_ut61d_driver_info;
@@ -200,6 +201,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_ut61e_ser_driver_info,
 #endif
 #ifdef HAVE_HW_UNI_T_DMM
        &uni_t_ut61d_driver_info,