From: Baruch Even Date: Fri, 27 Feb 2015 13:15:26 +0000 (+0200) Subject: serial-dmm: Add MASTECH MS8250B as a supported DMM. X-Git-Tag: libsigrok-0.4.0~618 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=2cb63065f525655d3abccc1b26edd7275937b034;p=libsigrok.git serial-dmm: Add MASTECH MS8250B as a supported DMM. It is an alias and uses the FS9721 driver. --- diff --git a/src/drivers.c b/src/drivers.c index 54213282..3f006b61 100644 --- a/src/drivers.c +++ b/src/drivers.c @@ -134,6 +134,7 @@ extern SR_PRIV struct sr_dev_driver tekpower_tp4000zc_driver_info; extern SR_PRIV struct sr_dev_driver metex_me31_driver_info; 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 mastech_ms8250b_driver_info; extern SR_PRIV struct sr_dev_driver va_va18b_driver_info; extern SR_PRIV struct sr_dev_driver va_va40b_driver_info; extern SR_PRIV struct sr_dev_driver metex_m3640d_driver_info; @@ -333,6 +334,7 @@ SR_PRIV struct sr_dev_driver *drivers_list[] = { &metex_me31_driver_info, &peaktech_3410_driver_info, &mastech_mas345_driver_info, + &mastech_ms8250b_driver_info, &va_va18b_driver_info, &va_va40b_driver_info, &metex_m3640d_driver_info, diff --git a/src/hardware/serial-dmm/api.c b/src/hardware/serial-dmm/api.c index 8a0d12ce..4bbf230f 100644 --- a/src/hardware/serial-dmm/api.c +++ b/src/hardware/serial-dmm/api.c @@ -47,6 +47,7 @@ SR_PRIV struct sr_dev_driver tekpower_tp4000zc_driver_info; SR_PRIV struct sr_dev_driver metex_me31_driver_info; 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 mastech_ms8250b_driver_info; SR_PRIV struct sr_dev_driver va_va18b_driver_info; SR_PRIV struct sr_dev_driver va_va40b_driver_info; SR_PRIV struct sr_dev_driver metex_m3640d_driver_info; @@ -127,6 +128,13 @@ SR_PRIV struct dmm_info dmms[] = { NULL, &mastech_mas345_driver_info, receive_data_MASTECH_MAS345, }, + { + "MASTECH", "MS8250B", "2400/8n1/rts=0/dtr=1", + 2400, FS9721_PACKET_SIZE, 0, 0, NULL, + sr_fs9721_packet_valid, sr_fs9721_parse, + NULL, + &mastech_ms8250b_driver_info, receive_data_MASTECH_MS8250B, + }, { "V&A", "VA18B", "2400/8n1", 2400, FS9721_PACKET_SIZE, 0, 0, NULL, @@ -661,6 +669,7 @@ DRV(tekpower_tp4000zc, TEKPOWER_TP4000ZC, "tekpower-tp4000zc", "TekPower TP4000Z DRV(metex_me31, METEX_ME31, "metex-me31", "Metex ME-31") DRV(peaktech_3410, PEAKTECH_3410, "peaktech-3410", "PeakTech 3410") DRV(mastech_mas345, MASTECH_MAS345, "mastech-mas345", "MASTECH MAS345") +DRV(mastech_ms8250b, MASTECH_MS8250B, "mastech-ms8250b", "MASTECH MS8250B") DRV(va_va18b, VA_VA18B, "va-va18b", "V&A VA18B") DRV(va_va40b, VA_VA40B, "va-va40b", "V&A VA40B") DRV(metex_m3640d, METEX_M3640D, "metex-m3640d", "Metex M-3640D") diff --git a/src/hardware/serial-dmm/protocol.c b/src/hardware/serial-dmm/protocol.c index 03509fd2..64564ef4 100644 --- a/src/hardware/serial-dmm/protocol.c +++ b/src/hardware/serial-dmm/protocol.c @@ -196,6 +196,7 @@ RECEIVE_DATA(TEKPOWER_TP4000ZC, fs9721) RECEIVE_DATA(METEX_ME31, metex14) RECEIVE_DATA(PEAKTECH_3410, metex14) RECEIVE_DATA(MASTECH_MAS345, metex14) +RECEIVE_DATA(MASTECH_MS8250B, fs9721) RECEIVE_DATA(VA_VA18B, fs9721) RECEIVE_DATA(VA_VA40B, fs9721) RECEIVE_DATA(METEX_M3640D, metex14) diff --git a/src/hardware/serial-dmm/protocol.h b/src/hardware/serial-dmm/protocol.h index 8911dfcb..a4e06ce8 100644 --- a/src/hardware/serial-dmm/protocol.h +++ b/src/hardware/serial-dmm/protocol.h @@ -29,6 +29,7 @@ enum { METEX_ME31, PEAKTECH_3410, MASTECH_MAS345, + MASTECH_MS8250B, VA_VA18B, VA_VA40B, METEX_M3640D, @@ -137,6 +138,7 @@ SR_PRIV int receive_data_TEKPOWER_TP4000ZC(int fd, int revents, void *cb_data); SR_PRIV int receive_data_METEX_ME31(int fd, int revents, void *cb_data); 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_MASTECH_MS8250B(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_VA_VA40B(int fd, int revents, void *cb_data); SR_PRIV int receive_data_METEX_M3640D(int fd, int revents, void *cb_data);