From: Alexandru Gagniuc Date: Thu, 21 Mar 2013 01:36:56 +0000 (-0500) Subject: serial-dmm: Add support for RadioShack 22-805 X-Git-Tag: dsupstream~238 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=3864648bb6ebf24106898a1296bc106daa55e964;p=libsigrok.git serial-dmm: Add support for RadioShack 22-805 Protocol-wise, this is identical to the 22-168, except that it communicates at 600 baud instead of 1200 baud. --- diff --git a/hardware/serial-dmm/api.c b/hardware/serial-dmm/api.c index 3ab19494..2f3b3a4c 100644 --- a/hardware/serial-dmm/api.c +++ b/hardware/serial-dmm/api.c @@ -53,6 +53,7 @@ SR_PRIV struct sr_dev_driver metex_m3640d_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; +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 voltcraft_vc820_ser_driver_info; SR_PRIV struct sr_dev_driver voltcraft_vc840_ser_driver_info; @@ -129,6 +130,13 @@ SR_PRIV struct dmm_info dmms[] = { NULL, &radioshack_22_168_driver_info, receive_data_RADIOSHACK_22_168, }, + { + "RadioShack", "22-805", "600/7n2/rts=0/dtr=1", 600, + METEX14_PACKET_SIZE, sr_metex14_packet_request, + sr_metex14_packet_valid, sr_metex14_parse, + NULL, + &radioshack_22_805_driver_info, receive_data_RADIOSHACK_22_805, + }, { "RadioShack", "22-812", "4800/8n1/rts=0/dtr=1", 4800, RS9LCD_PACKET_SIZE, NULL, @@ -495,6 +503,7 @@ DRV(metex_m3640d, METEX_M3640D, "metex-m3640d", "Metex M-3640D") 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") +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(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)") diff --git a/hardware/serial-dmm/protocol.c b/hardware/serial-dmm/protocol.c index e3946134..cbbdcdca 100644 --- a/hardware/serial-dmm/protocol.c +++ b/hardware/serial-dmm/protocol.c @@ -213,6 +213,7 @@ RECEIVE_DATA(METEX_M3640D, metex14) RECEIVE_DATA(PEAKTECH_4370, metex14) 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(VOLTCRAFT_VC820_SER, fs9721) RECEIVE_DATA(VOLTCRAFT_VC840_SER, fs9721) diff --git a/hardware/serial-dmm/protocol.h b/hardware/serial-dmm/protocol.h index 51ad9c48..9664efdd 100644 --- a/hardware/serial-dmm/protocol.h +++ b/hardware/serial-dmm/protocol.h @@ -41,13 +41,14 @@ enum { PEAKTECH_4370, PCE_PCE_DM32, RADIOSHACK_22_168, + RADIOSHACK_22_805, RADIOSHACK_22_812, VOLTCRAFT_VC820_SER, VOLTCRAFT_VC840_SER, UNI_T_UT61E_SER, }; -#define DMM_COUNT 14 +#define DMM_COUNT 15 struct dmm_info { char *vendor; @@ -101,6 +102,7 @@ SR_PRIV int receive_data_METEX_M3640D(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); +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_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); diff --git a/hwdriver.c b/hwdriver.c index a5f85b88..b8726e8c 100644 --- a/hwdriver.c +++ b/hwdriver.c @@ -154,6 +154,7 @@ extern SR_PRIV struct sr_dev_driver metex_m3640d_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; +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 voltcraft_vc820_ser_driver_info; extern SR_PRIV struct sr_dev_driver voltcraft_vc840_ser_driver_info; @@ -235,6 +236,7 @@ static struct sr_dev_driver *drivers_list[] = { &peaktech_4370_driver_info, &pce_pce_dm32_driver_info, &radioshack_22_168_driver_info, + &radioshack_22_805_driver_info, &radioshack_22_812_driver_info, &voltcraft_vc820_ser_driver_info, &voltcraft_vc840_ser_driver_info,