From: Uwe Hermann Date: Mon, 6 Jan 2014 17:08:55 +0000 (+0100) Subject: serial-dmm: Support the Tenma 72-7745 via UT-D02 cable. X-Git-Tag: libsigrok-0.3.0~332 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=2710cb53fd4e56eb0ffe0b76657a67cce932c734;p=libsigrok.git serial-dmm: Support the Tenma 72-7745 via UT-D02 cable. (it was already supported in uni-t-dmm via UT-D04 cable) --- diff --git a/hardware/serial-dmm/api.c b/hardware/serial-dmm/api.c index 7fa7aa2a..aee0c004 100644 --- a/hardware/serial-dmm/api.c +++ b/hardware/serial-dmm/api.c @@ -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_7745_ser_driver_info; SR_PRIV struct sr_dev_driver tenma_72_7750_ser_driver_info; SR_PRIV struct dmm_info dmms[] = { @@ -275,15 +276,24 @@ SR_PRIV struct dmm_info dmms[] = { /* Note: ES51922 baudrate is actually 19230! */ "UNI-T", "UT61E (UT-D02 cable)", "19200/7o1/rts=0/dtr=1", 19200, ES519XX_14B_PACKET_SIZE, NULL, - sr_es519xx_19200_14b_packet_valid, sr_es519xx_19200_14b_parse, NULL, + sr_es519xx_19200_14b_packet_valid, sr_es519xx_19200_14b_parse, + NULL, &uni_t_ut61e_ser_driver_info, receive_data_UNI_T_UT61E_SER, }, { "ISO-TECH", "IDM103N", "2400/7o1/rts=0/dtr=1", 2400, ES519XX_11B_PACKET_SIZE, NULL, - sr_es519xx_2400_11b_packet_valid, sr_es519xx_2400_11b_parse, NULL, + sr_es519xx_2400_11b_packet_valid, sr_es519xx_2400_11b_parse, + NULL, &iso_tech_idm103n_driver_info, receive_data_ISO_TECH_IDM103N, }, + { + "Tenma", "72-7745 (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, + &tenma_72_7745_ser_driver_info, receive_data_TENMA_72_7745_SER, + }, { /* Note: ES51986 baudrate is actually 19230! */ "Tenma", "72-7750 (UT-D02 cable)", "19200/7o1/rts=0/dtr=1", @@ -600,4 +610,5 @@ 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_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/hardware/serial-dmm/protocol.c b/hardware/serial-dmm/protocol.c index 69727e10..c38c1422 100644 --- a/hardware/serial-dmm/protocol.c +++ b/hardware/serial-dmm/protocol.c @@ -189,4 +189,5 @@ 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_7745_SER, fs9721) RECEIVE_DATA(TENMA_72_7750_SER, es519xx) diff --git a/hardware/serial-dmm/protocol.h b/hardware/serial-dmm/protocol.h index 28211d32..e313492f 100644 --- a/hardware/serial-dmm/protocol.h +++ b/hardware/serial-dmm/protocol.h @@ -53,10 +53,11 @@ enum { UNI_T_UT61D_SER, UNI_T_UT61E_SER, ISO_TECH_IDM103N, + TENMA_72_7745_SER, TENMA_72_7750_SER, }; -#define DMM_COUNT 30 +#define DMM_COUNT 31 struct dmm_info { /** Manufacturer/brand. */ @@ -138,6 +139,7 @@ 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_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); #endif diff --git a/hwdriver.c b/hwdriver.c index 300bfe66..90661f17 100644 --- a/hwdriver.c +++ b/hwdriver.c @@ -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_7745_ser_driver_info; extern SR_PRIV struct sr_dev_driver tenma_72_7750_ser_driver_info; #endif #ifdef HAVE_HW_UNI_T_DMM