From: Uwe Hermann Date: Wed, 1 May 2013 01:13:15 +0000 (+0200) Subject: serial-dmm: Add Tecpel DMM-8061 support. X-Git-Tag: dsupstream~13 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=b38e08fbb7b6fec5ff22495f13f039b1f7218361;p=libsigrok.git serial-dmm: Add Tecpel DMM-8061 support. --- diff --git a/hardware/serial-dmm/api.c b/hardware/serial-dmm/api.c index e950c303..b63d3fc9 100644 --- a/hardware/serial-dmm/api.c +++ b/hardware/serial-dmm/api.c @@ -53,6 +53,7 @@ SR_PRIV struct sr_dev_driver pce_pce_dm32_driver_info; SR_PRIV struct sr_dev_driver radioshack_22_168_driver_info; SR_PRIV struct sr_dev_driver radioshack_22_805_driver_info; SR_PRIV struct sr_dev_driver radioshack_22_812_driver_info; +SR_PRIV struct sr_dev_driver tecpel_dmm_8061_ser_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_ut61d_ser_driver_info; @@ -143,6 +144,14 @@ SR_PRIV struct dmm_info dmms[] = { NULL, &radioshack_22_812_driver_info, receive_data_RADIOSHACK_22_812, }, + { + "Tecpel", "DMM-8061 (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, + &tecpel_dmm_8061_ser_driver_info, + receive_data_TECPEL_DMM_8061_SER, + }, { "Voltcraft", "VC-820 (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", 2400, FS9721_PACKET_SIZE, NULL, @@ -513,6 +522,7 @@ DRV(pce_pce_dm32, PCE_PCE_DM32, "pce-pce-dm32", "PCE PCE-DM32") DRV(radioshack_22_168, RADIOSHACK_22_168, "radioshack-22-168", "RadioShack 22-168") DRV(radioshack_22_805, RADIOSHACK_22_805, "radioshack-22-805", "RadioShack 22-805") DRV(radioshack_22_812, RADIOSHACK_22_812, "radioshack-22-812", "RadioShack 22-812") +DRV(tecpel_dmm_8061_ser, TECPEL_DMM_8061_SER, "tecpel-dmm-8061-ser", "Tecpel DMM-8061 (UT-D02 cable)") 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_ut61d_ser, UNI_T_UT61D_SER, "uni-t-ut61d-ser", "UNI-T UT61D (UT-D02 cable)") diff --git a/hardware/serial-dmm/protocol.c b/hardware/serial-dmm/protocol.c index a21d2472..e2801a38 100644 --- a/hardware/serial-dmm/protocol.c +++ b/hardware/serial-dmm/protocol.c @@ -170,6 +170,7 @@ RECEIVE_DATA(PCE_PCE_DM32, fs9721) RECEIVE_DATA(RADIOSHACK_22_168, metex14) RECEIVE_DATA(RADIOSHACK_22_805, metex14) RECEIVE_DATA(RADIOSHACK_22_812, rs9lcd) +RECEIVE_DATA(TECPEL_DMM_8061_SER, fs9721) RECEIVE_DATA(VOLTCRAFT_VC820_SER, fs9721) RECEIVE_DATA(VOLTCRAFT_VC840_SER, fs9721) RECEIVE_DATA(UNI_T_UT61D_SER, fs9922) diff --git a/hardware/serial-dmm/protocol.h b/hardware/serial-dmm/protocol.h index aff12c27..e7ea038f 100644 --- a/hardware/serial-dmm/protocol.h +++ b/hardware/serial-dmm/protocol.h @@ -43,13 +43,14 @@ enum { RADIOSHACK_22_168, RADIOSHACK_22_805, RADIOSHACK_22_812, + TECPEL_DMM_8061_SER, VOLTCRAFT_VC820_SER, VOLTCRAFT_VC840_SER, UNI_T_UT61D_SER, UNI_T_UT61E_SER, }; -#define DMM_COUNT 16 +#define DMM_COUNT 17 struct dmm_info { char *vendor; @@ -103,6 +104,7 @@ SR_PRIV int receive_data_PCE_PCE_DM32(int fd, int revents, void *cb_data); SR_PRIV int receive_data_RADIOSHACK_22_168(int fd, int revents, void *cb_data); SR_PRIV int receive_data_RADIOSHACK_22_805(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_TECPEL_DMM_8061_SER(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_UT61D_SER(int fd, int revents, void *cb_data); diff --git a/hwdriver.c b/hwdriver.c index dd5a6301..e3116571 100644 --- a/hwdriver.c +++ b/hwdriver.c @@ -158,6 +158,7 @@ extern SR_PRIV struct sr_dev_driver pce_pce_dm32_driver_info; extern SR_PRIV struct sr_dev_driver radioshack_22_168_driver_info; extern SR_PRIV struct sr_dev_driver radioshack_22_805_driver_info; extern SR_PRIV struct sr_dev_driver radioshack_22_812_driver_info; +extern SR_PRIV struct sr_dev_driver tecpel_dmm_8061_ser_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_ut61d_ser_driver_info; @@ -245,6 +246,7 @@ static struct sr_dev_driver *drivers_list[] = { &radioshack_22_168_driver_info, &radioshack_22_805_driver_info, &radioshack_22_812_driver_info, + &tecpel_dmm_8061_ser_driver_info, &voltcraft_vc820_ser_driver_info, &voltcraft_vc840_ser_driver_info, &uni_t_ut61d_ser_driver_info,