From: Bert Vermeulen Date: Sun, 2 Sep 2012 09:58:29 +0000 (+0200) Subject: sr: add new agilent-dmm driver (Agilent U12xxA multimeters) X-Git-Tag: dsupstream~717 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=6ac0db19f36ada4cfccf19bbd48ebdb4665bc9ff;p=libsigrok.git sr: add new agilent-dmm driver (Agilent U12xxA multimeters) --- diff --git a/configure.ac b/configure.ac index f177c87f..54f8f15d 100644 --- a/configure.ac +++ b/configure.ac @@ -76,6 +76,16 @@ AC_SUBST(SR_LIB_LDFLAGS) # Logic analyzer hardware support '--enable' options. +# Disabled by default +AC_ARG_ENABLE(agilent-dmm, AC_HELP_STRING([--enable-agilent-dmm], + [enable Agilent DMM driver support [default=no]]), + [HW_AGILENT_DMM="$enableval"], + [HW_AGILENT_DMM=xno]) +AM_CONDITIONAL(HW_AGILENT_DMM, test x$HW_AGILENT_DMM = xyes) +if test "x$HW_AGILENT_DMM" = "xyes"; then + AC_DEFINE(HAVE_HW_AGILENT_DMM, 1, [Agilent DMM driver support]) +fi + # Disabled by default, unfinished. AC_ARG_ENABLE(alsa, AC_HELP_STRING([--enable-alsa], [enable ALSA driver support [default=no]]), @@ -247,6 +257,7 @@ AM_CONDITIONAL(NEED_EZUSB, \ # Serial port helpers only needed for some hardware drivers AM_CONDITIONAL(NEED_SERIAL, \ test "x$LA_OLS" != xno \ + -o "x$HW_AGILENT_DMM" != xno \ -o "x$HW_GENERICDMM" != xno \ ) @@ -288,6 +299,7 @@ AC_SUBST(SR_PACKAGE_VERSION) AC_CONFIG_FILES([Makefile version.h hardware/Makefile + hardware/agilent-dmm/Makefile hardware/alsa/Makefile hardware/asix-sigma/Makefile hardware/chronovu-la8/Makefile @@ -332,6 +344,7 @@ done echo echo "Enabled hardware drivers:" echo +echo " - Agilent DMM..................... $HW_AGILENT_DMM" echo " - ASIX SIGMA/SIGMA2............... $LA_ASIX_SIGMA" echo " - ChronoVu LA8.................... $LA_CHRONOVU_LA8" echo " - Demo driver..................... $LA_DEMO" diff --git a/hardware/Makefile.am b/hardware/Makefile.am index 118bb68c..d986d884 100644 --- a/hardware/Makefile.am +++ b/hardware/Makefile.am @@ -18,6 +18,7 @@ ## SUBDIRS = \ + agilent-dmm \ alsa \ asix-sigma \ chronovu-la8 \ @@ -37,6 +38,10 @@ libsigrokhardware_la_SOURCES = libsigrokhardware_la_LIBADD = \ common/libsigrokhwcommon.la +if HW_AGILENT_DMM +libsigrokhardware_la_LIBADD += agilent-dmm/libsigrokhwagilentdmm.la +endif + if LA_ALSA libsigrokhardware_la_LIBADD += alsa/libsigrokhwalsa.la endif diff --git a/hardware/agilent-dmm/Makefile.am b/hardware/agilent-dmm/Makefile.am new file mode 100644 index 00000000..ca1a7762 --- /dev/null +++ b/hardware/agilent-dmm/Makefile.am @@ -0,0 +1,31 @@ +## +## This file is part of the sigrok project. +## +## Copyright (C) 2012 Bert Vermeulen +## +## 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 3 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, see . +## + +if HW_AGILENT_DMM + +# Local lib, this is NOT meant to be installed! +noinst_LTLIBRARIES = libsigrokhwagilentdmm.la + +libsigrokhwagilentdmm_la_SOURCES = \ + api.c + +libsigrokhwagilentdmm_la_CFLAGS = \ + -I$(top_srcdir) + +endif diff --git a/hardware/agilent-dmm/api.c b/hardware/agilent-dmm/api.c new file mode 100644 index 00000000..e69de29b