src/dmm/metex14.c \
src/dmm/rs9lcd.c \
src/dmm/bm25x.c \
- src/dmm/ut71x.c
+ src/dmm/ut71x.c \
+ src/dmm/ut372.c
# Hardware (LCR chip parsers)
if NEED_SERIAL
--- /dev/null
+/*
+ * This file is part of the libsigrok project.
+ *
+ * Copyright (C) 2015 Martin Ling <martin-sigrok@earth.li>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/*
+ * UNI-T UT372 protocol parser.
+ */
+
+#include "libsigrok.h"
+#include "libsigrok-internal.h"
+
+#define LOG_PREFIX "ut372"
+
+SR_PRIV gboolean sr_ut372_packet_valid(const uint8_t *buf)
+{
+ return FALSE;
+}
+
+SR_PRIV int sr_ut372_parse(const uint8_t *buf, float *floatval,
+ struct sr_datafeed_analog *analog, void *info)
+{
+ return SR_OK;
+}
#endif
#ifdef HAVE_HW_UNI_T_DMM
extern SR_PRIV struct sr_dev_driver tecpel_dmm_8061_driver_info;
+extern SR_PRIV struct sr_dev_driver uni_t_ut372_driver_info;
extern SR_PRIV struct sr_dev_driver uni_t_ut60a_driver_info;
extern SR_PRIV struct sr_dev_driver uni_t_ut60e_driver_info;
extern SR_PRIV struct sr_dev_driver uni_t_ut60g_driver_info;
#endif
#ifdef HAVE_HW_UNI_T_DMM
&tecpel_dmm_8061_driver_info,
+ &uni_t_ut372_driver_info,
&uni_t_ut60a_driver_info,
&uni_t_ut60e_driver_info,
&uni_t_ut60g_driver_info,
};
SR_PRIV struct sr_dev_driver tecpel_dmm_8061_driver_info;
+SR_PRIV struct sr_dev_driver uni_t_ut372_driver_info;
SR_PRIV struct sr_dev_driver uni_t_ut60a_driver_info;
SR_PRIV struct sr_dev_driver uni_t_ut60e_driver_info;
SR_PRIV struct sr_dev_driver uni_t_ut60g_driver_info;
sr_fs9721_00_temp_c,
&tecpel_dmm_8061_driver_info, receive_data_TECPEL_DMM_8061,
},
+ {
+ "UNI-T", "UT372", 2400,
+ UT372_PACKET_SIZE,
+ sr_ut372_packet_valid, sr_ut372_parse,
+ NULL,
+ &uni_t_ut372_driver_info, receive_data_UNI_T_UT372,
+ },
{
"UNI-T", "UT60A", 2400,
FS9721_PACKET_SIZE,
};
DRV(tecpel_dmm_8061, TECPEL_DMM_8061, "tecpel-dmm-8061", "Tecpel DMM-8061")
+DRV(uni_t_ut372, UNI_T_UT372, "uni-t-ut372", "UNI-T UT372")
DRV(uni_t_ut60a, UNI_T_UT60A, "uni-t-ut60a", "UNI-T UT60A")
DRV(uni_t_ut60e, UNI_T_UT60E, "uni-t-ut60e", "UNI-T UT60E")
DRV(uni_t_ut60g, UNI_T_UT60G, "uni-t-ut60g", "UNI-T UT60G")
/* Driver-specific receive_data() wrappers */
RECEIVE_DATA(TECPEL_DMM_8061, fs9721)
+RECEIVE_DATA(UNI_T_UT372, ut372)
RECEIVE_DATA(UNI_T_UT60A, fs9721)
RECEIVE_DATA(UNI_T_UT60E, fs9721)
RECEIVE_DATA(UNI_T_UT60G, es519xx)
enum {
TECPEL_DMM_8061,
+ UNI_T_UT372,
UNI_T_UT60A,
UNI_T_UT60E,
UNI_T_UT60G,
};
SR_PRIV int receive_data_TECPEL_DMM_8061(int fd, int revents, void *cb_data);
+SR_PRIV int receive_data_UNI_T_UT372(int fd, int revents, void *cb_data);
SR_PRIV int receive_data_UNI_T_UT60A(int fd, int revents, void *cb_data);
SR_PRIV int receive_data_UNI_T_UT60E(int fd, int revents, void *cb_data);
SR_PRIV int receive_data_UNI_T_UT60G(int fd, int revents, void *cb_data);
SR_PRIV int es51919_serial_acquisition_stop(struct sr_dev_inst *sdi,
void *cb_data);
+/*--- hardware/dmm/ut372.c --------------------------------------------------*/
+
+#define UT372_PACKET_SIZE 27
+
+struct ut372_info {
+ int dummy;
+};
+
+SR_PRIV gboolean sr_ut372_packet_valid(const uint8_t *buf);
+SR_PRIV int sr_ut372_parse(const uint8_t *buf, float *floatval,
+ struct sr_datafeed_analog *analog, void *info);
+
#endif