forked from Ivasoft/DSView
Add DSLogic hardware support
This commit is contained in:
31
libsigrok4DSLogic/hardware/DSLogic/Makefile.am
Normal file
31
libsigrok4DSLogic/hardware/DSLogic/Makefile.am
Normal file
@@ -0,0 +1,31 @@
|
||||
##
|
||||
## This file is part of the libsigrok project.
|
||||
##
|
||||
## Copyright (C) 2011 Uwe Hermann <uwe@hermann-uwe.de>
|
||||
##
|
||||
## 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/>.
|
||||
##
|
||||
|
||||
|
||||
# Local lib, this is NOT meant to be installed!
|
||||
noinst_LTLIBRARIES = libsigrok4DSLogic_hw_dslogic.la
|
||||
|
||||
libsigrok4DSLogic_hw_dslogic_la_SOURCES = \
|
||||
command.c \
|
||||
dslogic.c
|
||||
|
||||
libsigrok4DSLogic_hw_dslogic_la_CFLAGS = \
|
||||
-I$(top_srcdir)
|
||||
|
||||
|
||||
547
libsigrok4DSLogic/hardware/DSLogic/Makefile.in
Normal file
547
libsigrok4DSLogic/hardware/DSLogic/Makefile.in
Normal file
@@ -0,0 +1,547 @@
|
||||
# Makefile.in generated by automake 1.11.3 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
|
||||
# Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = hardware/DSLogic
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
LTLIBRARIES = $(noinst_LTLIBRARIES)
|
||||
libsigrok4DSLogic_hw_dslogic_la_LIBADD =
|
||||
am_libsigrok4DSLogic_hw_dslogic_la_OBJECTS = \
|
||||
libsigrok4DSLogic_hw_dslogic_la-command.lo \
|
||||
libsigrok4DSLogic_hw_dslogic_la-dslogic.lo
|
||||
libsigrok4DSLogic_hw_dslogic_la_OBJECTS = \
|
||||
$(am_libsigrok4DSLogic_hw_dslogic_la_OBJECTS)
|
||||
AM_V_lt = $(am__v_lt_@AM_V@)
|
||||
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
|
||||
am__v_lt_0 = --silent
|
||||
libsigrok4DSLogic_hw_dslogic_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
|
||||
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
|
||||
$(libsigrok4DSLogic_hw_dslogic_la_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/autostuff/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
am__mv = mv -f
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
AM_V_CC = $(am__v_CC_@AM_V@)
|
||||
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
|
||||
am__v_CC_0 = @echo " CC " $@;
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
|
||||
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
|
||||
am__v_CCLD_0 = @echo " CCLD " $@;
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
SOURCES = $(libsigrok4DSLogic_hw_dslogic_la_SOURCES)
|
||||
DIST_SOURCES = $(libsigrok4DSLogic_hw_dslogic_la_SOURCES)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AM_LIBTOOLFLAGS = @AM_LIBTOOLFLAGS@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FGREP = @FGREP@
|
||||
FIRMWARE_DIR = @FIRMWARE_DIR@
|
||||
GLIB_CFLAGS = @GLIB_CFLAGS@
|
||||
GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@
|
||||
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
|
||||
GLIB_LIBS = @GLIB_LIBS@
|
||||
GLIB_MKENUMS = @GLIB_MKENUMS@
|
||||
GOBJECT_QUERY = @GOBJECT_QUERY@
|
||||
GREP = @GREP@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEFLAGS = @MAKEFLAGS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
SR_LIB_LDFLAGS = @SR_LIB_LDFLAGS@
|
||||
SR_LIB_VERSION = @SR_LIB_VERSION@
|
||||
SR_LIB_VERSION_AGE = @SR_LIB_VERSION_AGE@
|
||||
SR_LIB_VERSION_CURRENT = @SR_LIB_VERSION_CURRENT@
|
||||
SR_LIB_VERSION_REVISION = @SR_LIB_VERSION_REVISION@
|
||||
SR_PACKAGE_VERSION = @SR_PACKAGE_VERSION@
|
||||
SR_PACKAGE_VERSION_MAJOR = @SR_PACKAGE_VERSION_MAJOR@
|
||||
SR_PACKAGE_VERSION_MICRO = @SR_PACKAGE_VERSION_MICRO@
|
||||
SR_PACKAGE_VERSION_MINOR = @SR_PACKAGE_VERSION_MINOR@
|
||||
SR_PKGLIBS = @SR_PKGLIBS@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
check_CFLAGS = @check_CFLAGS@
|
||||
check_LIBS = @check_LIBS@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
libserialport_CFLAGS = @libserialport_CFLAGS@
|
||||
libserialport_LIBS = @libserialport_LIBS@
|
||||
libusb_CFLAGS = @libusb_CFLAGS@
|
||||
libusb_LIBS = @libusb_LIBS@
|
||||
libzip_CFLAGS = @libzip_CFLAGS@
|
||||
libzip_LIBS = @libzip_LIBS@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
|
||||
# Local lib, this is NOT meant to be installed!
|
||||
noinst_LTLIBRARIES = libsigrok4DSLogic_hw_dslogic.la
|
||||
libsigrok4DSLogic_hw_dslogic_la_SOURCES = \
|
||||
command.c \
|
||||
dslogic.c
|
||||
|
||||
libsigrok4DSLogic_hw_dslogic_la_CFLAGS = \
|
||||
-I$(top_srcdir)
|
||||
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu hardware/DSLogic/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu hardware/DSLogic/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
clean-noinstLTLIBRARIES:
|
||||
-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
|
||||
@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
|
||||
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
|
||||
test "$$dir" != "$$p" || dir=.; \
|
||||
echo "rm -f \"$${dir}/so_locations\""; \
|
||||
rm -f "$${dir}/so_locations"; \
|
||||
done
|
||||
libsigrok4DSLogic_hw_dslogic.la: $(libsigrok4DSLogic_hw_dslogic_la_OBJECTS) $(libsigrok4DSLogic_hw_dslogic_la_DEPENDENCIES) $(EXTRA_libsigrok4DSLogic_hw_dslogic_la_DEPENDENCIES)
|
||||
$(AM_V_CCLD)$(libsigrok4DSLogic_hw_dslogic_la_LINK) $(libsigrok4DSLogic_hw_dslogic_la_OBJECTS) $(libsigrok4DSLogic_hw_dslogic_la_LIBADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsigrok4DSLogic_hw_dslogic_la-command.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsigrok4DSLogic_hw_dslogic_la-dslogic.Plo@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
libsigrok4DSLogic_hw_dslogic_la-command.lo: command.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsigrok4DSLogic_hw_dslogic_la_CFLAGS) $(CFLAGS) -MT libsigrok4DSLogic_hw_dslogic_la-command.lo -MD -MP -MF $(DEPDIR)/libsigrok4DSLogic_hw_dslogic_la-command.Tpo -c -o libsigrok4DSLogic_hw_dslogic_la-command.lo `test -f 'command.c' || echo '$(srcdir)/'`command.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsigrok4DSLogic_hw_dslogic_la-command.Tpo $(DEPDIR)/libsigrok4DSLogic_hw_dslogic_la-command.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='command.c' object='libsigrok4DSLogic_hw_dslogic_la-command.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsigrok4DSLogic_hw_dslogic_la_CFLAGS) $(CFLAGS) -c -o libsigrok4DSLogic_hw_dslogic_la-command.lo `test -f 'command.c' || echo '$(srcdir)/'`command.c
|
||||
|
||||
libsigrok4DSLogic_hw_dslogic_la-dslogic.lo: dslogic.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsigrok4DSLogic_hw_dslogic_la_CFLAGS) $(CFLAGS) -MT libsigrok4DSLogic_hw_dslogic_la-dslogic.lo -MD -MP -MF $(DEPDIR)/libsigrok4DSLogic_hw_dslogic_la-dslogic.Tpo -c -o libsigrok4DSLogic_hw_dslogic_la-dslogic.lo `test -f 'dslogic.c' || echo '$(srcdir)/'`dslogic.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsigrok4DSLogic_hw_dslogic_la-dslogic.Tpo $(DEPDIR)/libsigrok4DSLogic_hw_dslogic_la-dslogic.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dslogic.c' object='libsigrok4DSLogic_hw_dslogic_la-dslogic.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsigrok4DSLogic_hw_dslogic_la_CFLAGS) $(CFLAGS) -c -o libsigrok4DSLogic_hw_dslogic_la-dslogic.lo `test -f 'dslogic.c' || echo '$(srcdir)/'`dslogic.c
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(LTLIBRARIES)
|
||||
installdirs:
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
|
||||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-libtool clean-noinstLTLIBRARIES ctags distclean \
|
||||
distclean-compile distclean-generic distclean-libtool \
|
||||
distclean-tags distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-html \
|
||||
install-html-am install-info install-info-am install-man \
|
||||
install-pdf install-pdf-am install-ps install-ps-am \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
|
||||
pdf pdf-am ps ps-am tags uninstall uninstall-am
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
177
libsigrok4DSLogic/hardware/DSLogic/command.c
Normal file
177
libsigrok4DSLogic/hardware/DSLogic/command.c
Normal file
@@ -0,0 +1,177 @@
|
||||
/*
|
||||
* This file is part of the libsigrok project.
|
||||
*
|
||||
* Copyright (C) 2013 Bert Vermeulen <bert@biot.com>
|
||||
*
|
||||
* 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 <libusb.h>
|
||||
#include "command.h"
|
||||
//#include "libsigrok.h"
|
||||
#include "libsigrok-internal.h"
|
||||
#include "dslogic.h"
|
||||
|
||||
SR_PRIV int command_get_fw_version(libusb_device_handle *devhdl,
|
||||
struct version_info *vi)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = libusb_control_transfer(devhdl, LIBUSB_REQUEST_TYPE_VENDOR |
|
||||
LIBUSB_ENDPOINT_IN, CMD_GET_FW_VERSION, 0x0000, 0x0000,
|
||||
(unsigned char *)vi, sizeof(struct version_info), 100);
|
||||
|
||||
if (ret < 0) {
|
||||
sr_err("Unable to get version info: %s.",
|
||||
libusb_error_name(ret));
|
||||
return SR_ERR;
|
||||
}
|
||||
|
||||
return SR_OK;
|
||||
}
|
||||
|
||||
SR_PRIV int command_get_revid_version(libusb_device_handle *devhdl,
|
||||
uint8_t *revid)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = libusb_control_transfer(devhdl, LIBUSB_REQUEST_TYPE_VENDOR |
|
||||
LIBUSB_ENDPOINT_IN, CMD_GET_REVID_VERSION, 0x0000, 0x0000,
|
||||
revid, 1, 100);
|
||||
|
||||
if (ret < 0) {
|
||||
sr_err("Unable to get REVID: %s.", libusb_error_name(ret));
|
||||
return SR_ERR;
|
||||
}
|
||||
|
||||
return SR_OK;
|
||||
}
|
||||
|
||||
SR_PRIV int command_start_acquisition(libusb_device_handle *devhdl,
|
||||
uint64_t samplerate, gboolean samplewide)
|
||||
{
|
||||
struct cmd_start_acquisition cmd;
|
||||
int delay = 0, ret;
|
||||
|
||||
/* Compute the sample rate. */
|
||||
// if (samplewide && samplerate > MAX_16BIT_SAMPLE_RATE) {
|
||||
// sr_err("Unable to sample at %" PRIu64 "Hz "
|
||||
// "when collecting 16-bit samples.", samplerate);
|
||||
// return SR_ERR;
|
||||
// }
|
||||
|
||||
// if ((SR_MHZ(48) % samplerate) == 0) {
|
||||
// cmd.flags = CMD_START_FLAGS_CLK_48MHZ;
|
||||
// delay = SR_MHZ(48) / samplerate - 1;
|
||||
// if (delay > MAX_SAMPLE_DELAY)
|
||||
// delay = 0;
|
||||
// }
|
||||
|
||||
// if (delay == 0 && (SR_MHZ(30) % samplerate) == 0) {
|
||||
// cmd.flags = CMD_START_FLAGS_CLK_30MHZ;
|
||||
// delay = SR_MHZ(30) / samplerate - 1;
|
||||
// }
|
||||
cmd.flags = CMD_START_FLAGS_CLK_30MHZ;
|
||||
delay = 0;
|
||||
|
||||
sr_info("GPIF delay = %d, clocksource = %sMHz.", delay,
|
||||
(cmd.flags & CMD_START_FLAGS_CLK_48MHZ) ? "48" : "30");
|
||||
|
||||
// if (delay <= 0 || delay > MAX_SAMPLE_DELAY) {
|
||||
// sr_err("Unable to sample at %" PRIu64 "Hz.", samplerate);
|
||||
// return SR_ERR;
|
||||
// }
|
||||
|
||||
cmd.sample_delay_h = (delay >> 8) & 0xff;
|
||||
cmd.sample_delay_l = delay & 0xff;
|
||||
|
||||
/* Select the sampling width. */
|
||||
cmd.flags |= samplewide ? CMD_START_FLAGS_SAMPLE_16BIT :
|
||||
CMD_START_FLAGS_SAMPLE_8BIT;
|
||||
|
||||
/* Send the control message. */
|
||||
ret = libusb_control_transfer(devhdl, LIBUSB_REQUEST_TYPE_VENDOR |
|
||||
LIBUSB_ENDPOINT_OUT, CMD_START, 0x0000, 0x0000,
|
||||
(unsigned char *)&cmd, sizeof(cmd), 3000);
|
||||
if (ret < 0) {
|
||||
sr_err("Unable to send start command: %s.",
|
||||
libusb_error_name(ret));
|
||||
return SR_ERR;
|
||||
}
|
||||
|
||||
return SR_OK;
|
||||
}
|
||||
|
||||
SR_PRIV int command_stop_acquisition(libusb_device_handle *devhdl)
|
||||
{
|
||||
struct cmd_start_acquisition cmd;
|
||||
int ret;
|
||||
|
||||
/* stop acquisition command */
|
||||
cmd.flags = CMD_START_FLAGS_STOP;
|
||||
cmd.sample_delay_h = 0;
|
||||
cmd.sample_delay_l = 0;
|
||||
|
||||
/* Send the control message. */
|
||||
ret = libusb_control_transfer(devhdl, LIBUSB_REQUEST_TYPE_VENDOR |
|
||||
LIBUSB_ENDPOINT_OUT, CMD_START, 0x0000, 0x0000,
|
||||
(unsigned char *)&cmd, sizeof(cmd), 3000);
|
||||
if (ret < 0) {
|
||||
sr_err("Unable to send stop command: %s.",
|
||||
libusb_error_name(ret));
|
||||
return SR_ERR;
|
||||
}
|
||||
|
||||
return SR_OK;
|
||||
}
|
||||
|
||||
SR_PRIV int command_fpga_config(libusb_device_handle *devhdl)
|
||||
{
|
||||
int ret;
|
||||
|
||||
/* Send the control message. */
|
||||
ret = libusb_control_transfer(devhdl, LIBUSB_REQUEST_TYPE_VENDOR |
|
||||
LIBUSB_ENDPOINT_OUT, CMD_CONFIG, 0x0000, 0x0000,
|
||||
NULL, 0, 3000);
|
||||
if (ret < 0) {
|
||||
sr_err("Unable to send FPGA configure command: %s.",
|
||||
libusb_error_name(ret));
|
||||
return SR_ERR;
|
||||
}
|
||||
|
||||
return SR_OK;
|
||||
}
|
||||
|
||||
SR_PRIV int command_fpga_setting(libusb_device_handle *devhdl, uint32_t setting_count)
|
||||
{
|
||||
struct cmd_setting_count cmd;
|
||||
int ret;
|
||||
|
||||
/* ... */
|
||||
cmd.byte0 = (uint8_t)setting_count;
|
||||
cmd.byte1 = (uint8_t)(setting_count >> 8);
|
||||
cmd.byte2 = (uint8_t)(setting_count >> 16);
|
||||
|
||||
/* Send the control message. */
|
||||
ret = libusb_control_transfer(devhdl, LIBUSB_REQUEST_TYPE_VENDOR |
|
||||
LIBUSB_ENDPOINT_OUT, CMD_SETTING, 0x0000, 0x0000,
|
||||
(unsigned char *)&cmd, sizeof(cmd), 100);
|
||||
if (ret < 0) {
|
||||
sr_err("Unable to send FPGA setting command: %s.",
|
||||
libusb_error_name(ret));
|
||||
return SR_ERR;
|
||||
}
|
||||
|
||||
return SR_OK;
|
||||
}
|
||||
79
libsigrok4DSLogic/hardware/DSLogic/command.h
Normal file
79
libsigrok4DSLogic/hardware/DSLogic/command.h
Normal file
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
* This file is part of the libsigrok project.
|
||||
*
|
||||
* Copyright (C) 2013 Bert Vermeulen <bert@biot.com>
|
||||
*
|
||||
* 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 LIBDSLOGIC_HARDWARE_COMMAND_H
|
||||
#define LIBDSLOGIC_HARDWARE_COMMAND_H
|
||||
|
||||
#include <glib.h>
|
||||
#include "libsigrok.h"
|
||||
|
||||
/* Protocol commands */
|
||||
#define CMD_GET_FW_VERSION 0xb0
|
||||
#define CMD_GET_REVID_VERSION 0xb1
|
||||
#define CMD_START 0xb2
|
||||
#define CMD_CONFIG 0xb3
|
||||
#define CMD_SETTING 0xb4
|
||||
|
||||
|
||||
#define CMD_START_FLAGS_WIDE_POS 5
|
||||
#define CMD_START_FLAGS_CLK_SRC_POS 6
|
||||
#define CMD_START_FLAGS_STOP_POS 7
|
||||
|
||||
#define CMD_START_FLAGS_SAMPLE_8BIT (0 << CMD_START_FLAGS_WIDE_POS)
|
||||
#define CMD_START_FLAGS_SAMPLE_16BIT (1 << CMD_START_FLAGS_WIDE_POS)
|
||||
|
||||
#define CMD_START_FLAGS_CLK_30MHZ (0 << CMD_START_FLAGS_CLK_SRC_POS)
|
||||
#define CMD_START_FLAGS_CLK_48MHZ (1 << CMD_START_FLAGS_CLK_SRC_POS)
|
||||
|
||||
#define CMD_START_FLAGS_STOP (1 << CMD_START_FLAGS_STOP_POS)
|
||||
|
||||
#pragma pack(push, 1)
|
||||
|
||||
struct version_info {
|
||||
uint8_t major;
|
||||
uint8_t minor;
|
||||
};
|
||||
|
||||
struct cmd_start_acquisition {
|
||||
uint8_t flags;
|
||||
uint8_t sample_delay_h;
|
||||
uint8_t sample_delay_l;
|
||||
};
|
||||
|
||||
struct cmd_setting_count {
|
||||
uint8_t byte0;
|
||||
uint8_t byte1;
|
||||
uint8_t byte2;
|
||||
};
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
SR_PRIV int command_get_fw_version(libusb_device_handle *devhdl,
|
||||
struct version_info *vi);
|
||||
SR_PRIV int command_get_revid_version(libusb_device_handle *devhdl,
|
||||
uint8_t *revid);
|
||||
SR_PRIV int command_start_acquisition(libusb_device_handle *devhdl,
|
||||
uint64_t samplerate, gboolean samplewide);
|
||||
SR_PRIV int command_stop_acquistition(libusb_device_handle *devhdl);
|
||||
|
||||
SR_PRIV int command_fpga_config(libusb_device_handle *devhdl);
|
||||
|
||||
SR_PRIV int command_fpga_setting(libusb_device_handle *devhdl, uint32_t setting_count);
|
||||
|
||||
#endif
|
||||
1587
libsigrok4DSLogic/hardware/DSLogic/dslogic.c
Normal file
1587
libsigrok4DSLogic/hardware/DSLogic/dslogic.c
Normal file
File diff suppressed because it is too large
Load Diff
196
libsigrok4DSLogic/hardware/DSLogic/dslogic.h
Normal file
196
libsigrok4DSLogic/hardware/DSLogic/dslogic.h
Normal file
@@ -0,0 +1,196 @@
|
||||
/*
|
||||
* This file is part of the libsigrok project.
|
||||
*
|
||||
* Copyright (C) 2013 Bert Vermeulen <bert@biot.com>
|
||||
* Copyright (C) 2013 DreamSourceLab <dreamsourcelab@dreamsourcelab.com>
|
||||
*
|
||||
* 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 LIBDSLOGIC_HARDWARE_DSLOGIC_H
|
||||
#define LIBDSLOGIC_HARDWARE_DSLOGIC_H
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
/* Message logging helpers with subsystem-specific prefix string. */
|
||||
#define LOG_PREFIX "DSLogic Hardware: "
|
||||
#define ds_log(l, s, args...) ds_log(l, LOG_PREFIX s, ## args)
|
||||
#define ds_spew(s, args...) ds_spew(LOG_PREFIX s, ## args)
|
||||
#define ds_dbg(s, args...) ds_dbg(LOG_PREFIX s, ## args)
|
||||
#define ds_info(s, args...) ds_info(LOG_PREFIX s, ## args)
|
||||
#define ds_warn(s, args...) ds_warn(LOG_PREFIX s, ## args)
|
||||
#define ds_err(s, args...) ds_err(LOG_PREFIX s, ## args)
|
||||
|
||||
#define USB_INTERFACE 0
|
||||
#define USB_CONFIGURATION 1
|
||||
#define NUM_TRIGGER_STAGES 16
|
||||
#define TRIGGER_TYPE "01"
|
||||
|
||||
#define MAX_RENUM_DELAY_MS 3000
|
||||
#define NUM_SIMUL_TRANSFERS 64
|
||||
#define MAX_EMPTY_TRANSFERS (NUM_SIMUL_TRANSFERS * 2)
|
||||
|
||||
#define DSLOGIC_REQUIRED_VERSION_MAJOR 1
|
||||
|
||||
#define MAX_8BIT_SAMPLE_RATE DS_MHZ(24)
|
||||
#define MAX_16BIT_SAMPLE_RATE DS_MHZ(12)
|
||||
|
||||
/* 6 delay states of up to 256 clock ticks */
|
||||
#define MAX_SAMPLE_DELAY (6 * 256)
|
||||
|
||||
/* Software trigger implementation: positive values indicate trigger stage. */
|
||||
#define TRIGGER_FIRED -1
|
||||
|
||||
#define DEV_CAPS_16BIT_POS 0
|
||||
|
||||
#define DEV_CAPS_16BIT (1 << DEV_CAPS_16BIT_POS)
|
||||
|
||||
#define XC3S250E_BYTE_CNT 169216
|
||||
//#define XC6SLX9_BYTE_CNT 340884
|
||||
#define XC6SLX9_BYTE_CNT 340604
|
||||
|
||||
#define MAX_ANALOG_PROBES_NUM 9
|
||||
#define MAX_DSO_PROBES_NUM 2
|
||||
|
||||
struct DSLogic_profile {
|
||||
uint16_t vid;
|
||||
uint16_t pid;
|
||||
|
||||
const char *vendor;
|
||||
const char *model;
|
||||
const char *model_version;
|
||||
|
||||
const char *firmware;
|
||||
|
||||
const char *fpga_bit;
|
||||
|
||||
uint32_t dev_caps;
|
||||
};
|
||||
|
||||
static const struct DSLogic_profile supported_fx2[3] = {
|
||||
/*
|
||||
* DSLogic
|
||||
*/
|
||||
{0x2A0E, 0x0001, NULL, "DSLogic", NULL,
|
||||
"DSLogic.fw",
|
||||
"DSLogic.bin",
|
||||
DEV_CAPS_16BIT},
|
||||
|
||||
{ 0, 0, 0, 0, 0, 0, 0 }
|
||||
};
|
||||
|
||||
enum {
|
||||
DSLOGIC_ERROR = -1,
|
||||
DSLOGIC_INIT = 0,
|
||||
DSLOGIC_START = 1,
|
||||
DSLOGIC_TRIGGERED = 2,
|
||||
DSLOGIC_DATA = 3,
|
||||
DSLOGIC_STOP = 4,
|
||||
};
|
||||
|
||||
struct dev_context {
|
||||
const struct DSLogic_profile *profile;
|
||||
/*
|
||||
* Since we can't keep track of an DSLogic device after upgrading
|
||||
* the firmware (it renumerates into a different device address
|
||||
* after the upgrade) this is like a global lock. No device will open
|
||||
* until a proper delay after the last device was upgraded.
|
||||
*/
|
||||
int64_t fw_updated;
|
||||
|
||||
/* Device/capture settings */
|
||||
uint64_t cur_samplerate;
|
||||
uint64_t limit_samples;
|
||||
|
||||
/* Operational settings */
|
||||
gboolean sample_wide;
|
||||
gboolean clock_type;
|
||||
uint16_t op_mode;
|
||||
uint16_t trigger_mask[NUM_TRIGGER_STAGES];
|
||||
uint16_t trigger_value[NUM_TRIGGER_STAGES];
|
||||
int trigger_stage;
|
||||
uint16_t trigger_buffer[NUM_TRIGGER_STAGES];
|
||||
|
||||
int num_samples;
|
||||
int submitted_transfers;
|
||||
int empty_transfer_count;
|
||||
|
||||
void *cb_data;
|
||||
unsigned int num_transfers;
|
||||
struct libusb_transfer **transfers;
|
||||
int *usbfd;
|
||||
|
||||
int status;
|
||||
};
|
||||
|
||||
struct DSLogic_setting {
|
||||
uint32_t sync;
|
||||
uint16_t mode_header; // 0
|
||||
uint16_t mode;
|
||||
uint32_t divider_header; // 1-2
|
||||
uint32_t divider;
|
||||
uint32_t count_header; // 3-4
|
||||
uint32_t count;
|
||||
uint32_t trig_pos_header; // 5-6
|
||||
uint32_t trig_pos;
|
||||
uint16_t trig_glb_header; // 7
|
||||
uint16_t trig_glb;
|
||||
uint32_t trig_adp_header; // 10-11
|
||||
uint32_t trig_adp;
|
||||
uint32_t trig_sda_header; // 12-13
|
||||
uint32_t trig_sda;
|
||||
uint32_t trig_mask0_header; // 16
|
||||
uint16_t trig_mask0[NUM_TRIGGER_STAGES];
|
||||
uint32_t trig_mask1_header; // 17
|
||||
uint16_t trig_mask1[NUM_TRIGGER_STAGES];
|
||||
//uint32_t trig_mask2_header; // 18
|
||||
//uint16_t trig_mask2[NUM_TRIGGER_STAGES];
|
||||
//uint32_t trig_mask3_header; // 19
|
||||
//uint16_t trig_mask3[NUM_TRIGGER_STAGES];
|
||||
uint32_t trig_value0_header; // 20
|
||||
uint16_t trig_value0[NUM_TRIGGER_STAGES];
|
||||
uint32_t trig_value1_header; // 21
|
||||
uint16_t trig_value1[NUM_TRIGGER_STAGES];
|
||||
//uint32_t trig_value2_header; // 22
|
||||
//uint16_t trig_value2[NUM_TRIGGER_STAGES];
|
||||
//uint32_t trig_value3_header; // 23
|
||||
//uint16_t trig_value3[NUM_TRIGGER_STAGES];
|
||||
uint32_t trig_edge0_header; // 24
|
||||
uint16_t trig_edge0[NUM_TRIGGER_STAGES];
|
||||
uint32_t trig_edge1_header; // 25
|
||||
uint16_t trig_edge1[NUM_TRIGGER_STAGES];
|
||||
//uint32_t trig_edge2_header; // 26
|
||||
//uint16_t trig_edge2[NUM_TRIGGER_STAGES];
|
||||
//uint32_t trig_edge3_header; // 27
|
||||
//uint16_t trig_edge3[NUM_TRIGGER_STAGES];
|
||||
uint32_t trig_count0_header; // 28
|
||||
uint16_t trig_count0[NUM_TRIGGER_STAGES];
|
||||
uint32_t trig_count1_header; // 29
|
||||
uint16_t trig_count1[NUM_TRIGGER_STAGES];
|
||||
//uint32_t trig_count2_header; // 30
|
||||
//uint16_t trig_count2[NUM_TRIGGER_STAGES];
|
||||
//uint32_t trig_count3_header; // 31
|
||||
//uint16_t trig_count3[NUM_TRIGGER_STAGES];
|
||||
uint32_t trig_logic0_header; // 32
|
||||
uint16_t trig_logic0[NUM_TRIGGER_STAGES];
|
||||
uint32_t trig_logic1_header; // 33
|
||||
uint16_t trig_logic1[NUM_TRIGGER_STAGES];
|
||||
//uint32_t trig_logic2_header; // 34
|
||||
//uint16_t trig_logic2[NUM_TRIGGER_STAGES];
|
||||
//uint32_t trig_logic3_header; // 35
|
||||
//uint16_t trig_logic3[NUM_TRIGGER_STAGES];
|
||||
uint32_t end_sync;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user