]> sigrok.org Git - libsigrok.git/commitdiff
Add support for the Tenma 72-7750 (UNI-T UT60G rebadge).
authorUwe Hermann <redacted>
Mon, 6 Jan 2014 16:20:35 +0000 (17:20 +0100)
committerUwe Hermann <redacted>
Mon, 6 Jan 2014 19:30:35 +0000 (20:30 +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 ca4439b91abbf7249b91797172862b41b4b6635f..70706be1f5e55860693308c66ee8a6381252b31b 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.
+ - 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 UT325: Briefly press the "SEND" button (as per manual). However, it
index ea1ba90a8f1207a647212315424927646f6f7a7e..7fa7aa2af99ef2ffa97cc2e5116bc76e4020d546 100644 (file)
@@ -70,6 +70,7 @@ 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 iso_tech_idm103n_driver_info;
+SR_PRIV struct sr_dev_driver tenma_72_7750_ser_driver_info;
 
 SR_PRIV struct dmm_info dmms[] = {
        {
@@ -283,6 +284,14 @@ SR_PRIV struct dmm_info dmms[] = {
                sr_es519xx_2400_11b_packet_valid, sr_es519xx_2400_11b_parse, NULL,
                &iso_tech_idm103n_driver_info, receive_data_ISO_TECH_IDM103N,
        },
+       {
+               /* Note: ES51986 baudrate is actually 19230! */
+               "Tenma", "72-7750 (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,
+               &tenma_72_7750_ser_driver_info, receive_data_TENMA_72_7750_SER,
+       },
 };
 
 static int dev_clear(int dmm)
@@ -591,3 +600,4 @@ DRV(uni_t_ut61c_ser, UNI_T_UT61C_SER, "uni-t-ut61c-ser", "UNI-T UT61C (UT-D02 ca
 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(iso_tech_idm103n, ISO_TECH_IDM103N, "iso-tech-idm103n", "ISO-TECH IDM103N")
+DRV(tenma_72_7750_ser, TENMA_72_7750_SER, "tenma-72-7750-ser", "Tenma 72-7750 (UT-D02 cable)")
index efb687aa6d5035e2e37f1a797334a99fbc77fb79..69727e10d93890d883bd6bc37aed15b6f58be205 100644 (file)
@@ -189,3 +189,4 @@ RECEIVE_DATA(UNI_T_UT61C_SER, fs9922)
 RECEIVE_DATA(UNI_T_UT61D_SER, fs9922)
 RECEIVE_DATA(UNI_T_UT61E_SER, es519xx)
 RECEIVE_DATA(ISO_TECH_IDM103N, es519xx)
+RECEIVE_DATA(TENMA_72_7750_SER, es519xx)
index 569aedcc9866edfa4778195f93d8b39c864e392f..28211d32a1b14ebb3e43b9cf1c53fb3a2376adc7 100644 (file)
@@ -53,9 +53,10 @@ enum {
        UNI_T_UT61D_SER,
        UNI_T_UT61E_SER,
        ISO_TECH_IDM103N,
+       TENMA_72_7750_SER,
 };
 
-#define DMM_COUNT 29
+#define DMM_COUNT 30
 
 struct dmm_info {
        /** Manufacturer/brand. */
@@ -137,5 +138,6 @@ 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_ISO_TECH_IDM103N(int fd, int revents, void *cb_data);
+SR_PRIV int receive_data_TENMA_72_7750_SER(int fd, int revents, void *cb_data);
 
 #endif
index 99c026a9059bcc3c89a5c0648b85b62dfb3d9801..1eccfdc5de5b53f1b4778b13949ec53556e85842 100644 (file)
@@ -49,6 +49,7 @@ 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 tenma_72_7745_driver_info;
+SR_PRIV struct sr_dev_driver tenma_72_7750_driver_info;
 
 SR_PRIV struct dmm_info udmms[] = {
        {
@@ -73,15 +74,7 @@ SR_PRIV struct dmm_info udmms[] = {
                &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).
-                */
+               /* The baudrate is actually 19230, see "Note 1" below. */
                "UNI-T", "UT60G", 19200,
                ES519XX_11B_PACKET_SIZE,
                sr_es519xx_19200_11b_packet_valid, sr_es519xx_19200_11b_parse,
@@ -110,15 +103,7 @@ SR_PRIV struct dmm_info udmms[] = {
                &uni_t_ut61d_driver_info, receive_data_UNI_T_UT61D,
        },
        {
-               /*
-                * Important: The actual baudrate of the Cyrustek ES51922 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).
-                */
+               /* The baudrate is actually 19230, see "Note 1" below. */
                "UNI-T", "UT61E", 19200,
                ES519XX_14B_PACKET_SIZE,
                sr_es519xx_19200_14b_packet_valid, sr_es519xx_19200_14b_parse,
@@ -156,12 +141,26 @@ SR_PRIV struct dmm_info udmms[] = {
                FS9721_PACKET_SIZE,
                sr_fs9721_packet_valid, sr_fs9721_parse,
                sr_fs9721_00_temp_c,
-               &tenma_72_7745_driver_info,
-               /* This is a basic rebadge of the UT60E. */
-               receive_data_UNI_T_UT60E,
+               &tenma_72_7745_driver_info, receive_data_TENMA_72_7745,
+       },
+       {
+               /* The baudrate is actually 19230, see "Note 1" below. */
+               "Tenma", "72-7750", 19200,
+               ES519XX_11B_PACKET_SIZE,
+               sr_es519xx_19200_11b_packet_valid, sr_es519xx_19200_11b_parse,
+               NULL,
+               &tenma_72_7750_driver_info, receive_data_TENMA_72_7750,
        },
 };
 
+/*
+ * Note 1: The actual baudrate of the Cyrustek ES519xx 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).
+ */
+
 static int dev_clear(int dmm)
 {
        return std_dev_clear(udmms[dmm].di, NULL);
@@ -425,3 +424,4 @@ 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(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")
index 5b9c57bbb9a7fec876730e8e5dfbef8a5b428f2d..5843d5e7535b6f66043e532132286e5b62d55e4b 100644 (file)
@@ -311,3 +311,5 @@ RECEIVE_DATA(UNI_T_UT61E, es519xx)
 RECEIVE_DATA(VOLTCRAFT_VC820, fs9721)
 RECEIVE_DATA(VOLTCRAFT_VC830, fs9922)
 RECEIVE_DATA(VOLTCRAFT_VC840, fs9721)
+RECEIVE_DATA(TENMA_72_7745, es519xx)
+RECEIVE_DATA(TENMA_72_7750, es519xx)
index 1fa1830b1a03022f100bafbd8b9fb8e1339171a1..08fb537317ad3a7de4b0de76c0a0e864dbff126b 100644 (file)
@@ -42,6 +42,7 @@ enum {
        VOLTCRAFT_VC830,
        VOLTCRAFT_VC840,
        TENMA_72_7745,
+       TENMA_72_7750,
 };
 
 struct dmm_info {
@@ -95,5 +96,7 @@ 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);
 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_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);
 
 #endif
index 6ff5ebc59860fd1e0e9c519cddc55792dad5d953..300bfe66aa98b8af2ac8432542814c72f2df749f 100644 (file)
@@ -226,6 +226,7 @@ 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 iso_tech_idm103n_driver_info;
+extern SR_PRIV struct sr_dev_driver tenma_72_7750_ser_driver_info;
 #endif
 #ifdef HAVE_HW_UNI_T_DMM
 extern SR_PRIV struct sr_dev_driver tecpel_dmm_8061_driver_info;
@@ -240,6 +241,7 @@ 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 tenma_72_7745_driver_info;
+extern SR_PRIV struct sr_dev_driver tenma_72_7750_driver_info;
 #endif
 /** @endcond */
 
@@ -366,6 +368,8 @@ static struct sr_dev_driver *drivers_list[] = {
        &uni_t_ut61d_ser_driver_info,
        &uni_t_ut61e_ser_driver_info,
        &iso_tech_idm103n_driver_info,
+       &tenma_72_7745_ser_driver_info,
+       &tenma_72_7750_ser_driver_info,
 #endif
 #ifdef HAVE_HW_UNI_T_DMM
        &tecpel_dmm_8061_driver_info,
@@ -380,6 +384,7 @@ static struct sr_dev_driver *drivers_list[] = {
        &voltcraft_vc830_driver_info,
        &voltcraft_vc840_driver_info,
        &tenma_72_7745_driver_info,
+       &tenma_72_7750_driver_info,
 #endif
        NULL,
 };