AC_DEFINE(HAVE_LA_CHRONOVU_LA8, 1, [ChronoVu LA8 support])
fi
+# Disabled by default, unfinished.
+AC_ARG_ENABLE(fx2lafw, AC_HELP_STRING([--enable-fx2lafw],
+ [enable open source fx2lafw driver support for fx2 devices. [default=no]]),
+ [LA_FX2LAFW="$enableval"],
+ [LA_FX2LAFW=no])
+AM_CONDITIONAL(LA_FX2LAFW, test x$LA_FX2LAFW = xyes)
+if test "x$LA_FX2LAFW" = "xyes"; then
+ AC_DEFINE(HAVE_LA_FX2LAFW, 1, [fx2lafw support])
+fi
+
AC_ARG_ENABLE(demo, AC_HELP_STRING([--enable-demo],
[enable demo driver support [default=yes]]),
[LA_DEMO="$enableval"],
if test "x$LA_SALEAE_LOGIC" != xno \
-o "x$LA_ASIX_SIGMA" != xno \
-o "x$LA_CHRONOVU_LA8" != xno \
- -o "x$LA_ZEROPLUS_LOGIC_CUBE" != xno; then
+ -o "x$LA_ZEROPLUS_LOGIC_CUBE" != xno \
+ -o "x$LA_FX2LAFW" != xno; then
case "$build" in
*freebsd*)
# FreeBSD comes with an "integrated" libusb-1.0-style USB API.
hardware/chronovu-la8/Makefile
hardware/common/Makefile
hardware/demo/Makefile
+ hardware/fx2lafw/Makefile
hardware/link-mso19/Makefile
hardware/openbench-logic-sniffer/Makefile
hardware/saleae-logic/Makefile
echo " - ASIX SIGMA...................... $LA_ASIX_SIGMA"
echo " - ChronoVu LA8.................... $LA_CHRONOVU_LA8"
echo " - Demo driver..................... $LA_DEMO"
+echo " - fx2lafw......................... $LA_FX2LAFW"
echo " - Link MSO-19..................... $LA_LINK_MSO19"
echo " - Openbench Logic Sniffer......... $LA_OLS"
echo " - Saleae Logic.................... $LA_SALEAE_LOGIC"
chronovu-la8 \
common \
demo \
+ fx2lafw \
link-mso19 \
openbench-logic-sniffer \
saleae-logic \
libsigrokhardware_la_LIBADD += chronovu-la8/libsigrokhwchronovula8.la
endif
+if LA_FX2LAFW
+libsigrokhardware_la_LIBADD += fx2lafw/libsigrokhwfx2lafw.la
+endif
+
if LA_DEMO
libsigrokhardware_la_LIBADD += demo/libsigrokhwdemo.la
endif
--- /dev/null
+##
+## This file is part of the sigrok project.
+##
+## Copyright (C) 2012 Joel Holdsworth <joel@airwebreathe.org.uk>
+##
+## 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 <http://www.gnu.org/licenses/>.
+##
+
+if LA_FX2LAFW
+
+AM_CPPFLAGS = -DFIRMWARE_DIR='"$(FIRMWARE_DIR)"'
+
+# Local lib, this is NOT meant to be installed!
+noinst_LTLIBRARIES = libsigrokhwfx2lafw.la
+
+libsigrokhwfx2lafw_la_SOURCES = \
+ fx2lafw.c \
+ fx2lafw.h
+
+libsigrokhwfx2lafw_la_CFLAGS = \
+ -I$(top_srcdir)
+
+endif
+
--- /dev/null
+/*
+ * This file is part of the sigrok project.
+ *
+ * Copyright (C) 2012 Joel Holdsworth <joel@airwebreathe.org.uk>
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "config.h"
+#include "sigrok.h"
+#include "sigrok-internal.h"
+#include "fx2lafw.h"
+
+
+/*
+ * API callbacks
+ */
+
+static int hw_init(const char *deviceinfo)
+{
+ (void)deviceinfo;
+ return 0;
+}
+
+static int hw_dev_open(int device_index)
+{
+ (void)device_index;
+ return SR_OK;
+}
+
+static int hw_dev_close(int device_index)
+{
+ (void)device_index;
+ return SR_OK;
+}
+
+static int hw_cleanup(void)
+{
+ return SR_OK;
+}
+
+static void *hw_dev_info_get(int device_index, int device_info_id)
+{
+ (void)device_index;
+ (void)device_info_id;
+ return NULL;
+}
+
+static int hw_dev_status_get(int device_index)
+{
+ (void)device_index;
+ return SR_ST_NOT_FOUND;
+}
+
+static int *hw_hwcap_get_all(void)
+{
+ return NULL;
+}
+
+static int hw_dev_config_set(int dev_index, int capability, void *value)
+{
+ (void)dev_index;
+ (void)capability;
+ (void)value;
+ return SR_OK;
+}
+
+static int hw_dev_acquisition_start(int dev_index, gpointer session_data)
+{
+ (void)dev_index;
+ (void)session_data;
+ return SR_OK;
+}
+
+/* This stops acquisition on ALL devices, ignoring device_index. */
+static int hw_dev_acquisition_stop(int dev_index, gpointer session_data)
+{
+ (void)dev_index;
+ (void)session_data;
+ return SR_OK;
+}
+
+SR_PRIV struct sr_dev_plugin fx2lafw_plugin_info = {
+ .name = "fx2lafw",
+ .longname = "fx2lafw",
+ .api_version = 1,
+ .init = hw_init,
+ .cleanup = hw_cleanup,
+ .dev_open = hw_dev_open,
+ .dev_close = hw_dev_close,
+ .dev_info_get = hw_dev_info_get,
+ .dev_status_get = hw_dev_status_get,
+ .hwcap_get_all = hw_hwcap_get_all,
+ .dev_config_set = hw_dev_config_set,
+ .dev_acquisition_start = hw_dev_acquisition_start,
+ .dev_acquisition_stop = hw_dev_acquisition_stop,
+};
--- /dev/null
+/*
+ * This file is part of the sigrok project.
+ *
+ * Copyright (C) 2012 Joel Holdsworth <joel@airwebreathe.org.uk>
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef LIBSIGROK_HARDWARE_FX2LAFW
+#define LIBSIGROK_HARDWARE_FX2LAFW
+
+#endif
#ifdef HAVE_LA_ALSA
extern SR_PRIV struct sr_dev_plugin alsa_plugin_info;
#endif
+#ifdef HAVE_LA_FX2LAFW
+extern SR_PRIV struct sr_dev_plugin fx2lafw_plugin_info;
+#endif
static struct sr_dev_plugin *plugins_list[] = {
#ifdef HAVE_LA_DEMO
#endif
#ifdef HAVE_LA_ALSA
&alsa_plugin_info,
+#endif
+#ifdef HAVE_LA_FX2LAFW
+ &fx2lafw_plugin_info,
#endif
NULL,
};