From: Uwe Hermann Date: Tue, 29 Oct 2013 19:31:24 +0000 (+0100) Subject: Add support for the Metex M-4650CR. X-Git-Tag: libsigrok-0.2.2~18 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=88f544f27e56e8cd4a022d3de1f37153b941d158;p=libsigrok.git Add support for the Metex M-4650CR. (the Voltcraft M-4650CR is a rebadged Metex M-4650CR) --- diff --git a/hardware/serial-dmm/api.c b/hardware/serial-dmm/api.c index 1362d3b7..daa8a7ca 100644 --- a/hardware/serial-dmm/api.c +++ b/hardware/serial-dmm/api.c @@ -48,6 +48,7 @@ SR_PRIV struct sr_dev_driver peaktech_3410_driver_info; SR_PRIV struct sr_dev_driver mastech_mas345_driver_info; SR_PRIV struct sr_dev_driver va_va18b_driver_info; SR_PRIV struct sr_dev_driver metex_m3640d_driver_info; +SR_PRIV struct sr_dev_driver metex_m4650cr_driver_info; SR_PRIV struct sr_dev_driver peaktech_4370_driver_info; SR_PRIV struct sr_dev_driver pce_pce_dm32_driver_info; SR_PRIV struct sr_dev_driver radioshack_22_168_driver_info; @@ -115,6 +116,13 @@ SR_PRIV struct dmm_info dmms[] = { NULL, &metex_m3640d_driver_info, receive_data_METEX_M3640D, }, + { + "Metex", "M-4650CR", "1200/7n2/rts=0/dtr=1", 1200, + METEX14_PACKET_SIZE, sr_metex14_packet_request, + sr_metex14_packet_valid, sr_metex14_parse, + NULL, + &metex_m4650cr_driver_info, receive_data_METEX_M4650CR, + }, { "PeakTech", "4370", "1200/7n2/rts=0/dtr=1", 1200, METEX14_PACKET_SIZE, sr_metex14_packet_request, @@ -544,6 +552,7 @@ DRV(peaktech_3410, PEAKTECH_3410, "peaktech-3410", "PeakTech 3410") DRV(mastech_mas345, MASTECH_MAS345, "mastech-mas345", "MASTECH MAS345") DRV(va_va18b, VA_VA18B, "va-va18b", "V&A VA18B") DRV(metex_m3640d, METEX_M3640D, "metex-m3640d", "Metex M-3640D") +DRV(metex_m4650cr, METEX_M4650CR, "metex-m4650cr", "Metex M-4650CR") DRV(peaktech_4370, PEAKTECH_4370, "peaktech-4370", "PeakTech 4370") 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") diff --git a/hardware/serial-dmm/protocol.c b/hardware/serial-dmm/protocol.c index 838403de..6ca5e73e 100644 --- a/hardware/serial-dmm/protocol.c +++ b/hardware/serial-dmm/protocol.c @@ -165,6 +165,7 @@ RECEIVE_DATA(PEAKTECH_3410, metex14) RECEIVE_DATA(MASTECH_MAS345, metex14) RECEIVE_DATA(VA_VA18B, fs9721) RECEIVE_DATA(METEX_M3640D, metex14) +RECEIVE_DATA(METEX_M4650CR, metex14) RECEIVE_DATA(PEAKTECH_4370, metex14) RECEIVE_DATA(PCE_PCE_DM32, fs9721) RECEIVE_DATA(RADIOSHACK_22_168, metex14) diff --git a/hardware/serial-dmm/protocol.h b/hardware/serial-dmm/protocol.h index 7b170e66..4ad36754 100644 --- a/hardware/serial-dmm/protocol.h +++ b/hardware/serial-dmm/protocol.h @@ -38,6 +38,7 @@ enum { MASTECH_MAS345, VA_VA18B, METEX_M3640D, + METEX_M4650CR, PEAKTECH_4370, PCE_PCE_DM32, RADIOSHACK_22_168, @@ -56,7 +57,7 @@ enum { ISO_TECH_IDM103N, }; -#define DMM_COUNT 23 +#define DMM_COUNT 24 struct dmm_info { char *vendor; @@ -105,6 +106,7 @@ SR_PRIV int receive_data_PEAKTECH_3410(int fd, int revents, void *cb_data); SR_PRIV int receive_data_MASTECH_MAS345(int fd, int revents, void *cb_data); SR_PRIV int receive_data_VA_VA18B(int fd, int revents, void *cb_data); SR_PRIV int receive_data_METEX_M3640D(int fd, int revents, void *cb_data); +SR_PRIV int receive_data_METEX_M4650CR(int fd, int revents, void *cb_data); SR_PRIV int receive_data_PEAKTECH_4370(int fd, int revents, void *cb_data); 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); diff --git a/hwdriver.c b/hwdriver.c index a6bd90cd..ff284651 100644 --- a/hwdriver.c +++ b/hwdriver.c @@ -198,6 +198,7 @@ extern SR_PRIV struct sr_dev_driver peaktech_3410_driver_info; extern SR_PRIV struct sr_dev_driver mastech_mas345_driver_info; extern SR_PRIV struct sr_dev_driver va_va18b_driver_info; extern SR_PRIV struct sr_dev_driver metex_m3640d_driver_info; +extern SR_PRIV struct sr_dev_driver metex_m4650cr_driver_info; extern SR_PRIV struct sr_dev_driver peaktech_4370_driver_info; extern SR_PRIV struct sr_dev_driver pce_pce_dm32_driver_info; extern SR_PRIV struct sr_dev_driver radioshack_22_168_driver_info; @@ -319,6 +320,7 @@ static struct sr_dev_driver *drivers_list[] = { &mastech_mas345_driver_info, &va_va18b_driver_info, &metex_m3640d_driver_info, + &metex_m4650cr_driver_info, &peaktech_4370_driver_info, &pce_pce_dm32_driver_info, &radioshack_22_168_driver_info,