]> sigrok.org Git - libsigrok.git/commitdiff
Add initial support for the V&A VA40B multimeter.
authorUwe Hermann <redacted>
Thu, 2 Jan 2014 00:34:21 +0000 (01:34 +0100)
committerUwe Hermann <redacted>
Thu, 2 Jan 2014 00:46:15 +0000 (01:46 +0100)
hardware/common/dmm/fs9721.c
hardware/serial-dmm/api.c
hardware/serial-dmm/protocol.c
hardware/serial-dmm/protocol.h
hwdriver.c
libsigrok-internal.h

index 9b195d0bc5d479702bef37875bf0d79bc4c19afb..85de00746ca51e08bc701377b54a1d675eb09598 100644 (file)
@@ -421,3 +421,25 @@ SR_PRIV void sr_fs9721_01_10_temp_f_c(struct sr_datafeed_analog *analog, void *i
                analog->unit = SR_UNIT_CELSIUS;
        }
 }
+
+SR_PRIV void sr_fs9721_max_c_min(struct sr_datafeed_analog *analog, void *info)
+{
+       struct fs9721_info *info_local;
+
+       info_local = (struct fs9721_info *)info;
+
+       /* User-defined FS9721_LP3 flag 'c2c1_00' means MAX. */
+       if (info_local->is_c2c1_00)
+               analog->mqflags |= SR_MQFLAG_MAX;
+
+       /* User-defined FS9721_LP3 flag 'c2c1_01' means temperature (C). */
+       if (info_local->is_c2c1_01) {
+               analog->mq = SR_MQ_TEMPERATURE;
+               analog->unit = SR_UNIT_CELSIUS;
+       }
+
+       /* User-defined FS9721_LP3 flag 'c2c1_11' means MIN. */
+       if (info_local->is_c2c1_11)
+               analog->mqflags |= SR_MQFLAG_MIN;
+
+}
index b433c0630de468577f8a883571b76f53dc4ab2a1..7091222fddb7c236fa14ec846f798131688698b1 100644 (file)
@@ -48,6 +48,7 @@ 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 va_va18b_driver_info;
+SR_PRIV struct sr_dev_driver va_va40b_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;
@@ -119,6 +120,13 @@ SR_PRIV struct dmm_info dmms[] = {
                sr_fs9721_01_temp_c,
                &va_va18b_driver_info, receive_data_VA_VA18B,
        },
+       {
+               "V&A", "VA40B", "2400/8n1", 2400,
+               FS9721_PACKET_SIZE, NULL,
+               sr_fs9721_packet_valid, sr_fs9721_parse,
+               sr_fs9721_max_c_min,
+               &va_va40b_driver_info, receive_data_VA_VA40B,
+       },
        {
                "Metex", "M-3640D", "1200/7n2/rts=0/dtr=1", 1200,
                METEX14_PACKET_SIZE, sr_metex14_packet_request,
@@ -552,6 +560,7 @@ 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(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")
 DRV(metex_m4650cr, METEX_M4650CR, "metex-m4650cr", "Metex M-4650CR")
 DRV(peaktech_4370, PEAKTECH_4370, "peaktech-4370", "PeakTech 4370")
index 71ebf0dce344326b9537c12eb00573d3ff092ac8..8a1db9fbc2a9b43e28ea94555b5d398df61698ea 100644 (file)
@@ -167,6 +167,7 @@ RECEIVE_DATA(METEX_ME31, metex14)
 RECEIVE_DATA(PEAKTECH_3410, metex14)
 RECEIVE_DATA(MASTECH_MAS345, metex14)
 RECEIVE_DATA(VA_VA18B, fs9721)
+RECEIVE_DATA(VA_VA40B, fs9721)
 RECEIVE_DATA(METEX_M3640D, metex14)
 RECEIVE_DATA(METEX_M4650CR, metex14)
 RECEIVE_DATA(PEAKTECH_4370, metex14)
index 653101cea34c1fdd876e2da43ff0ba084977e556..eccd0f7a1c336a5fdb43e90d8829417cabf1e0ef 100644 (file)
@@ -31,6 +31,7 @@ enum {
        PEAKTECH_3410,
        MASTECH_MAS345,
        VA_VA18B,
+       VA_VA40B,
        METEX_M3640D,
        METEX_M4650CR,
        PEAKTECH_4370,
@@ -53,7 +54,7 @@ enum {
        ISO_TECH_IDM103N,
 };
 
-#define DMM_COUNT 27
+#define DMM_COUNT 28
 
 struct dmm_info {
        /** Manufacturer/brand. */
@@ -113,6 +114,7 @@ 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_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);
 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);
@@ -137,6 +139,7 @@ SR_PRIV int receive_data_ISO_TECH_IDM103N(int fd, int revents, void *cb_data);
 SR_PRIV void dmm_details_tp4000zc(struct sr_datafeed_analog *analog, void *info);
 SR_PRIV void dmm_details_dt4000zc(struct sr_datafeed_analog *analog, void *info);
 SR_PRIV void dmm_details_va18b(struct sr_datafeed_analog *analog, void *info);
+SR_PRIV void dmm_details_va40b(struct sr_datafeed_analog *analog, void *info);
 SR_PRIV void dmm_details_pce_dm32(struct sr_datafeed_analog *analog, void *info);
 
 #endif
index bbba44111012839842a29bb4681d9fc734126c93..3b9df9238e79692c4c90a5e7a19709def1a1cc4f 100644 (file)
@@ -204,6 +204,7 @@ 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 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;
 extern SR_PRIV struct sr_dev_driver metex_m4650cr_driver_info;
 extern SR_PRIV struct sr_dev_driver peaktech_4370_driver_info;
@@ -341,6 +342,7 @@ static struct sr_dev_driver *drivers_list[] = {
        &peaktech_3410_driver_info,
        &mastech_mas345_driver_info,
        &va_va18b_driver_info,
+       &va_va40b_driver_info,
        &metex_m3640d_driver_info,
        &metex_m4650cr_driver_info,
        &peaktech_4370_driver_info,
index 722441b3044d93ed8b82466c7a74f815517ee0eb..2577fd0dcd981202b927e9d95dbb5ee633c61d47 100644 (file)
@@ -514,6 +514,7 @@ SR_PRIV void sr_fs9721_00_temp_c(struct sr_datafeed_analog *analog, void *info);
 SR_PRIV void sr_fs9721_01_temp_c(struct sr_datafeed_analog *analog, void *info);
 SR_PRIV void sr_fs9721_10_temp_c(struct sr_datafeed_analog *analog, void *info);
 SR_PRIV void sr_fs9721_01_10_temp_f_c(struct sr_datafeed_analog *analog, void *info);
+SR_PRIV void sr_fs9721_max_c_min(struct sr_datafeed_analog *analog, void *info);
 
 /*--- hardware/common/dmm/m2110.c -----------------------------------------*/