return SR_OK;
}
-SR_PRIV void sr_fs9721_details_c2c1_00_temp_celsius(struct sr_datafeed_analog *analog, void *info)
+SR_PRIV void sr_fs9721_00_temp_c(struct sr_datafeed_analog *analog, void *info)
{
struct fs9721_info *info_local;
analog->unit = SR_UNIT_CELSIUS;
}
}
+
+SR_PRIV void sr_fs9721_01_temp_c(struct sr_datafeed_analog *analog, void *info)
+{
+ struct fs9721_info *info_local;
+
+ info_local = (struct fs9721_info *)info;
+
+ /* 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;
+ }
+}
+
+SR_PRIV void sr_fs9721_10_temp_c(struct sr_datafeed_analog *analog, void *info)
+{
+ struct fs9721_info *info_local;
+
+ info_local = (struct fs9721_info *)info;
+
+ /* User-defined FS9721_LP3 flag 'c2c1_10' means temperature (C). */
+ if (info_local->is_c2c1_10) {
+ analog->mq = SR_MQ_TEMPERATURE;
+ analog->unit = SR_UNIT_CELSIUS;
+ }
+}
+
+SR_PRIV void sr_fs9721_01_10_temp_f_c(struct sr_datafeed_analog *analog, void *info)
+{
+ struct fs9721_info *info_local;
+
+ info_local = (struct fs9721_info *)info;
+
+ /* User-defined FS9721_LP3 flag 'c2c1_01' means temperature (F). */
+ if (info_local->is_c2c1_01) {
+ analog->mq = SR_MQ_TEMPERATURE;
+ analog->unit = SR_UNIT_FAHRENHEIT;
+ }
+
+ /* User-defined FS9721_LP3 flag 'c2c1_10' means temperature (C). */
+ if (info_local->is_c2c1_10) {
+ analog->mq = SR_MQ_TEMPERATURE;
+ analog->unit = SR_UNIT_CELSIUS;
+ }
+}
"Digitek", "DT4000ZC", "2400/8n1", 2400,
FS9721_PACKET_SIZE, NULL,
sr_fs9721_packet_valid, sr_fs9721_parse,
- dmm_details_dt4000zc,
+ sr_fs9721_10_temp_c,
&digitek_dt4000zc_driver_info, receive_data_DIGITEK_DT4000ZC,
},
{
"TekPower", "TP4000ZC", "2400/8n1", 2400,
FS9721_PACKET_SIZE, NULL,
sr_fs9721_packet_valid, sr_fs9721_parse,
- dmm_details_tp4000zc,
+ sr_fs9721_10_temp_c,
&tekpower_tp4000zc_driver_info, receive_data_TEKPOWER_TP4000ZC,
},
{
"V&A", "VA18B", "2400/8n1", 2400,
FS9721_PACKET_SIZE, NULL,
sr_fs9721_packet_valid, sr_fs9721_parse,
- dmm_details_va18b,
+ sr_fs9721_01_temp_c,
&va_va18b_driver_info, receive_data_VA_VA18B,
},
{
"PCE", "PCE-DM32", "2400/8n1", 2400,
FS9721_PACKET_SIZE, NULL,
sr_fs9721_packet_valid, sr_fs9721_parse,
- dmm_details_pce_dm32,
+ sr_fs9721_01_10_temp_f_c,
&pce_pce_dm32_driver_info, receive_data_PCE_PCE_DM32,
},
{
"Voltcraft", "VC-840 (UT-D02 cable)", "2400/8n1/rts=0/dtr=1",
2400, FS9721_PACKET_SIZE, NULL,
sr_fs9721_packet_valid, sr_fs9721_parse,
- sr_fs9721_details_c2c1_00_temp_celsius,
+ sr_fs9721_00_temp_c,
&voltcraft_vc840_ser_driver_info,
receive_data_VOLTCRAFT_VC840_SER,
},
buf[7], buf[8], buf[9], buf[10], buf[11], buf[12], buf[13]);
}
-SR_PRIV void dmm_details_dt4000zc(struct sr_datafeed_analog *analog, void *info)
-{
- dmm_details_tp4000zc(analog, info); /* Same as TP4000ZC. */
-}
-
-SR_PRIV void dmm_details_tp4000zc(struct sr_datafeed_analog *analog, void *info)
-{
- struct fs9721_info *info_local;
-
- info_local = (struct fs9721_info *)info;
-
- /* User-defined FS9721_LP3 flag 'c2c1_10' means temperature (C). */
- if (info_local->is_c2c1_10) {
- analog->mq = SR_MQ_TEMPERATURE;
- analog->unit = SR_UNIT_CELSIUS;
- }
-}
-
-SR_PRIV void dmm_details_va18b(struct sr_datafeed_analog *analog, void *info)
-{
- struct fs9721_info *info_local;
-
- info_local = (struct fs9721_info *)info;
-
- /* 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;
- }
-}
-
-SR_PRIV void dmm_details_pce_dm32(struct sr_datafeed_analog *analog, void *info)
-{
- struct fs9721_info *info_local;
-
- info_local = (struct fs9721_info *)info;
-
- /* User-defined FS9721_LP3 flag 'c2c1_01' means temperature (F). */
- if (info_local->is_c2c1_01) {
- analog->mq = SR_MQ_TEMPERATURE;
- analog->unit = SR_UNIT_FAHRENHEIT;
- }
-
- /* User-defined FS9721_LP3 flag 'c2c1_10' means temperature (C). */
- if (info_local->is_c2c1_10) {
- analog->mq = SR_MQ_TEMPERATURE;
- analog->unit = SR_UNIT_CELSIUS;
- }
-}
-
static void handle_packet(const uint8_t *buf, struct sr_dev_inst *sdi,
int dmm, void *info)
{
"Voltcraft", "VC-840", 2400,
FS9721_PACKET_SIZE, NULL,
sr_fs9721_packet_valid, sr_fs9721_parse,
- sr_fs9721_details_c2c1_00_temp_celsius,
+ sr_fs9721_00_temp_c,
&voltcraft_vc840_driver_info, receive_data_VOLTCRAFT_VC840,
},
};
SR_PRIV gboolean sr_fs9721_packet_valid(const uint8_t *buf);
SR_PRIV int sr_fs9721_parse(const uint8_t *buf, float *floatval,
struct sr_datafeed_analog *analog, void *info);
-SR_PRIV void sr_fs9721_details_c2c1_00_temp_celsius(struct sr_datafeed_analog *analog, void *info);
+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);
/*--- hardware/common/dmm/metex14.c -----------------------------------------*/