Support for UNI-T UT60A/E multimeters via RS232 or USB

This commit is contained in:
Florian Knodt 2013-07-05 14:02:50 +02:00 committed by Uwe Hermann
parent fb8d593cfe
commit a7a163a795
7 changed files with 62 additions and 3 deletions

View File

@ -59,6 +59,8 @@ SR_PRIV struct sr_dev_driver voltcraft_m3650d_driver_info;
SR_PRIV struct sr_dev_driver voltcraft_vc820_ser_driver_info; SR_PRIV struct sr_dev_driver voltcraft_vc820_ser_driver_info;
SR_PRIV struct sr_dev_driver voltcraft_vc830_ser_driver_info; SR_PRIV struct sr_dev_driver voltcraft_vc830_ser_driver_info;
SR_PRIV struct sr_dev_driver voltcraft_vc840_ser_driver_info; SR_PRIV struct sr_dev_driver voltcraft_vc840_ser_driver_info;
SR_PRIV struct sr_dev_driver uni_t_ut60a_ser_driver_info;
SR_PRIV struct sr_dev_driver uni_t_ut60e_ser_driver_info;
SR_PRIV struct sr_dev_driver uni_t_ut61d_ser_driver_info; SR_PRIV struct sr_dev_driver uni_t_ut61d_ser_driver_info;
SR_PRIV struct sr_dev_driver uni_t_ut61e_ser_driver_info; SR_PRIV struct sr_dev_driver uni_t_ut61e_ser_driver_info;
@ -194,6 +196,22 @@ SR_PRIV struct dmm_info dmms[] = {
&voltcraft_vc840_ser_driver_info, &voltcraft_vc840_ser_driver_info,
receive_data_VOLTCRAFT_VC840_SER, receive_data_VOLTCRAFT_VC840_SER,
}, },
{
"UNI-T", "UT60A (UT-D02 cable)", "2400/8n1/rts=0/dtr=1",
2400, FS9721_PACKET_SIZE, NULL,
sr_fs9721_packet_valid, sr_fs9721_parse,
NULL,
&uni_t_ut60a_ser_driver_info,
receive_data_UNI_T_UT60A_SER,
},
{
"UNI-T", "UT60E (UT-D02 cable)", "2400/8n1/rts=0/dtr=1",
2400, FS9721_PACKET_SIZE, NULL,
sr_fs9721_packet_valid, sr_fs9721_parse,
sr_fs9721_00_temp_c,
&uni_t_ut60e_ser_driver_info,
receive_data_UNI_T_UT60E_SER,
},
{ {
"UNI-T", "UT61D (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", "UNI-T", "UT61D (UT-D02 cable)", "2400/8n1/rts=0/dtr=1",
2400, FS9922_PACKET_SIZE, NULL, 2400, FS9922_PACKET_SIZE, NULL,
@ -526,5 +544,7 @@ DRV(voltcraft_m3650d, VOLTCRAFT_M3650D, "voltcraft-m3650d", "Voltcraft M-3650D")
DRV(voltcraft_vc820_ser, VOLTCRAFT_VC820_SER, "voltcraft-vc820-ser", "Voltcraft VC-820 (UT-D02 cable)") DRV(voltcraft_vc820_ser, VOLTCRAFT_VC820_SER, "voltcraft-vc820-ser", "Voltcraft VC-820 (UT-D02 cable)")
DRV(voltcraft_vc830_ser, VOLTCRAFT_VC830_SER, "voltcraft-vc830-ser", "Voltcraft VC-830 (UT-D02 cable)") DRV(voltcraft_vc830_ser, VOLTCRAFT_VC830_SER, "voltcraft-vc830-ser", "Voltcraft VC-830 (UT-D02 cable)")
DRV(voltcraft_vc840_ser, VOLTCRAFT_VC840_SER, "voltcraft-vc840-ser", "Voltcraft VC-840 (UT-D02 cable)") DRV(voltcraft_vc840_ser, VOLTCRAFT_VC840_SER, "voltcraft-vc840-ser", "Voltcraft VC-840 (UT-D02 cable)")
DRV(uni_t_ut60a_ser, UNI_T_UT60A_SER, "uni-t-ut60a-ser", "UNI-T UT60A (UT-D02 cable)")
DRV(uni_t_ut60e_ser, UNI_T_UT60E_SER, "uni-t-ut60e-ser", "UNI-T UT60E (UT-D02 cable)")
DRV(uni_t_ut61d_ser, UNI_T_UT61D_SER, "uni-t-ut61d-ser", "UNI-T UT61D (UT-D02 cable)") DRV(uni_t_ut61d_ser, UNI_T_UT61D_SER, "uni-t-ut61d-ser", "UNI-T UT61D (UT-D02 cable)")
DRV(uni_t_ut61e_ser, UNI_T_UT61E_SER, "uni-t-ut61e-ser", "UNI-T UT61E (UT-D02 cable)") DRV(uni_t_ut61e_ser, UNI_T_UT61E_SER, "uni-t-ut61e-ser", "UNI-T UT61E (UT-D02 cable)")

View File

@ -176,5 +176,7 @@ RECEIVE_DATA(VOLTCRAFT_M3650D, metex14)
RECEIVE_DATA(VOLTCRAFT_VC820_SER, fs9721) RECEIVE_DATA(VOLTCRAFT_VC820_SER, fs9721)
RECEIVE_DATA(VOLTCRAFT_VC830_SER, fs9922) RECEIVE_DATA(VOLTCRAFT_VC830_SER, fs9922)
RECEIVE_DATA(VOLTCRAFT_VC840_SER, fs9721) RECEIVE_DATA(VOLTCRAFT_VC840_SER, fs9721)
RECEIVE_DATA(UNI_T_UT60A_SER, fs9721)
RECEIVE_DATA(UNI_T_UT60E_SER, fs9721)
RECEIVE_DATA(UNI_T_UT61D_SER, fs9922) RECEIVE_DATA(UNI_T_UT61D_SER, fs9922)
RECEIVE_DATA(UNI_T_UT61E_SER, es51922) RECEIVE_DATA(UNI_T_UT61E_SER, es51922)

View File

@ -49,11 +49,13 @@ enum {
VOLTCRAFT_VC820_SER, VOLTCRAFT_VC820_SER,
VOLTCRAFT_VC830_SER, VOLTCRAFT_VC830_SER,
VOLTCRAFT_VC840_SER, VOLTCRAFT_VC840_SER,
UNI_T_UT60A_SER,
UNI_T_UT60E_SER,
UNI_T_UT61D_SER, UNI_T_UT61D_SER,
UNI_T_UT61E_SER, UNI_T_UT61E_SER,
}; };
#define DMM_COUNT 20 #define DMM_COUNT 22
struct dmm_info { struct dmm_info {
char *vendor; char *vendor;
@ -113,6 +115,8 @@ SR_PRIV int receive_data_VOLTCRAFT_M3650D(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_VC820_SER(int fd, int revents, void *cb_data);
SR_PRIV int receive_data_VOLTCRAFT_VC830_SER(int fd, int revents, void *cb_data); SR_PRIV int receive_data_VOLTCRAFT_VC830_SER(int fd, int revents, void *cb_data);
SR_PRIV int receive_data_VOLTCRAFT_VC840_SER(int fd, int revents, void *cb_data); SR_PRIV int receive_data_VOLTCRAFT_VC840_SER(int fd, int revents, void *cb_data);
SR_PRIV int receive_data_UNI_T_UT60A_SER(int fd, int revents, void *cb_data);
SR_PRIV int receive_data_UNI_T_UT60E_SER(int fd, int revents, void *cb_data);
SR_PRIV int receive_data_UNI_T_UT61D_SER(int fd, int revents, void *cb_data); SR_PRIV int receive_data_UNI_T_UT61D_SER(int fd, int revents, void *cb_data);
SR_PRIV int receive_data_UNI_T_UT61E_SER(int fd, int revents, void *cb_data); SR_PRIV int receive_data_UNI_T_UT61E_SER(int fd, int revents, void *cb_data);

View File

@ -39,6 +39,8 @@ static const int32_t hwcaps[] = {
SR_PRIV struct sr_dev_driver tecpel_dmm_8060_driver_info; SR_PRIV struct sr_dev_driver tecpel_dmm_8060_driver_info;
SR_PRIV struct sr_dev_driver tecpel_dmm_8061_driver_info; SR_PRIV struct sr_dev_driver tecpel_dmm_8061_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_ut61d_driver_info; SR_PRIV struct sr_dev_driver uni_t_ut61d_driver_info;
SR_PRIV struct sr_dev_driver uni_t_ut61e_driver_info; SR_PRIV struct sr_dev_driver uni_t_ut61e_driver_info;
SR_PRIV struct sr_dev_driver voltcraft_vc820_driver_info; SR_PRIV struct sr_dev_driver voltcraft_vc820_driver_info;
@ -60,6 +62,20 @@ SR_PRIV struct dmm_info udmms[] = {
sr_fs9721_00_temp_c, sr_fs9721_00_temp_c,
&tecpel_dmm_8061_driver_info, receive_data_TECPEL_DMM_8061, &tecpel_dmm_8061_driver_info, receive_data_TECPEL_DMM_8061,
}, },
{
"UNI-T", "UT60A", 2400,
FS9721_PACKET_SIZE, NULL,
sr_fs9721_packet_valid, sr_fs9721_parse,
NULL,
&uni_t_ut60a_driver_info, receive_data_UNI_T_UT60A,
},
{
"UNI-T", "UT60E", 2400,
FS9721_PACKET_SIZE, NULL,
sr_fs9721_packet_valid, sr_fs9721_parse,
sr_fs9721_00_temp_c,
&uni_t_ut60e_driver_info, receive_data_UNI_T_UT60E,
},
{ {
"UNI-T", "UT61D", 2400, "UNI-T", "UT61D", 2400,
FS9922_PACKET_SIZE, NULL, FS9922_PACKET_SIZE, NULL,
@ -345,6 +361,8 @@ SR_PRIV struct sr_dev_driver ID##_driver_info = { \
DRV(tecpel_dmm_8060, TECPEL_DMM_8060, "tecpel-dmm-8060", "Tecpel DMM-8060") DRV(tecpel_dmm_8060, TECPEL_DMM_8060, "tecpel-dmm-8060", "Tecpel DMM-8060")
DRV(tecpel_dmm_8061, TECPEL_DMM_8061, "tecpel-dmm-8061", "Tecpel DMM-8061") DRV(tecpel_dmm_8061, TECPEL_DMM_8061, "tecpel-dmm-8061", "Tecpel DMM-8061")
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_ut61d, UNI_T_UT61D, "uni-t-ut61d", "UNI-T UT61D") DRV(uni_t_ut61d, UNI_T_UT61D, "uni-t-ut61d", "UNI-T UT61D")
DRV(uni_t_ut61e, UNI_T_UT61E, "uni-t-ut61e", "UNI-T UT61E") DRV(uni_t_ut61e, UNI_T_UT61E, "uni-t-ut61e", "UNI-T UT61E")
DRV(voltcraft_vc820, VOLTCRAFT_VC820, "voltcraft-vc820", "Voltcraft VC-820") DRV(voltcraft_vc820, VOLTCRAFT_VC820, "voltcraft-vc820", "Voltcraft VC-820")

View File

@ -57,7 +57,8 @@
* - UNI-T UT109: ? * - UNI-T UT109: ?
* - UNI-T UT30A: ? * - UNI-T UT30A: ?
* - UNI-T UT30E: ? * - UNI-T UT30E: ?
* - UNI-T UT60E: Fortune Semiconductor FS9721_LP3 * - UNI-T UT60A: Fortune Semiconductor FS9721_LP3 (?)
* - UNI-T UT60E: Fortune Semiconductor FS9721_LP3 (?)
* - UNI-T UT60G: ? * - UNI-T UT60G: ?
* - UNI-T UT61B: ? * - UNI-T UT61B: ?
* - UNI-T UT61C: ? * - UNI-T UT61C: ?
@ -305,6 +306,8 @@ SR_PRIV int receive_data_##ID_UPPER(int fd, int revents, void *cb_data) { \
/* Driver-specific receive_data() wrappers */ /* Driver-specific receive_data() wrappers */
RECEIVE_DATA(TECPEL_DMM_8060, fs9721) RECEIVE_DATA(TECPEL_DMM_8060, fs9721)
RECEIVE_DATA(TECPEL_DMM_8061, fs9721) RECEIVE_DATA(TECPEL_DMM_8061, fs9721)
RECEIVE_DATA(UNI_T_UT60A, fs9721)
RECEIVE_DATA(UNI_T_UT60E, fs9721)
RECEIVE_DATA(UNI_T_UT61D, fs9922) RECEIVE_DATA(UNI_T_UT61D, fs9922)
RECEIVE_DATA(UNI_T_UT61E, es51922) RECEIVE_DATA(UNI_T_UT61E, es51922)
RECEIVE_DATA(VOLTCRAFT_VC820, fs9721) RECEIVE_DATA(VOLTCRAFT_VC820, fs9721)

View File

@ -40,6 +40,8 @@
enum { enum {
TECPEL_DMM_8060, TECPEL_DMM_8060,
TECPEL_DMM_8061, TECPEL_DMM_8061,
UNI_T_UT60A,
UNI_T_UT60E,
UNI_T_UT61D, UNI_T_UT61D,
UNI_T_UT61E, UNI_T_UT61E,
VOLTCRAFT_VC820, VOLTCRAFT_VC820,
@ -47,7 +49,7 @@ enum {
VOLTCRAFT_VC840, VOLTCRAFT_VC840,
}; };
#define DMM_COUNT 7 #define DMM_COUNT 9
struct dmm_info { struct dmm_info {
char *vendor; char *vendor;
@ -94,6 +96,8 @@ struct dev_context {
SR_PRIV int receive_data_TECPEL_DMM_8060(int fd, int revents, void *cb_data); SR_PRIV int receive_data_TECPEL_DMM_8060(int fd, int revents, void *cb_data);
SR_PRIV int receive_data_TECPEL_DMM_8061(int fd, int revents, void *cb_data); SR_PRIV int receive_data_TECPEL_DMM_8061(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_UT61D(int fd, int revents, void *cb_data); SR_PRIV int receive_data_UNI_T_UT61D(int fd, int revents, void *cb_data);
SR_PRIV int receive_data_UNI_T_UT61E(int fd, int revents, void *cb_data); SR_PRIV int receive_data_UNI_T_UT61E(int fd, int revents, void *cb_data);
SR_PRIV int receive_data_VOLTCRAFT_VC820(int fd, int revents, void *cb_data); SR_PRIV int receive_data_VOLTCRAFT_VC820(int fd, int revents, void *cb_data);

View File

@ -184,12 +184,16 @@ extern SR_PRIV struct sr_dev_driver voltcraft_m3650d_driver_info;
extern SR_PRIV struct sr_dev_driver voltcraft_vc820_ser_driver_info; extern SR_PRIV struct sr_dev_driver voltcraft_vc820_ser_driver_info;
extern SR_PRIV struct sr_dev_driver voltcraft_vc830_ser_driver_info; extern SR_PRIV struct sr_dev_driver voltcraft_vc830_ser_driver_info;
extern SR_PRIV struct sr_dev_driver voltcraft_vc840_ser_driver_info; extern SR_PRIV struct sr_dev_driver voltcraft_vc840_ser_driver_info;
extern SR_PRIV struct sr_dev_driver uni_t_ut60a_ser_driver_info;
extern SR_PRIV struct sr_dev_driver uni_t_ut60e_ser_driver_info;
extern SR_PRIV struct sr_dev_driver uni_t_ut61d_ser_driver_info; extern SR_PRIV struct sr_dev_driver uni_t_ut61d_ser_driver_info;
extern SR_PRIV struct sr_dev_driver uni_t_ut61e_ser_driver_info; extern SR_PRIV struct sr_dev_driver uni_t_ut61e_ser_driver_info;
#endif #endif
#ifdef HAVE_HW_UNI_T_DMM #ifdef HAVE_HW_UNI_T_DMM
extern SR_PRIV struct sr_dev_driver tecpel_dmm_8060_driver_info; extern SR_PRIV struct sr_dev_driver tecpel_dmm_8060_driver_info;
extern SR_PRIV struct sr_dev_driver tecpel_dmm_8061_driver_info; extern SR_PRIV struct sr_dev_driver tecpel_dmm_8061_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_ut61d_driver_info; extern SR_PRIV struct sr_dev_driver uni_t_ut61d_driver_info;
extern SR_PRIV struct sr_dev_driver uni_t_ut61e_driver_info; extern SR_PRIV struct sr_dev_driver uni_t_ut61e_driver_info;
extern SR_PRIV struct sr_dev_driver voltcraft_vc820_driver_info; extern SR_PRIV struct sr_dev_driver voltcraft_vc820_driver_info;
@ -282,12 +286,16 @@ static struct sr_dev_driver *drivers_list[] = {
&voltcraft_vc820_ser_driver_info, &voltcraft_vc820_ser_driver_info,
&voltcraft_vc830_ser_driver_info, &voltcraft_vc830_ser_driver_info,
&voltcraft_vc840_ser_driver_info, &voltcraft_vc840_ser_driver_info,
&uni_t_ut60a_ser_driver_info,
&uni_t_ut60e_ser_driver_info,
&uni_t_ut61d_ser_driver_info, &uni_t_ut61d_ser_driver_info,
&uni_t_ut61e_ser_driver_info, &uni_t_ut61e_ser_driver_info,
#endif #endif
#ifdef HAVE_HW_UNI_T_DMM #ifdef HAVE_HW_UNI_T_DMM
&tecpel_dmm_8060_driver_info, &tecpel_dmm_8060_driver_info,
&tecpel_dmm_8061_driver_info, &tecpel_dmm_8061_driver_info,
&uni_t_ut60a_driver_info,
&uni_t_ut60e_driver_info,
&uni_t_ut61d_driver_info, &uni_t_ut61d_driver_info,
&uni_t_ut61e_driver_info, &uni_t_ut61e_driver_info,
&voltcraft_vc820_driver_info, &voltcraft_vc820_driver_info,