mirror of https://github.com/EspoTek/Labrador.git
Oh, it's just like .dlls but they call it something different on Linux.
Fair enough. USB Control working. Iso still WIP, but if it works first time it should be up and running tomorrow!
This commit is contained in:
parent
a7da94f957
commit
ea47ae4133
|
@ -89,7 +89,9 @@ unix:!macx:SOURCES += gahnooslashlinuxusbdriver.cpp
|
|||
unix:!macx:HEADERS += gahnooslashlinuxusbdriver.h
|
||||
|
||||
#libusb include
|
||||
#unix:!macx:LIBS += -lusb-1.0
|
||||
unix:!macx:LIBS += -Lbuild_linux/libusb -lusb-1.0
|
||||
unix:!macx:INCLUDEPATH += build_linux/libusb
|
||||
unix:!macx:DEPENDPATH += build_linux/libusb
|
||||
|
||||
#libusb1 include
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 4.1.0, 2016-10-20T13:53:53. -->
|
||||
<!-- Written by QtCreator 4.1.0, 2016-10-20T17:15:11. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
|
@ -309,6 +309,7 @@
|
|||
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">Labrador.pro</value>
|
||||
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value>
|
||||
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">true</value>
|
||||
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory.default">/home/esposch/git/Labrador/Desktop Interface/bin</value>
|
||||
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
|
||||
|
|
|
@ -15,7 +15,7 @@ CXX = g++
|
|||
DEFINES = -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB
|
||||
CFLAGS = -pipe -O2 -Wall -W -D_REENTRANT -fPIC $(DEFINES)
|
||||
CXXFLAGS = -pipe -O2 -std=gnu++11 -Wall -W -D_REENTRANT -fPIC $(DEFINES)
|
||||
INCPATH = -I. -Ibuild_linux -I../../../Qt/5.7/gcc_64/include -I../../../Qt/5.7/gcc_64/include/QtPrintSupport -I../../../Qt/5.7/gcc_64/include/QtWidgets -I../../../Qt/5.7/gcc_64/include/QtGui -I../../../Qt/5.7/gcc_64/include/QtCore -I. -I. -I../../../Qt/5.7/gcc_64/mkspecs/linux-g++
|
||||
INCPATH = -I. -Ibuild_linux -Ibuild_linux/libusb -I../../../Qt/5.7/gcc_64/include -I../../../Qt/5.7/gcc_64/include/QtPrintSupport -I../../../Qt/5.7/gcc_64/include/QtWidgets -I../../../Qt/5.7/gcc_64/include/QtGui -I../../../Qt/5.7/gcc_64/include/QtCore -I. -I. -I../../../Qt/5.7/gcc_64/mkspecs/linux-g++
|
||||
QMAKE = /home/esposch/Qt/5.7/gcc_64/bin/qmake
|
||||
DEL_FILE = rm -f
|
||||
CHK_DIR_EXISTS= test -d
|
||||
|
@ -36,7 +36,7 @@ DISTNAME = Labrador1.0.0
|
|||
DISTDIR = /home/esposch/git/Labrador/Desktop\ Interface/.tmp/Labrador1.0.0
|
||||
LINK = g++
|
||||
LFLAGS = -Wl,-O1 -Wl,-rpath,/home/esposch/Qt/5.7/gcc_64/lib
|
||||
LIBS = $(SUBLIBS) -lushghkjdfsghb-1.0 -L/home/esposch/Qt/5.7/gcc_64/lib -lQt5PrintSupport -L/usr/lib64 -lQt5Widgets -lQt5Gui -lQt5Core -lGL -lpthread
|
||||
LIBS = $(SUBLIBS) -Lbuild_linux/libusb -lusb-1.0 -L/home/esposch/Qt/5.7/gcc_64/lib -lQt5PrintSupport -L/usr/lib64 -lQt5Widgets -lQt5Gui -lQt5Core -lGL -lpthread
|
||||
AR = ar cqs
|
||||
RANLIB =
|
||||
SED = sed
|
||||
|
@ -1166,18 +1166,22 @@ moc_mainwindow.cpp: ../../../Qt/5.7/gcc_64/include/QtWidgets/QMainWindow \
|
|||
../../../Qt/5.7/gcc_64/include/QtPrintSupport/qtprintsupportversion.h \
|
||||
build_linux/platformspecific.h \
|
||||
gahnooslashlinuxusbdriver.h \
|
||||
genericusbdriver.h \
|
||||
../../../Qt/5.7/gcc_64/include/QtWidgets/QLabel \
|
||||
../../../Qt/5.7/gcc_64/include/QtCore/QTimer \
|
||||
functiongencontrol.h \
|
||||
xmega.h \
|
||||
desktop_settings.h \
|
||||
buffercontrol.h \
|
||||
ui_mainwindow.h \
|
||||
scoperangeenterdialog.h \
|
||||
../../../Qt/5.7/gcc_64/include/QtWidgets/QDialog \
|
||||
isobuffer.h \
|
||||
../../../Qt/5.7/gcc_64/include/QtCore/QByteArray \
|
||||
../../../Qt/5.7/gcc_64/include/QtCore/QTimer \
|
||||
../../../Qt/5.7/gcc_64/include/QtWidgets/QPlainTextEdit \
|
||||
xmega.h \
|
||||
desktop_settings.h \
|
||||
mainwindow.h \
|
||||
../../../Qt/5.7/gcc_64/bin/moc
|
||||
/home/esposch/Qt/5.7/gcc_64/bin/moc $(DEFINES) -I/home/esposch/Qt/5.7/gcc_64/mkspecs/linux-g++ -I'/home/esposch/git/Labrador/Desktop Interface' -I'/home/esposch/git/Labrador/Desktop Interface/build_linux' -I/home/esposch/Qt/5.7/gcc_64/include -I/home/esposch/Qt/5.7/gcc_64/include/QtPrintSupport -I/home/esposch/Qt/5.7/gcc_64/include/QtWidgets -I/home/esposch/Qt/5.7/gcc_64/include/QtGui -I/home/esposch/Qt/5.7/gcc_64/include/QtCore -I/usr/include/c++/5 -I/usr/include/x86_64-linux-gnu/c++/5 -I/usr/include/c++/5/backward -I/usr/lib/gcc/x86_64-linux-gnu/5/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include mainwindow.h -o moc_mainwindow.cpp
|
||||
/home/esposch/Qt/5.7/gcc_64/bin/moc $(DEFINES) -I/home/esposch/Qt/5.7/gcc_64/mkspecs/linux-g++ -I'/home/esposch/git/Labrador/Desktop Interface' -I'/home/esposch/git/Labrador/Desktop Interface/build_linux' -I'/home/esposch/git/Labrador/Desktop Interface/build_linux/libusb' -I/home/esposch/Qt/5.7/gcc_64/include -I/home/esposch/Qt/5.7/gcc_64/include/QtPrintSupport -I/home/esposch/Qt/5.7/gcc_64/include/QtWidgets -I/home/esposch/Qt/5.7/gcc_64/include/QtGui -I/home/esposch/Qt/5.7/gcc_64/include/QtCore -I/usr/include/c++/5 -I/usr/include/x86_64-linux-gnu/c++/5 -I/usr/include/c++/5/backward -I/usr/lib/gcc/x86_64-linux-gnu/5/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include mainwindow.h -o moc_mainwindow.cpp
|
||||
|
||||
moc_qcustomplot.cpp: ../../../Qt/5.7/gcc_64/include/QtCore/QObject \
|
||||
../../../Qt/5.7/gcc_64/include/QtCore/qobject.h \
|
||||
|
@ -1650,7 +1654,7 @@ moc_qcustomplot.cpp: ../../../Qt/5.7/gcc_64/include/QtCore/QObject \
|
|||
../../../Qt/5.7/gcc_64/include/QtPrintSupport/qtprintsupportversion.h \
|
||||
qcustomplot.h \
|
||||
../../../Qt/5.7/gcc_64/bin/moc
|
||||
/home/esposch/Qt/5.7/gcc_64/bin/moc $(DEFINES) -I/home/esposch/Qt/5.7/gcc_64/mkspecs/linux-g++ -I'/home/esposch/git/Labrador/Desktop Interface' -I'/home/esposch/git/Labrador/Desktop Interface/build_linux' -I/home/esposch/Qt/5.7/gcc_64/include -I/home/esposch/Qt/5.7/gcc_64/include/QtPrintSupport -I/home/esposch/Qt/5.7/gcc_64/include/QtWidgets -I/home/esposch/Qt/5.7/gcc_64/include/QtGui -I/home/esposch/Qt/5.7/gcc_64/include/QtCore -I/usr/include/c++/5 -I/usr/include/x86_64-linux-gnu/c++/5 -I/usr/include/c++/5/backward -I/usr/lib/gcc/x86_64-linux-gnu/5/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include qcustomplot.h -o moc_qcustomplot.cpp
|
||||
/home/esposch/Qt/5.7/gcc_64/bin/moc $(DEFINES) -I/home/esposch/Qt/5.7/gcc_64/mkspecs/linux-g++ -I'/home/esposch/git/Labrador/Desktop Interface' -I'/home/esposch/git/Labrador/Desktop Interface/build_linux' -I'/home/esposch/git/Labrador/Desktop Interface/build_linux/libusb' -I/home/esposch/Qt/5.7/gcc_64/include -I/home/esposch/Qt/5.7/gcc_64/include/QtPrintSupport -I/home/esposch/Qt/5.7/gcc_64/include/QtWidgets -I/home/esposch/Qt/5.7/gcc_64/include/QtGui -I/home/esposch/Qt/5.7/gcc_64/include/QtCore -I/usr/include/c++/5 -I/usr/include/x86_64-linux-gnu/c++/5 -I/usr/include/c++/5/backward -I/usr/lib/gcc/x86_64-linux-gnu/5/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include qcustomplot.h -o moc_qcustomplot.cpp
|
||||
|
||||
moc_buffercontrol.cpp: ../../../Qt/5.7/gcc_64/include/QtWidgets/QWidget \
|
||||
../../../Qt/5.7/gcc_64/include/QtWidgets/qwidget.h \
|
||||
|
@ -1755,7 +1759,7 @@ moc_buffercontrol.cpp: ../../../Qt/5.7/gcc_64/include/QtWidgets/QWidget \
|
|||
../../../Qt/5.7/gcc_64/include/QtCore/QDebug \
|
||||
buffercontrol.h \
|
||||
../../../Qt/5.7/gcc_64/bin/moc
|
||||
/home/esposch/Qt/5.7/gcc_64/bin/moc $(DEFINES) -I/home/esposch/Qt/5.7/gcc_64/mkspecs/linux-g++ -I'/home/esposch/git/Labrador/Desktop Interface' -I'/home/esposch/git/Labrador/Desktop Interface/build_linux' -I/home/esposch/Qt/5.7/gcc_64/include -I/home/esposch/Qt/5.7/gcc_64/include/QtPrintSupport -I/home/esposch/Qt/5.7/gcc_64/include/QtWidgets -I/home/esposch/Qt/5.7/gcc_64/include/QtGui -I/home/esposch/Qt/5.7/gcc_64/include/QtCore -I/usr/include/c++/5 -I/usr/include/x86_64-linux-gnu/c++/5 -I/usr/include/c++/5/backward -I/usr/lib/gcc/x86_64-linux-gnu/5/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include buffercontrol.h -o moc_buffercontrol.cpp
|
||||
/home/esposch/Qt/5.7/gcc_64/bin/moc $(DEFINES) -I/home/esposch/Qt/5.7/gcc_64/mkspecs/linux-g++ -I'/home/esposch/git/Labrador/Desktop Interface' -I'/home/esposch/git/Labrador/Desktop Interface/build_linux' -I'/home/esposch/git/Labrador/Desktop Interface/build_linux/libusb' -I/home/esposch/Qt/5.7/gcc_64/include -I/home/esposch/Qt/5.7/gcc_64/include/QtPrintSupport -I/home/esposch/Qt/5.7/gcc_64/include/QtWidgets -I/home/esposch/Qt/5.7/gcc_64/include/QtGui -I/home/esposch/Qt/5.7/gcc_64/include/QtCore -I/usr/include/c++/5 -I/usr/include/x86_64-linux-gnu/c++/5 -I/usr/include/c++/5/backward -I/usr/lib/gcc/x86_64-linux-gnu/5/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include buffercontrol.h -o moc_buffercontrol.cpp
|
||||
|
||||
moc_esposlider.cpp: ../../../Qt/5.7/gcc_64/include/QtWidgets/QSlider \
|
||||
../../../Qt/5.7/gcc_64/include/QtWidgets/qslider.h \
|
||||
|
@ -1867,7 +1871,7 @@ moc_esposlider.cpp: ../../../Qt/5.7/gcc_64/include/QtWidgets/QSlider \
|
|||
../../../Qt/5.7/gcc_64/include/QtWidgets/qgridlayout.h \
|
||||
esposlider.h \
|
||||
../../../Qt/5.7/gcc_64/bin/moc
|
||||
/home/esposch/Qt/5.7/gcc_64/bin/moc $(DEFINES) -I/home/esposch/Qt/5.7/gcc_64/mkspecs/linux-g++ -I'/home/esposch/git/Labrador/Desktop Interface' -I'/home/esposch/git/Labrador/Desktop Interface/build_linux' -I/home/esposch/Qt/5.7/gcc_64/include -I/home/esposch/Qt/5.7/gcc_64/include/QtPrintSupport -I/home/esposch/Qt/5.7/gcc_64/include/QtWidgets -I/home/esposch/Qt/5.7/gcc_64/include/QtGui -I/home/esposch/Qt/5.7/gcc_64/include/QtCore -I/usr/include/c++/5 -I/usr/include/x86_64-linux-gnu/c++/5 -I/usr/include/c++/5/backward -I/usr/lib/gcc/x86_64-linux-gnu/5/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include esposlider.h -o moc_esposlider.cpp
|
||||
/home/esposch/Qt/5.7/gcc_64/bin/moc $(DEFINES) -I/home/esposch/Qt/5.7/gcc_64/mkspecs/linux-g++ -I'/home/esposch/git/Labrador/Desktop Interface' -I'/home/esposch/git/Labrador/Desktop Interface/build_linux' -I'/home/esposch/git/Labrador/Desktop Interface/build_linux/libusb' -I/home/esposch/Qt/5.7/gcc_64/include -I/home/esposch/Qt/5.7/gcc_64/include/QtPrintSupport -I/home/esposch/Qt/5.7/gcc_64/include/QtWidgets -I/home/esposch/Qt/5.7/gcc_64/include/QtGui -I/home/esposch/Qt/5.7/gcc_64/include/QtCore -I/usr/include/c++/5 -I/usr/include/x86_64-linux-gnu/c++/5 -I/usr/include/c++/5/backward -I/usr/lib/gcc/x86_64-linux-gnu/5/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include esposlider.h -o moc_esposlider.cpp
|
||||
|
||||
moc_espospinbox.cpp: ../../../Qt/5.7/gcc_64/include/QtWidgets/QWidget \
|
||||
../../../Qt/5.7/gcc_64/include/QtWidgets/qwidget.h \
|
||||
|
@ -1976,7 +1980,7 @@ moc_espospinbox.cpp: ../../../Qt/5.7/gcc_64/include/QtWidgets/QWidget \
|
|||
../../../Qt/5.7/gcc_64/include/QtCore/QDebug \
|
||||
espospinbox.h \
|
||||
../../../Qt/5.7/gcc_64/bin/moc
|
||||
/home/esposch/Qt/5.7/gcc_64/bin/moc $(DEFINES) -I/home/esposch/Qt/5.7/gcc_64/mkspecs/linux-g++ -I'/home/esposch/git/Labrador/Desktop Interface' -I'/home/esposch/git/Labrador/Desktop Interface/build_linux' -I/home/esposch/Qt/5.7/gcc_64/include -I/home/esposch/Qt/5.7/gcc_64/include/QtPrintSupport -I/home/esposch/Qt/5.7/gcc_64/include/QtWidgets -I/home/esposch/Qt/5.7/gcc_64/include/QtGui -I/home/esposch/Qt/5.7/gcc_64/include/QtCore -I/usr/include/c++/5 -I/usr/include/x86_64-linux-gnu/c++/5 -I/usr/include/c++/5/backward -I/usr/lib/gcc/x86_64-linux-gnu/5/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include espospinbox.h -o moc_espospinbox.cpp
|
||||
/home/esposch/Qt/5.7/gcc_64/bin/moc $(DEFINES) -I/home/esposch/Qt/5.7/gcc_64/mkspecs/linux-g++ -I'/home/esposch/git/Labrador/Desktop Interface' -I'/home/esposch/git/Labrador/Desktop Interface/build_linux' -I'/home/esposch/git/Labrador/Desktop Interface/build_linux/libusb' -I/home/esposch/Qt/5.7/gcc_64/include -I/home/esposch/Qt/5.7/gcc_64/include/QtPrintSupport -I/home/esposch/Qt/5.7/gcc_64/include/QtWidgets -I/home/esposch/Qt/5.7/gcc_64/include/QtGui -I/home/esposch/Qt/5.7/gcc_64/include/QtCore -I/usr/include/c++/5 -I/usr/include/x86_64-linux-gnu/c++/5 -I/usr/include/c++/5/backward -I/usr/lib/gcc/x86_64-linux-gnu/5/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include espospinbox.h -o moc_espospinbox.cpp
|
||||
|
||||
moc_espocombobox.cpp: ../../../Qt/5.7/gcc_64/include/QtWidgets/QWidget \
|
||||
../../../Qt/5.7/gcc_64/include/QtWidgets/qwidget.h \
|
||||
|
@ -2098,7 +2102,7 @@ moc_espocombobox.cpp: ../../../Qt/5.7/gcc_64/include/QtWidgets/QWidget \
|
|||
../../../Qt/5.7/gcc_64/include/QtCore/QFile \
|
||||
espocombobox.h \
|
||||
../../../Qt/5.7/gcc_64/bin/moc
|
||||
/home/esposch/Qt/5.7/gcc_64/bin/moc $(DEFINES) -I/home/esposch/Qt/5.7/gcc_64/mkspecs/linux-g++ -I'/home/esposch/git/Labrador/Desktop Interface' -I'/home/esposch/git/Labrador/Desktop Interface/build_linux' -I/home/esposch/Qt/5.7/gcc_64/include -I/home/esposch/Qt/5.7/gcc_64/include/QtPrintSupport -I/home/esposch/Qt/5.7/gcc_64/include/QtWidgets -I/home/esposch/Qt/5.7/gcc_64/include/QtGui -I/home/esposch/Qt/5.7/gcc_64/include/QtCore -I/usr/include/c++/5 -I/usr/include/x86_64-linux-gnu/c++/5 -I/usr/include/c++/5/backward -I/usr/lib/gcc/x86_64-linux-gnu/5/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include espocombobox.h -o moc_espocombobox.cpp
|
||||
/home/esposch/Qt/5.7/gcc_64/bin/moc $(DEFINES) -I/home/esposch/Qt/5.7/gcc_64/mkspecs/linux-g++ -I'/home/esposch/git/Labrador/Desktop Interface' -I'/home/esposch/git/Labrador/Desktop Interface/build_linux' -I'/home/esposch/git/Labrador/Desktop Interface/build_linux/libusb' -I/home/esposch/Qt/5.7/gcc_64/include -I/home/esposch/Qt/5.7/gcc_64/include/QtPrintSupport -I/home/esposch/Qt/5.7/gcc_64/include/QtWidgets -I/home/esposch/Qt/5.7/gcc_64/include/QtGui -I/home/esposch/Qt/5.7/gcc_64/include/QtCore -I/usr/include/c++/5 -I/usr/include/x86_64-linux-gnu/c++/5 -I/usr/include/c++/5/backward -I/usr/lib/gcc/x86_64-linux-gnu/5/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include espocombobox.h -o moc_espocombobox.cpp
|
||||
|
||||
moc_functiongencontrol.cpp: ../../../Qt/5.7/gcc_64/include/QtWidgets/QWidget \
|
||||
../../../Qt/5.7/gcc_64/include/QtWidgets/qwidget.h \
|
||||
|
@ -2208,7 +2212,7 @@ moc_functiongencontrol.cpp: ../../../Qt/5.7/gcc_64/include/QtWidgets/QWidget \
|
|||
xmega.h \
|
||||
functiongencontrol.h \
|
||||
../../../Qt/5.7/gcc_64/bin/moc
|
||||
/home/esposch/Qt/5.7/gcc_64/bin/moc $(DEFINES) -I/home/esposch/Qt/5.7/gcc_64/mkspecs/linux-g++ -I'/home/esposch/git/Labrador/Desktop Interface' -I'/home/esposch/git/Labrador/Desktop Interface/build_linux' -I/home/esposch/Qt/5.7/gcc_64/include -I/home/esposch/Qt/5.7/gcc_64/include/QtPrintSupport -I/home/esposch/Qt/5.7/gcc_64/include/QtWidgets -I/home/esposch/Qt/5.7/gcc_64/include/QtGui -I/home/esposch/Qt/5.7/gcc_64/include/QtCore -I/usr/include/c++/5 -I/usr/include/x86_64-linux-gnu/c++/5 -I/usr/include/c++/5/backward -I/usr/lib/gcc/x86_64-linux-gnu/5/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include functiongencontrol.h -o moc_functiongencontrol.cpp
|
||||
/home/esposch/Qt/5.7/gcc_64/bin/moc $(DEFINES) -I/home/esposch/Qt/5.7/gcc_64/mkspecs/linux-g++ -I'/home/esposch/git/Labrador/Desktop Interface' -I'/home/esposch/git/Labrador/Desktop Interface/build_linux' -I'/home/esposch/git/Labrador/Desktop Interface/build_linux/libusb' -I/home/esposch/Qt/5.7/gcc_64/include -I/home/esposch/Qt/5.7/gcc_64/include/QtPrintSupport -I/home/esposch/Qt/5.7/gcc_64/include/QtWidgets -I/home/esposch/Qt/5.7/gcc_64/include/QtGui -I/home/esposch/Qt/5.7/gcc_64/include/QtCore -I/usr/include/c++/5 -I/usr/include/x86_64-linux-gnu/c++/5 -I/usr/include/c++/5/backward -I/usr/lib/gcc/x86_64-linux-gnu/5/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include functiongencontrol.h -o moc_functiongencontrol.cpp
|
||||
|
||||
moc_isodriver.cpp: ../../../Qt/5.7/gcc_64/include/QtWidgets/QWidget \
|
||||
../../../Qt/5.7/gcc_64/include/QtWidgets/qwidget.h \
|
||||
|
@ -2693,7 +2697,7 @@ moc_isodriver.cpp: ../../../Qt/5.7/gcc_64/include/QtWidgets/QWidget \
|
|||
siprint.h \
|
||||
isodriver.h \
|
||||
../../../Qt/5.7/gcc_64/bin/moc
|
||||
/home/esposch/Qt/5.7/gcc_64/bin/moc $(DEFINES) -I/home/esposch/Qt/5.7/gcc_64/mkspecs/linux-g++ -I'/home/esposch/git/Labrador/Desktop Interface' -I'/home/esposch/git/Labrador/Desktop Interface/build_linux' -I/home/esposch/Qt/5.7/gcc_64/include -I/home/esposch/Qt/5.7/gcc_64/include/QtPrintSupport -I/home/esposch/Qt/5.7/gcc_64/include/QtWidgets -I/home/esposch/Qt/5.7/gcc_64/include/QtGui -I/home/esposch/Qt/5.7/gcc_64/include/QtCore -I/usr/include/c++/5 -I/usr/include/x86_64-linux-gnu/c++/5 -I/usr/include/c++/5/backward -I/usr/lib/gcc/x86_64-linux-gnu/5/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include isodriver.h -o moc_isodriver.cpp
|
||||
/home/esposch/Qt/5.7/gcc_64/bin/moc $(DEFINES) -I/home/esposch/Qt/5.7/gcc_64/mkspecs/linux-g++ -I'/home/esposch/git/Labrador/Desktop Interface' -I'/home/esposch/git/Labrador/Desktop Interface/build_linux' -I'/home/esposch/git/Labrador/Desktop Interface/build_linux/libusb' -I/home/esposch/Qt/5.7/gcc_64/include -I/home/esposch/Qt/5.7/gcc_64/include/QtPrintSupport -I/home/esposch/Qt/5.7/gcc_64/include/QtWidgets -I/home/esposch/Qt/5.7/gcc_64/include/QtGui -I/home/esposch/Qt/5.7/gcc_64/include/QtCore -I/usr/include/c++/5 -I/usr/include/x86_64-linux-gnu/c++/5 -I/usr/include/c++/5/backward -I/usr/lib/gcc/x86_64-linux-gnu/5/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include isodriver.h -o moc_isodriver.cpp
|
||||
|
||||
moc_noclosemenu.cpp: ../../../Qt/5.7/gcc_64/include/QtWidgets/QWidget \
|
||||
../../../Qt/5.7/gcc_64/include/QtWidgets/qwidget.h \
|
||||
|
@ -2799,7 +2803,7 @@ moc_noclosemenu.cpp: ../../../Qt/5.7/gcc_64/include/QtWidgets/QWidget \
|
|||
../../../Qt/5.7/gcc_64/include/QtWidgets/qactiongroup.h \
|
||||
noclosemenu.h \
|
||||
../../../Qt/5.7/gcc_64/bin/moc
|
||||
/home/esposch/Qt/5.7/gcc_64/bin/moc $(DEFINES) -I/home/esposch/Qt/5.7/gcc_64/mkspecs/linux-g++ -I'/home/esposch/git/Labrador/Desktop Interface' -I'/home/esposch/git/Labrador/Desktop Interface/build_linux' -I/home/esposch/Qt/5.7/gcc_64/include -I/home/esposch/Qt/5.7/gcc_64/include/QtPrintSupport -I/home/esposch/Qt/5.7/gcc_64/include/QtWidgets -I/home/esposch/Qt/5.7/gcc_64/include/QtGui -I/home/esposch/Qt/5.7/gcc_64/include/QtCore -I/usr/include/c++/5 -I/usr/include/x86_64-linux-gnu/c++/5 -I/usr/include/c++/5/backward -I/usr/lib/gcc/x86_64-linux-gnu/5/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include noclosemenu.h -o moc_noclosemenu.cpp
|
||||
/home/esposch/Qt/5.7/gcc_64/bin/moc $(DEFINES) -I/home/esposch/Qt/5.7/gcc_64/mkspecs/linux-g++ -I'/home/esposch/git/Labrador/Desktop Interface' -I'/home/esposch/git/Labrador/Desktop Interface/build_linux' -I'/home/esposch/git/Labrador/Desktop Interface/build_linux/libusb' -I/home/esposch/Qt/5.7/gcc_64/include -I/home/esposch/Qt/5.7/gcc_64/include/QtPrintSupport -I/home/esposch/Qt/5.7/gcc_64/include/QtWidgets -I/home/esposch/Qt/5.7/gcc_64/include/QtGui -I/home/esposch/Qt/5.7/gcc_64/include/QtCore -I/usr/include/c++/5 -I/usr/include/x86_64-linux-gnu/c++/5 -I/usr/include/c++/5/backward -I/usr/lib/gcc/x86_64-linux-gnu/5/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include noclosemenu.h -o moc_noclosemenu.cpp
|
||||
|
||||
moc_cursorenabler.cpp: ../../../Qt/5.7/gcc_64/include/QtWidgets/QWidget \
|
||||
../../../Qt/5.7/gcc_64/include/QtWidgets/qwidget.h \
|
||||
|
@ -2904,7 +2908,7 @@ moc_cursorenabler.cpp: ../../../Qt/5.7/gcc_64/include/QtWidgets/QWidget \
|
|||
../../../Qt/5.7/gcc_64/include/QtGui/QMouseEvent \
|
||||
cursorenabler.h \
|
||||
../../../Qt/5.7/gcc_64/bin/moc
|
||||
/home/esposch/Qt/5.7/gcc_64/bin/moc $(DEFINES) -I/home/esposch/Qt/5.7/gcc_64/mkspecs/linux-g++ -I'/home/esposch/git/Labrador/Desktop Interface' -I'/home/esposch/git/Labrador/Desktop Interface/build_linux' -I/home/esposch/Qt/5.7/gcc_64/include -I/home/esposch/Qt/5.7/gcc_64/include/QtPrintSupport -I/home/esposch/Qt/5.7/gcc_64/include/QtWidgets -I/home/esposch/Qt/5.7/gcc_64/include/QtGui -I/home/esposch/Qt/5.7/gcc_64/include/QtCore -I/usr/include/c++/5 -I/usr/include/x86_64-linux-gnu/c++/5 -I/usr/include/c++/5/backward -I/usr/lib/gcc/x86_64-linux-gnu/5/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include cursorenabler.h -o moc_cursorenabler.cpp
|
||||
/home/esposch/Qt/5.7/gcc_64/bin/moc $(DEFINES) -I/home/esposch/Qt/5.7/gcc_64/mkspecs/linux-g++ -I'/home/esposch/git/Labrador/Desktop Interface' -I'/home/esposch/git/Labrador/Desktop Interface/build_linux' -I'/home/esposch/git/Labrador/Desktop Interface/build_linux/libusb' -I/home/esposch/Qt/5.7/gcc_64/include -I/home/esposch/Qt/5.7/gcc_64/include/QtPrintSupport -I/home/esposch/Qt/5.7/gcc_64/include/QtWidgets -I/home/esposch/Qt/5.7/gcc_64/include/QtGui -I/home/esposch/Qt/5.7/gcc_64/include/QtCore -I/usr/include/c++/5 -I/usr/include/x86_64-linux-gnu/c++/5 -I/usr/include/c++/5/backward -I/usr/lib/gcc/x86_64-linux-gnu/5/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include cursorenabler.h -o moc_cursorenabler.cpp
|
||||
|
||||
moc_deviceconnecteddisplay.cpp: ../../../Qt/5.7/gcc_64/include/QtWidgets/QWidget \
|
||||
../../../Qt/5.7/gcc_64/include/QtWidgets/qwidget.h \
|
||||
|
@ -3009,7 +3013,7 @@ moc_deviceconnecteddisplay.cpp: ../../../Qt/5.7/gcc_64/include/QtWidgets/QWidget
|
|||
../../../Qt/5.7/gcc_64/include/QtCore/QDebug \
|
||||
deviceconnecteddisplay.h \
|
||||
../../../Qt/5.7/gcc_64/bin/moc
|
||||
/home/esposch/Qt/5.7/gcc_64/bin/moc $(DEFINES) -I/home/esposch/Qt/5.7/gcc_64/mkspecs/linux-g++ -I'/home/esposch/git/Labrador/Desktop Interface' -I'/home/esposch/git/Labrador/Desktop Interface/build_linux' -I/home/esposch/Qt/5.7/gcc_64/include -I/home/esposch/Qt/5.7/gcc_64/include/QtPrintSupport -I/home/esposch/Qt/5.7/gcc_64/include/QtWidgets -I/home/esposch/Qt/5.7/gcc_64/include/QtGui -I/home/esposch/Qt/5.7/gcc_64/include/QtCore -I/usr/include/c++/5 -I/usr/include/x86_64-linux-gnu/c++/5 -I/usr/include/c++/5/backward -I/usr/lib/gcc/x86_64-linux-gnu/5/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include deviceconnecteddisplay.h -o moc_deviceconnecteddisplay.cpp
|
||||
/home/esposch/Qt/5.7/gcc_64/bin/moc $(DEFINES) -I/home/esposch/Qt/5.7/gcc_64/mkspecs/linux-g++ -I'/home/esposch/git/Labrador/Desktop Interface' -I'/home/esposch/git/Labrador/Desktop Interface/build_linux' -I'/home/esposch/git/Labrador/Desktop Interface/build_linux/libusb' -I/home/esposch/Qt/5.7/gcc_64/include -I/home/esposch/Qt/5.7/gcc_64/include/QtPrintSupport -I/home/esposch/Qt/5.7/gcc_64/include/QtWidgets -I/home/esposch/Qt/5.7/gcc_64/include/QtGui -I/home/esposch/Qt/5.7/gcc_64/include/QtCore -I/usr/include/c++/5 -I/usr/include/x86_64-linux-gnu/c++/5 -I/usr/include/c++/5/backward -I/usr/lib/gcc/x86_64-linux-gnu/5/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include deviceconnecteddisplay.h -o moc_deviceconnecteddisplay.cpp
|
||||
|
||||
moc_timedtickbox.cpp: ../../../Qt/5.7/gcc_64/include/QtWidgets/QCheckBox \
|
||||
../../../Qt/5.7/gcc_64/include/QtWidgets/qcheckbox.h \
|
||||
|
@ -3117,7 +3121,7 @@ moc_timedtickbox.cpp: ../../../Qt/5.7/gcc_64/include/QtWidgets/QCheckBox \
|
|||
../../../Qt/5.7/gcc_64/include/QtCore/QDebug \
|
||||
timedtickbox.h \
|
||||
../../../Qt/5.7/gcc_64/bin/moc
|
||||
/home/esposch/Qt/5.7/gcc_64/bin/moc $(DEFINES) -I/home/esposch/Qt/5.7/gcc_64/mkspecs/linux-g++ -I'/home/esposch/git/Labrador/Desktop Interface' -I'/home/esposch/git/Labrador/Desktop Interface/build_linux' -I/home/esposch/Qt/5.7/gcc_64/include -I/home/esposch/Qt/5.7/gcc_64/include/QtPrintSupport -I/home/esposch/Qt/5.7/gcc_64/include/QtWidgets -I/home/esposch/Qt/5.7/gcc_64/include/QtGui -I/home/esposch/Qt/5.7/gcc_64/include/QtCore -I/usr/include/c++/5 -I/usr/include/x86_64-linux-gnu/c++/5 -I/usr/include/c++/5/backward -I/usr/lib/gcc/x86_64-linux-gnu/5/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include timedtickbox.h -o moc_timedtickbox.cpp
|
||||
/home/esposch/Qt/5.7/gcc_64/bin/moc $(DEFINES) -I/home/esposch/Qt/5.7/gcc_64/mkspecs/linux-g++ -I'/home/esposch/git/Labrador/Desktop Interface' -I'/home/esposch/git/Labrador/Desktop Interface/build_linux' -I'/home/esposch/git/Labrador/Desktop Interface/build_linux/libusb' -I/home/esposch/Qt/5.7/gcc_64/include -I/home/esposch/Qt/5.7/gcc_64/include/QtPrintSupport -I/home/esposch/Qt/5.7/gcc_64/include/QtWidgets -I/home/esposch/Qt/5.7/gcc_64/include/QtGui -I/home/esposch/Qt/5.7/gcc_64/include/QtCore -I/usr/include/c++/5 -I/usr/include/x86_64-linux-gnu/c++/5 -I/usr/include/c++/5/backward -I/usr/lib/gcc/x86_64-linux-gnu/5/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include timedtickbox.h -o moc_timedtickbox.cpp
|
||||
|
||||
moc_scoperangeenterdialog.cpp: ../../../Qt/5.7/gcc_64/include/QtWidgets/QDialog \
|
||||
../../../Qt/5.7/gcc_64/include/QtWidgets/qdialog.h \
|
||||
|
@ -3220,7 +3224,7 @@ moc_scoperangeenterdialog.cpp: ../../../Qt/5.7/gcc_64/include/QtWidgets/QDialog
|
|||
../../../Qt/5.7/gcc_64/include/QtCore/QDebug \
|
||||
scoperangeenterdialog.h \
|
||||
../../../Qt/5.7/gcc_64/bin/moc
|
||||
/home/esposch/Qt/5.7/gcc_64/bin/moc $(DEFINES) -I/home/esposch/Qt/5.7/gcc_64/mkspecs/linux-g++ -I'/home/esposch/git/Labrador/Desktop Interface' -I'/home/esposch/git/Labrador/Desktop Interface/build_linux' -I/home/esposch/Qt/5.7/gcc_64/include -I/home/esposch/Qt/5.7/gcc_64/include/QtPrintSupport -I/home/esposch/Qt/5.7/gcc_64/include/QtWidgets -I/home/esposch/Qt/5.7/gcc_64/include/QtGui -I/home/esposch/Qt/5.7/gcc_64/include/QtCore -I/usr/include/c++/5 -I/usr/include/x86_64-linux-gnu/c++/5 -I/usr/include/c++/5/backward -I/usr/lib/gcc/x86_64-linux-gnu/5/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include scoperangeenterdialog.h -o moc_scoperangeenterdialog.cpp
|
||||
/home/esposch/Qt/5.7/gcc_64/bin/moc $(DEFINES) -I/home/esposch/Qt/5.7/gcc_64/mkspecs/linux-g++ -I'/home/esposch/git/Labrador/Desktop Interface' -I'/home/esposch/git/Labrador/Desktop Interface/build_linux' -I'/home/esposch/git/Labrador/Desktop Interface/build_linux/libusb' -I/home/esposch/Qt/5.7/gcc_64/include -I/home/esposch/Qt/5.7/gcc_64/include/QtPrintSupport -I/home/esposch/Qt/5.7/gcc_64/include/QtWidgets -I/home/esposch/Qt/5.7/gcc_64/include/QtGui -I/home/esposch/Qt/5.7/gcc_64/include/QtCore -I/usr/include/c++/5 -I/usr/include/x86_64-linux-gnu/c++/5 -I/usr/include/c++/5/backward -I/usr/lib/gcc/x86_64-linux-gnu/5/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include scoperangeenterdialog.h -o moc_scoperangeenterdialog.cpp
|
||||
|
||||
moc_voltagespinbox.cpp: ../../../Qt/5.7/gcc_64/include/QtWidgets/QWidget \
|
||||
../../../Qt/5.7/gcc_64/include/QtWidgets/qwidget.h \
|
||||
|
@ -3326,7 +3330,7 @@ moc_voltagespinbox.cpp: ../../../Qt/5.7/gcc_64/include/QtWidgets/QWidget \
|
|||
../../../Qt/5.7/gcc_64/include/QtCore/qregularexpression.h \
|
||||
voltagespinbox.h \
|
||||
../../../Qt/5.7/gcc_64/bin/moc
|
||||
/home/esposch/Qt/5.7/gcc_64/bin/moc $(DEFINES) -I/home/esposch/Qt/5.7/gcc_64/mkspecs/linux-g++ -I'/home/esposch/git/Labrador/Desktop Interface' -I'/home/esposch/git/Labrador/Desktop Interface/build_linux' -I/home/esposch/Qt/5.7/gcc_64/include -I/home/esposch/Qt/5.7/gcc_64/include/QtPrintSupport -I/home/esposch/Qt/5.7/gcc_64/include/QtWidgets -I/home/esposch/Qt/5.7/gcc_64/include/QtGui -I/home/esposch/Qt/5.7/gcc_64/include/QtCore -I/usr/include/c++/5 -I/usr/include/x86_64-linux-gnu/c++/5 -I/usr/include/c++/5/backward -I/usr/lib/gcc/x86_64-linux-gnu/5/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include voltagespinbox.h -o moc_voltagespinbox.cpp
|
||||
/home/esposch/Qt/5.7/gcc_64/bin/moc $(DEFINES) -I/home/esposch/Qt/5.7/gcc_64/mkspecs/linux-g++ -I'/home/esposch/git/Labrador/Desktop Interface' -I'/home/esposch/git/Labrador/Desktop Interface/build_linux' -I'/home/esposch/git/Labrador/Desktop Interface/build_linux/libusb' -I/home/esposch/Qt/5.7/gcc_64/include -I/home/esposch/Qt/5.7/gcc_64/include/QtPrintSupport -I/home/esposch/Qt/5.7/gcc_64/include/QtWidgets -I/home/esposch/Qt/5.7/gcc_64/include/QtGui -I/home/esposch/Qt/5.7/gcc_64/include/QtCore -I/usr/include/c++/5 -I/usr/include/x86_64-linux-gnu/c++/5 -I/usr/include/c++/5/backward -I/usr/lib/gcc/x86_64-linux-gnu/5/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include voltagespinbox.h -o moc_voltagespinbox.cpp
|
||||
|
||||
moc_genericusbdriver.cpp: ../../../Qt/5.7/gcc_64/include/QtWidgets/QWidget \
|
||||
../../../Qt/5.7/gcc_64/include/QtWidgets/qwidget.h \
|
||||
|
@ -3444,7 +3448,7 @@ moc_genericusbdriver.cpp: ../../../Qt/5.7/gcc_64/include/QtWidgets/QWidget \
|
|||
buffercontrol.h \
|
||||
genericusbdriver.h \
|
||||
../../../Qt/5.7/gcc_64/bin/moc
|
||||
/home/esposch/Qt/5.7/gcc_64/bin/moc $(DEFINES) -I/home/esposch/Qt/5.7/gcc_64/mkspecs/linux-g++ -I'/home/esposch/git/Labrador/Desktop Interface' -I'/home/esposch/git/Labrador/Desktop Interface/build_linux' -I/home/esposch/Qt/5.7/gcc_64/include -I/home/esposch/Qt/5.7/gcc_64/include/QtPrintSupport -I/home/esposch/Qt/5.7/gcc_64/include/QtWidgets -I/home/esposch/Qt/5.7/gcc_64/include/QtGui -I/home/esposch/Qt/5.7/gcc_64/include/QtCore -I/usr/include/c++/5 -I/usr/include/x86_64-linux-gnu/c++/5 -I/usr/include/c++/5/backward -I/usr/lib/gcc/x86_64-linux-gnu/5/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include genericusbdriver.h -o moc_genericusbdriver.cpp
|
||||
/home/esposch/Qt/5.7/gcc_64/bin/moc $(DEFINES) -I/home/esposch/Qt/5.7/gcc_64/mkspecs/linux-g++ -I'/home/esposch/git/Labrador/Desktop Interface' -I'/home/esposch/git/Labrador/Desktop Interface/build_linux' -I'/home/esposch/git/Labrador/Desktop Interface/build_linux/libusb' -I/home/esposch/Qt/5.7/gcc_64/include -I/home/esposch/Qt/5.7/gcc_64/include/QtPrintSupport -I/home/esposch/Qt/5.7/gcc_64/include/QtWidgets -I/home/esposch/Qt/5.7/gcc_64/include/QtGui -I/home/esposch/Qt/5.7/gcc_64/include/QtCore -I/usr/include/c++/5 -I/usr/include/x86_64-linux-gnu/c++/5 -I/usr/include/c++/5/backward -I/usr/lib/gcc/x86_64-linux-gnu/5/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include genericusbdriver.h -o moc_genericusbdriver.cpp
|
||||
|
||||
moc_gahnooslashlinuxusbdriver.cpp: ../../../Qt/5.7/gcc_64/include/QtWidgets/QWidget \
|
||||
../../../Qt/5.7/gcc_64/include/QtWidgets/qwidget.h \
|
||||
|
@ -3543,9 +3547,27 @@ moc_gahnooslashlinuxusbdriver.cpp: ../../../Qt/5.7/gcc_64/include/QtWidgets/QWid
|
|||
../../../Qt/5.7/gcc_64/include/QtCore/qfiledevice.h \
|
||||
../../../Qt/5.7/gcc_64/include/QtGui/qvector2d.h \
|
||||
../../../Qt/5.7/gcc_64/include/QtGui/qtouchdevice.h \
|
||||
genericusbdriver.h \
|
||||
../../../Qt/5.7/gcc_64/include/QtWidgets/QLabel \
|
||||
../../../Qt/5.7/gcc_64/include/QtWidgets/qlabel.h \
|
||||
../../../Qt/5.7/gcc_64/include/QtWidgets/qframe.h \
|
||||
../../../Qt/5.7/gcc_64/include/QtCore/QDebug \
|
||||
../../../Qt/5.7/gcc_64/include/QtCore/QTimer \
|
||||
../../../Qt/5.7/gcc_64/include/QtCore/qtimer.h \
|
||||
../../../Qt/5.7/gcc_64/include/QtCore/qbasictimer.h \
|
||||
../../../Qt/5.7/gcc_64/include/QtCore/QThread \
|
||||
../../../Qt/5.7/gcc_64/include/QtCore/qthread.h \
|
||||
functiongencontrol.h \
|
||||
../../../Qt/5.7/gcc_64/include/QtCore/QDir \
|
||||
../../../Qt/5.7/gcc_64/include/QtCore/qdir.h \
|
||||
../../../Qt/5.7/gcc_64/include/QtCore/qfileinfo.h \
|
||||
../../../Qt/5.7/gcc_64/include/QtCore/QFile \
|
||||
xmega.h \
|
||||
desktop_settings.h \
|
||||
buffercontrol.h \
|
||||
gahnooslashlinuxusbdriver.h \
|
||||
../../../Qt/5.7/gcc_64/bin/moc
|
||||
/home/esposch/Qt/5.7/gcc_64/bin/moc $(DEFINES) -I/home/esposch/Qt/5.7/gcc_64/mkspecs/linux-g++ -I'/home/esposch/git/Labrador/Desktop Interface' -I'/home/esposch/git/Labrador/Desktop Interface/build_linux' -I/home/esposch/Qt/5.7/gcc_64/include -I/home/esposch/Qt/5.7/gcc_64/include/QtPrintSupport -I/home/esposch/Qt/5.7/gcc_64/include/QtWidgets -I/home/esposch/Qt/5.7/gcc_64/include/QtGui -I/home/esposch/Qt/5.7/gcc_64/include/QtCore -I/usr/include/c++/5 -I/usr/include/x86_64-linux-gnu/c++/5 -I/usr/include/c++/5/backward -I/usr/lib/gcc/x86_64-linux-gnu/5/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include gahnooslashlinuxusbdriver.h -o moc_gahnooslashlinuxusbdriver.cpp
|
||||
/home/esposch/Qt/5.7/gcc_64/bin/moc $(DEFINES) -I/home/esposch/Qt/5.7/gcc_64/mkspecs/linux-g++ -I'/home/esposch/git/Labrador/Desktop Interface' -I'/home/esposch/git/Labrador/Desktop Interface/build_linux' -I'/home/esposch/git/Labrador/Desktop Interface/build_linux/libusb' -I/home/esposch/Qt/5.7/gcc_64/include -I/home/esposch/Qt/5.7/gcc_64/include/QtPrintSupport -I/home/esposch/Qt/5.7/gcc_64/include/QtWidgets -I/home/esposch/Qt/5.7/gcc_64/include/QtGui -I/home/esposch/Qt/5.7/gcc_64/include/QtCore -I/usr/include/c++/5 -I/usr/include/x86_64-linux-gnu/c++/5 -I/usr/include/c++/5/backward -I/usr/lib/gcc/x86_64-linux-gnu/5/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include gahnooslashlinuxusbdriver.h -o moc_gahnooslashlinuxusbdriver.cpp
|
||||
|
||||
compiler_moc_source_make_all:
|
||||
compiler_moc_source_clean:
|
||||
|
@ -6064,15 +6086,19 @@ main.o: main.cpp mainwindow.h \
|
|||
../../../Qt/5.7/gcc_64/include/QtPrintSupport/qtprintsupportversion.h \
|
||||
build_linux/platformspecific.h \
|
||||
gahnooslashlinuxusbdriver.h \
|
||||
genericusbdriver.h \
|
||||
../../../Qt/5.7/gcc_64/include/QtWidgets/QLabel \
|
||||
../../../Qt/5.7/gcc_64/include/QtCore/QTimer \
|
||||
functiongencontrol.h \
|
||||
xmega.h \
|
||||
desktop_settings.h \
|
||||
buffercontrol.h \
|
||||
ui_mainwindow.h \
|
||||
scoperangeenterdialog.h \
|
||||
../../../Qt/5.7/gcc_64/include/QtWidgets/QDialog \
|
||||
isobuffer.h \
|
||||
../../../Qt/5.7/gcc_64/include/QtCore/QByteArray \
|
||||
../../../Qt/5.7/gcc_64/include/QtCore/QTimer \
|
||||
../../../Qt/5.7/gcc_64/include/QtWidgets/QPlainTextEdit \
|
||||
xmega.h \
|
||||
desktop_settings.h \
|
||||
../../../Qt/5.7/gcc_64/include/QtWidgets/QApplication
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp
|
||||
|
||||
|
@ -6560,15 +6586,19 @@ mainwindow.o: mainwindow.cpp mainwindow.h \
|
|||
../../../Qt/5.7/gcc_64/include/QtPrintSupport/qtprintsupportversion.h \
|
||||
build_linux/platformspecific.h \
|
||||
gahnooslashlinuxusbdriver.h \
|
||||
genericusbdriver.h \
|
||||
../../../Qt/5.7/gcc_64/include/QtWidgets/QLabel \
|
||||
../../../Qt/5.7/gcc_64/include/QtCore/QTimer \
|
||||
functiongencontrol.h \
|
||||
xmega.h \
|
||||
desktop_settings.h \
|
||||
buffercontrol.h \
|
||||
ui_mainwindow.h \
|
||||
scoperangeenterdialog.h \
|
||||
../../../Qt/5.7/gcc_64/include/QtWidgets/QDialog \
|
||||
isobuffer.h \
|
||||
../../../Qt/5.7/gcc_64/include/QtCore/QByteArray \
|
||||
../../../Qt/5.7/gcc_64/include/QtCore/QTimer \
|
||||
../../../Qt/5.7/gcc_64/include/QtWidgets/QPlainTextEdit \
|
||||
xmega.h \
|
||||
desktop_settings.h
|
||||
../../../Qt/5.7/gcc_64/include/QtWidgets/QPlainTextEdit
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o mainwindow.o mainwindow.cpp
|
||||
|
||||
qcustomplot.o: qcustomplot.cpp qcustomplot.h \
|
||||
|
@ -9480,7 +9510,25 @@ gahnooslashlinuxusbdriver.o: gahnooslashlinuxusbdriver.cpp gahnooslashlinuxusbdr
|
|||
../../../Qt/5.7/gcc_64/include/QtCore/qfile.h \
|
||||
../../../Qt/5.7/gcc_64/include/QtCore/qfiledevice.h \
|
||||
../../../Qt/5.7/gcc_64/include/QtGui/qvector2d.h \
|
||||
../../../Qt/5.7/gcc_64/include/QtGui/qtouchdevice.h
|
||||
../../../Qt/5.7/gcc_64/include/QtGui/qtouchdevice.h \
|
||||
genericusbdriver.h \
|
||||
../../../Qt/5.7/gcc_64/include/QtWidgets/QLabel \
|
||||
../../../Qt/5.7/gcc_64/include/QtWidgets/qlabel.h \
|
||||
../../../Qt/5.7/gcc_64/include/QtWidgets/qframe.h \
|
||||
../../../Qt/5.7/gcc_64/include/QtCore/QDebug \
|
||||
../../../Qt/5.7/gcc_64/include/QtCore/QTimer \
|
||||
../../../Qt/5.7/gcc_64/include/QtCore/qtimer.h \
|
||||
../../../Qt/5.7/gcc_64/include/QtCore/qbasictimer.h \
|
||||
../../../Qt/5.7/gcc_64/include/QtCore/QThread \
|
||||
../../../Qt/5.7/gcc_64/include/QtCore/qthread.h \
|
||||
functiongencontrol.h \
|
||||
../../../Qt/5.7/gcc_64/include/QtCore/QDir \
|
||||
../../../Qt/5.7/gcc_64/include/QtCore/qdir.h \
|
||||
../../../Qt/5.7/gcc_64/include/QtCore/qfileinfo.h \
|
||||
../../../Qt/5.7/gcc_64/include/QtCore/QFile \
|
||||
xmega.h \
|
||||
desktop_settings.h \
|
||||
buffercontrol.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o gahnooslashlinuxusbdriver.o gahnooslashlinuxusbdriver.cpp
|
||||
|
||||
qrc_resources.o: qrc_resources.cpp
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,222 @@
|
|||
libusb_1_0_la-core.lo: core.c /usr/include/stdc-predef.h ../config.h \
|
||||
/usr/include/errno.h /usr/include/features.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/cdefs.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/wordsize.h \
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs.h \
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \
|
||||
/usr/include/x86_64-linux-gnu/asm/errno.h \
|
||||
/usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h /usr/include/stdio.h \
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/types.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/typesizes.h /usr/include/libio.h \
|
||||
/usr/include/_G_config.h /usr/include/wchar.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/stdio_lim.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/sys_errlist.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/stdio.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/stdlib.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/waitflags.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/waitstatus.h /usr/include/endian.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/endian.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/byteswap.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/byteswap-16.h /usr/include/xlocale.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/types.h /usr/include/time.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/select.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/select.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/sigset.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/time.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/select2.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/sysmacros.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h /usr/include/alloca.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/stdlib.h /usr/include/string.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/string.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/string2.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/string3.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/time.h libusbi.h \
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5/include/stdint.h /usr/include/stdint.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/wchar.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/timex.h /usr/include/poll.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/poll.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/poll.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/poll2.h libusb.h \
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h \
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h \
|
||||
/usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/local_lim.h \
|
||||
/usr/include/linux/limits.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/posix2_lim.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/xopen_lim.h version.h \
|
||||
os/threads_posix.h /usr/include/pthread.h /usr/include/sched.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/sched.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/setjmp.h /usr/include/unistd.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/posix_opt.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/environments.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/confname.h /usr/include/getopt.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/unistd.h os/poll_posix.h
|
||||
|
||||
/usr/include/stdc-predef.h:
|
||||
|
||||
../config.h:
|
||||
|
||||
/usr/include/errno.h:
|
||||
|
||||
/usr/include/features.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/cdefs.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/wordsize.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/errno.h:
|
||||
|
||||
/usr/include/linux/errno.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/asm/errno.h:
|
||||
|
||||
/usr/include/asm-generic/errno.h:
|
||||
|
||||
/usr/include/asm-generic/errno-base.h:
|
||||
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h:
|
||||
|
||||
/usr/include/stdio.h:
|
||||
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/types.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/typesizes.h:
|
||||
|
||||
/usr/include/libio.h:
|
||||
|
||||
/usr/include/_G_config.h:
|
||||
|
||||
/usr/include/wchar.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/stdio_lim.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/sys_errlist.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/stdio.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/stdio2.h:
|
||||
|
||||
/usr/include/stdlib.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/waitflags.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/waitstatus.h:
|
||||
|
||||
/usr/include/endian.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/endian.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/byteswap.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/byteswap-16.h:
|
||||
|
||||
/usr/include/xlocale.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/types.h:
|
||||
|
||||
/usr/include/time.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/select.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/select.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/sigset.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/time.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/select2.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/sysmacros.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h:
|
||||
|
||||
/usr/include/alloca.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/stdlib.h:
|
||||
|
||||
/usr/include/string.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/string.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/string2.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/string3.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/time.h:
|
||||
|
||||
libusbi.h:
|
||||
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5/include/stdint.h:
|
||||
|
||||
/usr/include/stdint.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/wchar.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/timex.h:
|
||||
|
||||
/usr/include/poll.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/poll.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/poll.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/poll2.h:
|
||||
|
||||
libusb.h:
|
||||
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h:
|
||||
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h:
|
||||
|
||||
/usr/include/limits.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/posix1_lim.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/local_lim.h:
|
||||
|
||||
/usr/include/linux/limits.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/posix2_lim.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/xopen_lim.h:
|
||||
|
||||
version.h:
|
||||
|
||||
os/threads_posix.h:
|
||||
|
||||
/usr/include/pthread.h:
|
||||
|
||||
/usr/include/sched.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/sched.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/setjmp.h:
|
||||
|
||||
/usr/include/unistd.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/posix_opt.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/environments.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/confname.h:
|
||||
|
||||
/usr/include/getopt.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/unistd.h:
|
||||
|
||||
os/poll_posix.h:
|
|
@ -0,0 +1 @@
|
|||
# dummy
|
|
@ -0,0 +1,195 @@
|
|||
libusb_1_0_la-descriptor.lo: descriptor.c /usr/include/stdc-predef.h \
|
||||
/usr/include/errno.h /usr/include/features.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/cdefs.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/wordsize.h \
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs.h \
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \
|
||||
/usr/include/x86_64-linux-gnu/asm/errno.h \
|
||||
/usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5/include/stdint.h /usr/include/stdint.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/wchar.h /usr/include/stdlib.h \
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/waitflags.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/waitstatus.h /usr/include/endian.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/endian.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/byteswap.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/types.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/typesizes.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/byteswap-16.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/types.h /usr/include/time.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/select.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/select.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/sigset.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/time.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/select2.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/sysmacros.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h /usr/include/alloca.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/stdlib.h /usr/include/string.h \
|
||||
/usr/include/xlocale.h /usr/include/x86_64-linux-gnu/bits/string.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/string2.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/string3.h libusbi.h ../config.h \
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h /usr/include/poll.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/poll.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/poll.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/poll2.h libusb.h \
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h \
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h \
|
||||
/usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/local_lim.h \
|
||||
/usr/include/linux/limits.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/posix2_lim.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/time.h version.h os/threads_posix.h \
|
||||
/usr/include/pthread.h /usr/include/sched.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/sched.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/setjmp.h /usr/include/unistd.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/posix_opt.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/environments.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/confname.h /usr/include/getopt.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/unistd.h os/poll_posix.h
|
||||
|
||||
/usr/include/stdc-predef.h:
|
||||
|
||||
/usr/include/errno.h:
|
||||
|
||||
/usr/include/features.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/cdefs.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/wordsize.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/errno.h:
|
||||
|
||||
/usr/include/linux/errno.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/asm/errno.h:
|
||||
|
||||
/usr/include/asm-generic/errno.h:
|
||||
|
||||
/usr/include/asm-generic/errno-base.h:
|
||||
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5/include/stdint.h:
|
||||
|
||||
/usr/include/stdint.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/wchar.h:
|
||||
|
||||
/usr/include/stdlib.h:
|
||||
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/waitflags.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/waitstatus.h:
|
||||
|
||||
/usr/include/endian.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/endian.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/byteswap.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/types.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/typesizes.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/byteswap-16.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/types.h:
|
||||
|
||||
/usr/include/time.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/select.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/select.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/sigset.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/time.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/select2.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/sysmacros.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h:
|
||||
|
||||
/usr/include/alloca.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/stdlib.h:
|
||||
|
||||
/usr/include/string.h:
|
||||
|
||||
/usr/include/xlocale.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/string.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/string2.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/string3.h:
|
||||
|
||||
libusbi.h:
|
||||
|
||||
../config.h:
|
||||
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h:
|
||||
|
||||
/usr/include/poll.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/poll.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/poll.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/poll2.h:
|
||||
|
||||
libusb.h:
|
||||
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h:
|
||||
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h:
|
||||
|
||||
/usr/include/limits.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/posix1_lim.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/local_lim.h:
|
||||
|
||||
/usr/include/linux/limits.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/posix2_lim.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/time.h:
|
||||
|
||||
version.h:
|
||||
|
||||
os/threads_posix.h:
|
||||
|
||||
/usr/include/pthread.h:
|
||||
|
||||
/usr/include/sched.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/sched.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/setjmp.h:
|
||||
|
||||
/usr/include/unistd.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/posix_opt.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/environments.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/confname.h:
|
||||
|
||||
/usr/include/getopt.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/unistd.h:
|
||||
|
||||
os/poll_posix.h:
|
|
@ -0,0 +1,233 @@
|
|||
libusb_1_0_la-io.lo: io.c /usr/include/stdc-predef.h ../config.h \
|
||||
/usr/include/errno.h /usr/include/features.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/cdefs.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/wordsize.h \
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs.h \
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \
|
||||
/usr/include/x86_64-linux-gnu/asm/errno.h \
|
||||
/usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
|
||||
/usr/include/signal.h /usr/include/x86_64-linux-gnu/bits/sigset.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/types.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/typesizes.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/signum.h /usr/include/time.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/siginfo.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/sigaction.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/sigcontext.h \
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/sigstack.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/ucontext.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/sigthread.h \
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5/include/stdint.h /usr/include/stdint.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/wchar.h /usr/include/stdlib.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/waitflags.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/waitstatus.h /usr/include/endian.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/endian.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/byteswap.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/byteswap-16.h /usr/include/xlocale.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/types.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/select.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/select.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/time.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/select2.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/stdlib.h /usr/include/string.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/string.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/string2.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/string3.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/timex.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/time.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/timerfd.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/timerfd.h libusbi.h \
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h /usr/include/poll.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/poll.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/poll.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/poll2.h libusb.h \
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h \
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h \
|
||||
/usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/local_lim.h \
|
||||
/usr/include/linux/limits.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/posix2_lim.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/xopen_lim.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/stdio_lim.h version.h \
|
||||
os/threads_posix.h /usr/include/pthread.h /usr/include/sched.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/sched.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/setjmp.h /usr/include/unistd.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/posix_opt.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/environments.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/confname.h /usr/include/getopt.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/unistd.h os/poll_posix.h
|
||||
|
||||
/usr/include/stdc-predef.h:
|
||||
|
||||
../config.h:
|
||||
|
||||
/usr/include/errno.h:
|
||||
|
||||
/usr/include/features.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/cdefs.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/wordsize.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/errno.h:
|
||||
|
||||
/usr/include/linux/errno.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/asm/errno.h:
|
||||
|
||||
/usr/include/asm-generic/errno.h:
|
||||
|
||||
/usr/include/asm-generic/errno-base.h:
|
||||
|
||||
/usr/include/signal.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/sigset.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/types.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/typesizes.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/signum.h:
|
||||
|
||||
/usr/include/time.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/siginfo.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/sigaction.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/sigcontext.h:
|
||||
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/sigstack.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/ucontext.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/sigthread.h:
|
||||
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5/include/stdint.h:
|
||||
|
||||
/usr/include/stdint.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/wchar.h:
|
||||
|
||||
/usr/include/stdlib.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/waitflags.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/waitstatus.h:
|
||||
|
||||
/usr/include/endian.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/endian.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/byteswap.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/byteswap-16.h:
|
||||
|
||||
/usr/include/xlocale.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/types.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/select.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/select.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/time.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/select2.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/sysmacros.h:
|
||||
|
||||
/usr/include/alloca.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/stdlib.h:
|
||||
|
||||
/usr/include/string.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/string.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/string2.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/string3.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/timex.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/time.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/timerfd.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/timerfd.h:
|
||||
|
||||
libusbi.h:
|
||||
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h:
|
||||
|
||||
/usr/include/poll.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/poll.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/poll.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/poll2.h:
|
||||
|
||||
libusb.h:
|
||||
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h:
|
||||
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h:
|
||||
|
||||
/usr/include/limits.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/posix1_lim.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/local_lim.h:
|
||||
|
||||
/usr/include/linux/limits.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/posix2_lim.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/xopen_lim.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/stdio_lim.h:
|
||||
|
||||
version.h:
|
||||
|
||||
os/threads_posix.h:
|
||||
|
||||
/usr/include/pthread.h:
|
||||
|
||||
/usr/include/sched.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/sched.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/setjmp.h:
|
||||
|
||||
/usr/include/unistd.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/posix_opt.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/environments.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/confname.h:
|
||||
|
||||
/usr/include/getopt.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/unistd.h:
|
||||
|
||||
os/poll_posix.h:
|
|
@ -0,0 +1,284 @@
|
|||
libusb_1_0_la-linux_usbfs.lo: os/linux_usbfs.c /usr/include/stdc-predef.h \
|
||||
../config.h /usr/include/ctype.h /usr/include/features.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/cdefs.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/wordsize.h \
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs.h \
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/types.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/typesizes.h /usr/include/endian.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/endian.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/byteswap.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/byteswap-16.h /usr/include/xlocale.h \
|
||||
/usr/include/dirent.h /usr/include/x86_64-linux-gnu/bits/dirent.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/posix1_lim.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/local_lim.h \
|
||||
/usr/include/linux/limits.h \
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h /usr/include/errno.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \
|
||||
/usr/include/x86_64-linux-gnu/asm/errno.h \
|
||||
/usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
|
||||
/usr/include/fcntl.h /usr/include/x86_64-linux-gnu/bits/fcntl.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/uio.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/types.h /usr/include/time.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/select.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/select.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/sigset.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/time.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/select2.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/sysmacros.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/stat.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/fcntl2.h /usr/include/poll.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/poll.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/poll.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/poll2.h /usr/include/stdio.h \
|
||||
/usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/stdio_lim.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/sys_errlist.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/stdio.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/stdlib.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/waitflags.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/waitstatus.h /usr/include/alloca.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/stdlib.h /usr/include/string.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/string.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/string2.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/string3.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/ioctl.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/ioctls.h \
|
||||
/usr/include/x86_64-linux-gnu/asm/ioctls.h \
|
||||
/usr/include/asm-generic/ioctls.h /usr/include/linux/ioctl.h \
|
||||
/usr/include/x86_64-linux-gnu/asm/ioctl.h \
|
||||
/usr/include/asm-generic/ioctl.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/ioctl-types.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/ttydefaults.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/stat.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/utsname.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/utsname.h /usr/include/unistd.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/posix_opt.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/environments.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/confname.h /usr/include/getopt.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/unistd.h libusb.h \
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5/include/stdint.h /usr/include/stdint.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/wchar.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/timex.h \
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h \
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h \
|
||||
/usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix2_lim.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/xopen_lim.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/time.h libusbi.h version.h \
|
||||
os/threads_posix.h /usr/include/pthread.h /usr/include/sched.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/sched.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/setjmp.h os/poll_posix.h \
|
||||
os/linux_usbfs.h
|
||||
|
||||
/usr/include/stdc-predef.h:
|
||||
|
||||
../config.h:
|
||||
|
||||
/usr/include/ctype.h:
|
||||
|
||||
/usr/include/features.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/cdefs.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/wordsize.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/types.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/typesizes.h:
|
||||
|
||||
/usr/include/endian.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/endian.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/byteswap.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/byteswap-16.h:
|
||||
|
||||
/usr/include/xlocale.h:
|
||||
|
||||
/usr/include/dirent.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/dirent.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/posix1_lim.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/local_lim.h:
|
||||
|
||||
/usr/include/linux/limits.h:
|
||||
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h:
|
||||
|
||||
/usr/include/errno.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/errno.h:
|
||||
|
||||
/usr/include/linux/errno.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/asm/errno.h:
|
||||
|
||||
/usr/include/asm-generic/errno.h:
|
||||
|
||||
/usr/include/asm-generic/errno-base.h:
|
||||
|
||||
/usr/include/fcntl.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/fcntl.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/uio.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/types.h:
|
||||
|
||||
/usr/include/time.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/select.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/select.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/sigset.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/time.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/select2.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/sysmacros.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/stat.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/fcntl2.h:
|
||||
|
||||
/usr/include/poll.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/poll.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/poll.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/poll2.h:
|
||||
|
||||
/usr/include/stdio.h:
|
||||
|
||||
/usr/include/libio.h:
|
||||
|
||||
/usr/include/_G_config.h:
|
||||
|
||||
/usr/include/wchar.h:
|
||||
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/stdio_lim.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/sys_errlist.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/stdio.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/stdio2.h:
|
||||
|
||||
/usr/include/stdlib.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/waitflags.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/waitstatus.h:
|
||||
|
||||
/usr/include/alloca.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/stdlib.h:
|
||||
|
||||
/usr/include/string.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/string.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/string2.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/string3.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/ioctl.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/ioctls.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/asm/ioctls.h:
|
||||
|
||||
/usr/include/asm-generic/ioctls.h:
|
||||
|
||||
/usr/include/linux/ioctl.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/asm/ioctl.h:
|
||||
|
||||
/usr/include/asm-generic/ioctl.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/ioctl-types.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/ttydefaults.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/stat.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/utsname.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/utsname.h:
|
||||
|
||||
/usr/include/unistd.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/posix_opt.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/environments.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/confname.h:
|
||||
|
||||
/usr/include/getopt.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/unistd.h:
|
||||
|
||||
libusb.h:
|
||||
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5/include/stdint.h:
|
||||
|
||||
/usr/include/stdint.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/wchar.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/timex.h:
|
||||
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h:
|
||||
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h:
|
||||
|
||||
/usr/include/limits.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/posix2_lim.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/xopen_lim.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/time.h:
|
||||
|
||||
libusbi.h:
|
||||
|
||||
version.h:
|
||||
|
||||
os/threads_posix.h:
|
||||
|
||||
/usr/include/pthread.h:
|
||||
|
||||
/usr/include/sched.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/sched.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/setjmp.h:
|
||||
|
||||
os/poll_posix.h:
|
||||
|
||||
os/linux_usbfs.h:
|
|
@ -0,0 +1 @@
|
|||
# dummy
|
|
@ -0,0 +1 @@
|
|||
# dummy
|
|
@ -0,0 +1,204 @@
|
|||
libusb_1_0_la-sync.lo: sync.c /usr/include/stdc-predef.h ../config.h \
|
||||
/usr/include/errno.h /usr/include/features.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/cdefs.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/wordsize.h \
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs.h \
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \
|
||||
/usr/include/x86_64-linux-gnu/asm/errno.h \
|
||||
/usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5/include/stdint.h /usr/include/stdint.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/wchar.h /usr/include/stdlib.h \
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/waitflags.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/waitstatus.h /usr/include/endian.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/endian.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/byteswap.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/types.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/typesizes.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/byteswap-16.h /usr/include/xlocale.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/types.h /usr/include/time.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/select.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/select.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/sigset.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/time.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/select2.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/sysmacros.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h /usr/include/alloca.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/stdlib.h /usr/include/string.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/string.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/string2.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/string3.h libusbi.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/timex.h \
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h /usr/include/poll.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/poll.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/poll.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/poll2.h libusb.h \
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h \
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h \
|
||||
/usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/local_lim.h \
|
||||
/usr/include/linux/limits.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/posix2_lim.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/xopen_lim.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/stdio_lim.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/time.h version.h os/threads_posix.h \
|
||||
/usr/include/pthread.h /usr/include/sched.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/sched.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/setjmp.h /usr/include/unistd.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/posix_opt.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/environments.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/confname.h /usr/include/getopt.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/unistd.h os/poll_posix.h
|
||||
|
||||
/usr/include/stdc-predef.h:
|
||||
|
||||
../config.h:
|
||||
|
||||
/usr/include/errno.h:
|
||||
|
||||
/usr/include/features.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/cdefs.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/wordsize.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/errno.h:
|
||||
|
||||
/usr/include/linux/errno.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/asm/errno.h:
|
||||
|
||||
/usr/include/asm-generic/errno.h:
|
||||
|
||||
/usr/include/asm-generic/errno-base.h:
|
||||
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5/include/stdint.h:
|
||||
|
||||
/usr/include/stdint.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/wchar.h:
|
||||
|
||||
/usr/include/stdlib.h:
|
||||
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/waitflags.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/waitstatus.h:
|
||||
|
||||
/usr/include/endian.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/endian.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/byteswap.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/types.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/typesizes.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/byteswap-16.h:
|
||||
|
||||
/usr/include/xlocale.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/types.h:
|
||||
|
||||
/usr/include/time.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/select.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/select.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/sigset.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/time.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/select2.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/sysmacros.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h:
|
||||
|
||||
/usr/include/alloca.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/stdlib.h:
|
||||
|
||||
/usr/include/string.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/string.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/string2.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/string3.h:
|
||||
|
||||
libusbi.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/timex.h:
|
||||
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h:
|
||||
|
||||
/usr/include/poll.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/poll.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/poll.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/poll2.h:
|
||||
|
||||
libusb.h:
|
||||
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h:
|
||||
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h:
|
||||
|
||||
/usr/include/limits.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/posix1_lim.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/local_lim.h:
|
||||
|
||||
/usr/include/linux/limits.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/posix2_lim.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/xopen_lim.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/stdio_lim.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/time.h:
|
||||
|
||||
version.h:
|
||||
|
||||
os/threads_posix.h:
|
||||
|
||||
/usr/include/pthread.h:
|
||||
|
||||
/usr/include/sched.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/sched.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/setjmp.h:
|
||||
|
||||
/usr/include/unistd.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/posix_opt.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/environments.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/confname.h:
|
||||
|
||||
/usr/include/getopt.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/unistd.h:
|
||||
|
||||
os/poll_posix.h:
|
|
@ -0,0 +1,52 @@
|
|||
libusb_1_0_la-threads_posix.lo: os/threads_posix.c \
|
||||
/usr/include/stdc-predef.h os/threads_posix.h /usr/include/pthread.h \
|
||||
/usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/wordsize.h \
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs.h \
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h /usr/include/endian.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/endian.h /usr/include/sched.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/types.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/typesizes.h \
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h /usr/include/time.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/time.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/sched.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/setjmp.h
|
||||
|
||||
/usr/include/stdc-predef.h:
|
||||
|
||||
os/threads_posix.h:
|
||||
|
||||
/usr/include/pthread.h:
|
||||
|
||||
/usr/include/features.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/cdefs.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/wordsize.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h:
|
||||
|
||||
/usr/include/endian.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/endian.h:
|
||||
|
||||
/usr/include/sched.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/types.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/typesizes.h:
|
||||
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h:
|
||||
|
||||
/usr/include/time.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/time.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/sched.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/setjmp.h:
|
|
@ -0,0 +1 @@
|
|||
# dummy
|
|
@ -0,0 +1 @@
|
|||
# dummy
|
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
../libusb-1.0.la
|
|
@ -0,0 +1,41 @@
|
|||
# libusb-1.0.la - a libtool library file
|
||||
# Generated by libtool (GNU libtool) 2.2.10
|
||||
#
|
||||
# Please DO NOT delete this file!
|
||||
# It is necessary for linking the library.
|
||||
|
||||
# The name that we can dlopen(3).
|
||||
dlname='libusb-1.0.so.0'
|
||||
|
||||
# Names of this library.
|
||||
library_names='libusb-1.0.so.0.1.0 libusb-1.0.so.0 libusb-1.0.so'
|
||||
|
||||
# The name of the static archive.
|
||||
old_library='libusb-1.0.a'
|
||||
|
||||
# Linker flags that can not go in dependency_libs.
|
||||
inherited_linker_flags=' -pthread'
|
||||
|
||||
# Libraries that this one depends upon.
|
||||
dependency_libs=' -lrt'
|
||||
|
||||
# Names of additional weak libraries provided by this library
|
||||
weak_library_names=''
|
||||
|
||||
# Version information for libusb-1.0.
|
||||
current=1
|
||||
age=1
|
||||
revision=0
|
||||
|
||||
# Is this an already installed library?
|
||||
installed=yes
|
||||
|
||||
# Should we warn about portability when linking against -modules?
|
||||
shouldnotlink=no
|
||||
|
||||
# Files to dlopen/dlpreopen
|
||||
dlopen=''
|
||||
dlpreopen=''
|
||||
|
||||
# Directory that this library needs to be installed in:
|
||||
libdir='/usr/local/lib'
|
|
@ -0,0 +1 @@
|
|||
libusb-1.0.so.0.1.0
|
|
@ -0,0 +1 @@
|
|||
libusb-1.0.so.0.1.0
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,718 @@
|
|||
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
||||
# libusb/Makefile. Generated from Makefile.in by configure.
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
pkgdatadir = $(datadir)/libusb
|
||||
pkgincludedir = $(includedir)/libusb
|
||||
pkglibdir = $(libdir)/libusb
|
||||
pkglibexecdir = $(libexecdir)/libusb
|
||||
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 = x86_64-unknown-linux-gnu
|
||||
host_triplet = x86_64-unknown-linux-gnu
|
||||
subdir = libusb
|
||||
DIST_COMMON = $(hdr_HEADERS) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/libusb/version.h \
|
||||
$(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 =
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||
am__install_max = 40
|
||||
am__nobase_strip_setup = \
|
||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||
am__nobase_strip = \
|
||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||
am__nobase_list = $(am__nobase_strip_setup); \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||
if (++n[$$2] == $(am__install_max)) \
|
||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||
END { for (dir in files) print dir, files[dir] }'
|
||||
am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(hdrdir)"
|
||||
LTLIBRARIES = $(lib_LTLIBRARIES)
|
||||
libusb_1_0_la_LIBADD =
|
||||
am__libusb_1_0_la_SOURCES_DIST = libusbi.h core.c descriptor.c io.c \
|
||||
sync.c os/darwin_usb.c os/linux_usbfs.c os/openbsd_usb.c \
|
||||
os/poll_windows.c os/windows_usb.c libusb-1.0.rc \
|
||||
libusb-1.0.def os/linux_usbfs.h os/darwin_usb.h \
|
||||
os/windows_usb.h os/threads_windows.h os/threads_windows.c \
|
||||
os/threads_posix.h os/threads_posix.c os/poll_posix.h \
|
||||
os/poll_windows.h
|
||||
am__objects_1 = libusb_1_0_la-darwin_usb.lo
|
||||
am__objects_2 = libusb_1_0_la-linux_usbfs.lo
|
||||
am__objects_3 = libusb_1_0_la-openbsd_usb.lo
|
||||
am__objects_4 = libusb_1_0_la-poll_windows.lo \
|
||||
libusb_1_0_la-windows_usb.lo libusb-1.0.lo
|
||||
##am__objects_5 = $(am__objects_4)
|
||||
##am__objects_5 = $(am__objects_3)
|
||||
am__objects_5 = $(am__objects_2)
|
||||
#am__objects_5 = $(am__objects_1)
|
||||
#am__objects_6 = libusb_1_0_la-threads_windows.lo
|
||||
am__objects_6 = libusb_1_0_la-threads_posix.lo
|
||||
am_libusb_1_0_la_OBJECTS = libusb_1_0_la-core.lo \
|
||||
libusb_1_0_la-descriptor.lo libusb_1_0_la-io.lo \
|
||||
libusb_1_0_la-sync.lo $(am__objects_5) $(am__objects_6)
|
||||
libusb_1_0_la_OBJECTS = $(am_libusb_1_0_la_OBJECTS)
|
||||
AM_V_lt = $(am__v_lt_$(V))
|
||||
am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
|
||||
am__v_lt_0 = --silent
|
||||
libusb_1_0_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(libusb_1_0_la_CFLAGS) \
|
||||
$(CFLAGS) $(libusb_1_0_la_LDFLAGS) $(LDFLAGS) -o $@
|
||||
DEFAULT_INCLUDES = -I. -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/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_$(V))
|
||||
am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
|
||||
am__v_CC_0 = @echo " CC " $@;
|
||||
AM_V_at = $(am__v_at_$(V))
|
||||
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
|
||||
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_$(V))
|
||||
am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
|
||||
am__v_CCLD_0 = @echo " CCLD " $@;
|
||||
AM_V_GEN = $(am__v_GEN_$(V))
|
||||
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
SOURCES = $(libusb_1_0_la_SOURCES)
|
||||
DIST_SOURCES = $(am__libusb_1_0_la_SOURCES_DIST)
|
||||
HEADERS = $(hdr_HEADERS)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = ${SHELL} /home/esposch/Downloads/libusb-1.0.9/missing --run aclocal-1.11
|
||||
AMTAR = ${SHELL} /home/esposch/Downloads/libusb-1.0.9/missing --run tar
|
||||
AM_CFLAGS = -std=gnu99 -Wall -Wundef -Wunused -Wstrict-prototypes -Werror-implicit-function-declaration -Wno-pointer-sign -Wshadow
|
||||
AM_DEFAULT_VERBOSITY = 0
|
||||
AR = ar
|
||||
AUTOCONF = ${SHELL} /home/esposch/Downloads/libusb-1.0.9/missing --run autoconf
|
||||
AUTOHEADER = ${SHELL} /home/esposch/Downloads/libusb-1.0.9/missing --run autoheader
|
||||
AUTOMAKE = ${SHELL} /home/esposch/Downloads/libusb-1.0.9/missing --run automake-1.11
|
||||
AWK = mawk
|
||||
CC = gcc
|
||||
CCDEPMODE = depmode=gcc3
|
||||
CFLAGS = -g -O2
|
||||
CPP = gcc -E
|
||||
CPPFLAGS =
|
||||
CYGPATH_W = echo
|
||||
DEFS = -DHAVE_CONFIG_H
|
||||
DEPDIR = .deps
|
||||
DSYMUTIL =
|
||||
DUMPBIN =
|
||||
ECHO_C =
|
||||
ECHO_N = -n
|
||||
ECHO_T =
|
||||
EGREP = /bin/grep -E
|
||||
EXEEXT =
|
||||
FGREP = /bin/grep -F
|
||||
GREP = /bin/grep
|
||||
INSTALL = /usr/bin/install -c
|
||||
INSTALL_DATA = ${INSTALL} -m 644
|
||||
INSTALL_PROGRAM = ${INSTALL}
|
||||
INSTALL_SCRIPT = ${INSTALL}
|
||||
INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
|
||||
LD = /usr/bin/ld -m elf_x86_64
|
||||
LDFLAGS =
|
||||
LIBOBJS =
|
||||
LIBS = -lrt -pthread
|
||||
LIBTOOL = $(SHELL) $(top_builddir)/libtool
|
||||
LIPO =
|
||||
LN_S = ln -s
|
||||
LTLDFLAGS = -version-info 1:0:1 -no-undefined
|
||||
LTLIBOBJS =
|
||||
MAINT = #
|
||||
MAKEINFO = ${SHELL} /home/esposch/Downloads/libusb-1.0.9/missing --run makeinfo
|
||||
MKDIR_P = /bin/mkdir -p
|
||||
NM = /usr/bin/nm -B
|
||||
NMEDIT =
|
||||
OBJDUMP = objdump
|
||||
OBJEXT = o
|
||||
OS_DARWIN =
|
||||
OS_LINUX =
|
||||
OS_OPENBSD =
|
||||
OS_WINDOWS =
|
||||
OTOOL =
|
||||
OTOOL64 =
|
||||
PACKAGE = libusb
|
||||
PACKAGE_BUGREPORT = libusb-devel@lists.sourceforge.net
|
||||
PACKAGE_NAME = libusb
|
||||
PACKAGE_STRING = libusb 1.0.9
|
||||
PACKAGE_TARNAME = libusb
|
||||
PACKAGE_URL = http://www.libusb.org/
|
||||
PACKAGE_VERSION = 1.0.9
|
||||
PATH_SEPARATOR = :
|
||||
PC_LIBS_PRIVATE = -lrt -pthread
|
||||
RANLIB = ranlib
|
||||
RC =
|
||||
SED = /bin/sed
|
||||
SET_MAKE =
|
||||
SHELL = /bin/bash
|
||||
STRIP = strip
|
||||
THREAD_CFLAGS = -pthread
|
||||
VERSION = 1.0.9
|
||||
VISIBILITY_CFLAGS = -fvisibility=hidden
|
||||
abs_builddir = /home/esposch/Downloads/libusb-1.0.9/libusb
|
||||
abs_srcdir = /home/esposch/Downloads/libusb-1.0.9/libusb
|
||||
abs_top_builddir = /home/esposch/Downloads/libusb-1.0.9
|
||||
abs_top_srcdir = /home/esposch/Downloads/libusb-1.0.9
|
||||
ac_ct_CC = gcc
|
||||
ac_ct_DUMPBIN =
|
||||
am__include = include
|
||||
am__leading_dot = .
|
||||
am__quote =
|
||||
am__tar = ${AMTAR} chof - "$$tardir"
|
||||
am__untar = ${AMTAR} xf -
|
||||
bindir = ${exec_prefix}/bin
|
||||
build = x86_64-unknown-linux-gnu
|
||||
build_alias =
|
||||
build_cpu = x86_64
|
||||
build_os = linux-gnu
|
||||
build_vendor = unknown
|
||||
builddir = .
|
||||
datadir = ${datarootdir}
|
||||
datarootdir = ${prefix}/share
|
||||
docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
|
||||
dvidir = ${docdir}
|
||||
exec_prefix = ${prefix}
|
||||
host = x86_64-unknown-linux-gnu
|
||||
host_alias =
|
||||
host_cpu = x86_64
|
||||
host_os = linux-gnu
|
||||
host_vendor = unknown
|
||||
htmldir = ${docdir}
|
||||
includedir = ${prefix}/include
|
||||
infodir = ${datarootdir}/info
|
||||
install_sh = ${SHELL} /home/esposch/Downloads/libusb-1.0.9/install-sh
|
||||
libdir = ${exec_prefix}/lib
|
||||
libexecdir = ${exec_prefix}/libexec
|
||||
localedir = ${datarootdir}/locale
|
||||
localstatedir = ${prefix}/var
|
||||
mandir = ${datarootdir}/man
|
||||
mkdir_p = /bin/mkdir -p
|
||||
oldincludedir = /usr/include
|
||||
pdfdir = ${docdir}
|
||||
prefix = /usr/local
|
||||
program_transform_name = s,x,x,
|
||||
psdir = ${docdir}
|
||||
sbindir = ${exec_prefix}/sbin
|
||||
sharedstatedir = ${prefix}/com
|
||||
srcdir = .
|
||||
sysconfdir = ${prefix}/etc
|
||||
target_alias =
|
||||
top_build_prefix = ../
|
||||
top_builddir = ..
|
||||
top_srcdir = ..
|
||||
lib_LTLIBRARIES = libusb-1.0.la
|
||||
LINUX_USBFS_SRC = os/linux_usbfs.c
|
||||
DARWIN_USB_SRC = os/darwin_usb.c
|
||||
OPENBSD_USB_SRC = os/openbsd_usb.c
|
||||
WINDOWS_USB_SRC = os/poll_windows.c os/windows_usb.c libusb-1.0.rc \
|
||||
libusb-1.0.def
|
||||
|
||||
EXTRA_DIST = $(LINUX_USBFS_SRC) $(DARWIN_USB_SRC) $(OPENBSD_USB_SRC) \
|
||||
$(WINDOWS_USB_SRC) os/threads_posix.c os/threads_windows.c
|
||||
|
||||
#OS_SRC = $(DARWIN_USB_SRC)
|
||||
OS_SRC = $(LINUX_USBFS_SRC)
|
||||
#OS_SRC = $(OPENBSD_USB_SRC)
|
||||
#OS_SRC = $(WINDOWS_USB_SRC)
|
||||
#AM_CFLAGS_EXT = -no-cpp-precomp
|
||||
#THREADS_SRC = os/threads_windows.h os/threads_windows.c
|
||||
THREADS_SRC = os/threads_posix.h os/threads_posix.c
|
||||
libusb_1_0_la_CFLAGS = $(VISIBILITY_CFLAGS) $(AM_CFLAGS) $(THREAD_CFLAGS) \
|
||||
-DLIBUSB_DESCRIBE=\"`git --git-dir "$(top_srcdir)/.git" describe --tags 2>/dev/null`\"
|
||||
|
||||
libusb_1_0_la_LDFLAGS = $(LTLDFLAGS)
|
||||
libusb_1_0_la_SOURCES = libusbi.h core.c descriptor.c io.c sync.c $(OS_SRC) \
|
||||
os/linux_usbfs.h os/darwin_usb.h os/windows_usb.h \
|
||||
$(THREADS_SRC) \
|
||||
os/poll_posix.h os/poll_windows.h
|
||||
|
||||
hdrdir = $(includedir)/libusb-1.0
|
||||
hdr_HEADERS = libusb.h
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .obj .rc
|
||||
$(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 libusb/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu libusb/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):
|
||||
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
|
||||
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
|
||||
list2=; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
list2="$$list2 $$p"; \
|
||||
else :; fi; \
|
||||
done; \
|
||||
test -z "$$list2" || { \
|
||||
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
|
||||
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
|
||||
}
|
||||
|
||||
uninstall-libLTLIBRARIES:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
|
||||
for p in $$list; do \
|
||||
$(am__strip_dir) \
|
||||
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
|
||||
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
|
||||
done
|
||||
|
||||
clean-libLTLIBRARIES:
|
||||
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
|
||||
@list='$(lib_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
|
||||
libusb-1.0.la: $(libusb_1_0_la_OBJECTS) $(libusb_1_0_la_DEPENDENCIES)
|
||||
$(AM_V_CCLD)$(libusb_1_0_la_LINK) -rpath $(libdir) $(libusb_1_0_la_OBJECTS) $(libusb_1_0_la_LIBADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
include ./$(DEPDIR)/libusb_1_0_la-core.Plo
|
||||
include ./$(DEPDIR)/libusb_1_0_la-darwin_usb.Plo
|
||||
include ./$(DEPDIR)/libusb_1_0_la-descriptor.Plo
|
||||
include ./$(DEPDIR)/libusb_1_0_la-io.Plo
|
||||
include ./$(DEPDIR)/libusb_1_0_la-linux_usbfs.Plo
|
||||
include ./$(DEPDIR)/libusb_1_0_la-openbsd_usb.Plo
|
||||
include ./$(DEPDIR)/libusb_1_0_la-poll_windows.Plo
|
||||
include ./$(DEPDIR)/libusb_1_0_la-sync.Plo
|
||||
include ./$(DEPDIR)/libusb_1_0_la-threads_posix.Plo
|
||||
include ./$(DEPDIR)/libusb_1_0_la-threads_windows.Plo
|
||||
include ./$(DEPDIR)/libusb_1_0_la-windows_usb.Plo
|
||||
|
||||
.c.o:
|
||||
$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
# $(AM_V_CC) \
|
||||
# source='$<' object='$@' libtool=no \
|
||||
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
|
||||
# $(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
# $(AM_V_CC) \
|
||||
# source='$<' object='$@' libtool=no \
|
||||
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
|
||||
# $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
$(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
||||
# $(AM_V_CC) \
|
||||
# source='$<' object='$@' libtool=yes \
|
||||
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
|
||||
# $(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
libusb_1_0_la-core.lo: core.c
|
||||
$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -MT libusb_1_0_la-core.lo -MD -MP -MF $(DEPDIR)/libusb_1_0_la-core.Tpo -c -o libusb_1_0_la-core.lo `test -f 'core.c' || echo '$(srcdir)/'`core.c
|
||||
$(AM_V_at)$(am__mv) $(DEPDIR)/libusb_1_0_la-core.Tpo $(DEPDIR)/libusb_1_0_la-core.Plo
|
||||
# $(AM_V_CC) \
|
||||
# source='core.c' object='libusb_1_0_la-core.lo' libtool=yes \
|
||||
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
|
||||
# $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -c -o libusb_1_0_la-core.lo `test -f 'core.c' || echo '$(srcdir)/'`core.c
|
||||
|
||||
libusb_1_0_la-descriptor.lo: descriptor.c
|
||||
$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -MT libusb_1_0_la-descriptor.lo -MD -MP -MF $(DEPDIR)/libusb_1_0_la-descriptor.Tpo -c -o libusb_1_0_la-descriptor.lo `test -f 'descriptor.c' || echo '$(srcdir)/'`descriptor.c
|
||||
$(AM_V_at)$(am__mv) $(DEPDIR)/libusb_1_0_la-descriptor.Tpo $(DEPDIR)/libusb_1_0_la-descriptor.Plo
|
||||
# $(AM_V_CC) \
|
||||
# source='descriptor.c' object='libusb_1_0_la-descriptor.lo' libtool=yes \
|
||||
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
|
||||
# $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -c -o libusb_1_0_la-descriptor.lo `test -f 'descriptor.c' || echo '$(srcdir)/'`descriptor.c
|
||||
|
||||
libusb_1_0_la-io.lo: io.c
|
||||
$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -MT libusb_1_0_la-io.lo -MD -MP -MF $(DEPDIR)/libusb_1_0_la-io.Tpo -c -o libusb_1_0_la-io.lo `test -f 'io.c' || echo '$(srcdir)/'`io.c
|
||||
$(AM_V_at)$(am__mv) $(DEPDIR)/libusb_1_0_la-io.Tpo $(DEPDIR)/libusb_1_0_la-io.Plo
|
||||
# $(AM_V_CC) \
|
||||
# source='io.c' object='libusb_1_0_la-io.lo' libtool=yes \
|
||||
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
|
||||
# $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -c -o libusb_1_0_la-io.lo `test -f 'io.c' || echo '$(srcdir)/'`io.c
|
||||
|
||||
libusb_1_0_la-sync.lo: sync.c
|
||||
$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -MT libusb_1_0_la-sync.lo -MD -MP -MF $(DEPDIR)/libusb_1_0_la-sync.Tpo -c -o libusb_1_0_la-sync.lo `test -f 'sync.c' || echo '$(srcdir)/'`sync.c
|
||||
$(AM_V_at)$(am__mv) $(DEPDIR)/libusb_1_0_la-sync.Tpo $(DEPDIR)/libusb_1_0_la-sync.Plo
|
||||
# $(AM_V_CC) \
|
||||
# source='sync.c' object='libusb_1_0_la-sync.lo' libtool=yes \
|
||||
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
|
||||
# $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -c -o libusb_1_0_la-sync.lo `test -f 'sync.c' || echo '$(srcdir)/'`sync.c
|
||||
|
||||
libusb_1_0_la-darwin_usb.lo: os/darwin_usb.c
|
||||
$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -MT libusb_1_0_la-darwin_usb.lo -MD -MP -MF $(DEPDIR)/libusb_1_0_la-darwin_usb.Tpo -c -o libusb_1_0_la-darwin_usb.lo `test -f 'os/darwin_usb.c' || echo '$(srcdir)/'`os/darwin_usb.c
|
||||
$(AM_V_at)$(am__mv) $(DEPDIR)/libusb_1_0_la-darwin_usb.Tpo $(DEPDIR)/libusb_1_0_la-darwin_usb.Plo
|
||||
# $(AM_V_CC) \
|
||||
# source='os/darwin_usb.c' object='libusb_1_0_la-darwin_usb.lo' libtool=yes \
|
||||
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
|
||||
# $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -c -o libusb_1_0_la-darwin_usb.lo `test -f 'os/darwin_usb.c' || echo '$(srcdir)/'`os/darwin_usb.c
|
||||
|
||||
libusb_1_0_la-linux_usbfs.lo: os/linux_usbfs.c
|
||||
$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -MT libusb_1_0_la-linux_usbfs.lo -MD -MP -MF $(DEPDIR)/libusb_1_0_la-linux_usbfs.Tpo -c -o libusb_1_0_la-linux_usbfs.lo `test -f 'os/linux_usbfs.c' || echo '$(srcdir)/'`os/linux_usbfs.c
|
||||
$(AM_V_at)$(am__mv) $(DEPDIR)/libusb_1_0_la-linux_usbfs.Tpo $(DEPDIR)/libusb_1_0_la-linux_usbfs.Plo
|
||||
# $(AM_V_CC) \
|
||||
# source='os/linux_usbfs.c' object='libusb_1_0_la-linux_usbfs.lo' libtool=yes \
|
||||
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
|
||||
# $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -c -o libusb_1_0_la-linux_usbfs.lo `test -f 'os/linux_usbfs.c' || echo '$(srcdir)/'`os/linux_usbfs.c
|
||||
|
||||
libusb_1_0_la-openbsd_usb.lo: os/openbsd_usb.c
|
||||
$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -MT libusb_1_0_la-openbsd_usb.lo -MD -MP -MF $(DEPDIR)/libusb_1_0_la-openbsd_usb.Tpo -c -o libusb_1_0_la-openbsd_usb.lo `test -f 'os/openbsd_usb.c' || echo '$(srcdir)/'`os/openbsd_usb.c
|
||||
$(AM_V_at)$(am__mv) $(DEPDIR)/libusb_1_0_la-openbsd_usb.Tpo $(DEPDIR)/libusb_1_0_la-openbsd_usb.Plo
|
||||
# $(AM_V_CC) \
|
||||
# source='os/openbsd_usb.c' object='libusb_1_0_la-openbsd_usb.lo' libtool=yes \
|
||||
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
|
||||
# $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -c -o libusb_1_0_la-openbsd_usb.lo `test -f 'os/openbsd_usb.c' || echo '$(srcdir)/'`os/openbsd_usb.c
|
||||
|
||||
libusb_1_0_la-poll_windows.lo: os/poll_windows.c
|
||||
$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -MT libusb_1_0_la-poll_windows.lo -MD -MP -MF $(DEPDIR)/libusb_1_0_la-poll_windows.Tpo -c -o libusb_1_0_la-poll_windows.lo `test -f 'os/poll_windows.c' || echo '$(srcdir)/'`os/poll_windows.c
|
||||
$(AM_V_at)$(am__mv) $(DEPDIR)/libusb_1_0_la-poll_windows.Tpo $(DEPDIR)/libusb_1_0_la-poll_windows.Plo
|
||||
# $(AM_V_CC) \
|
||||
# source='os/poll_windows.c' object='libusb_1_0_la-poll_windows.lo' libtool=yes \
|
||||
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
|
||||
# $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -c -o libusb_1_0_la-poll_windows.lo `test -f 'os/poll_windows.c' || echo '$(srcdir)/'`os/poll_windows.c
|
||||
|
||||
libusb_1_0_la-windows_usb.lo: os/windows_usb.c
|
||||
$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -MT libusb_1_0_la-windows_usb.lo -MD -MP -MF $(DEPDIR)/libusb_1_0_la-windows_usb.Tpo -c -o libusb_1_0_la-windows_usb.lo `test -f 'os/windows_usb.c' || echo '$(srcdir)/'`os/windows_usb.c
|
||||
$(AM_V_at)$(am__mv) $(DEPDIR)/libusb_1_0_la-windows_usb.Tpo $(DEPDIR)/libusb_1_0_la-windows_usb.Plo
|
||||
# $(AM_V_CC) \
|
||||
# source='os/windows_usb.c' object='libusb_1_0_la-windows_usb.lo' libtool=yes \
|
||||
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
|
||||
# $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -c -o libusb_1_0_la-windows_usb.lo `test -f 'os/windows_usb.c' || echo '$(srcdir)/'`os/windows_usb.c
|
||||
|
||||
libusb_1_0_la-threads_windows.lo: os/threads_windows.c
|
||||
$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -MT libusb_1_0_la-threads_windows.lo -MD -MP -MF $(DEPDIR)/libusb_1_0_la-threads_windows.Tpo -c -o libusb_1_0_la-threads_windows.lo `test -f 'os/threads_windows.c' || echo '$(srcdir)/'`os/threads_windows.c
|
||||
$(AM_V_at)$(am__mv) $(DEPDIR)/libusb_1_0_la-threads_windows.Tpo $(DEPDIR)/libusb_1_0_la-threads_windows.Plo
|
||||
# $(AM_V_CC) \
|
||||
# source='os/threads_windows.c' object='libusb_1_0_la-threads_windows.lo' libtool=yes \
|
||||
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
|
||||
# $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -c -o libusb_1_0_la-threads_windows.lo `test -f 'os/threads_windows.c' || echo '$(srcdir)/'`os/threads_windows.c
|
||||
|
||||
libusb_1_0_la-threads_posix.lo: os/threads_posix.c
|
||||
$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -MT libusb_1_0_la-threads_posix.lo -MD -MP -MF $(DEPDIR)/libusb_1_0_la-threads_posix.Tpo -c -o libusb_1_0_la-threads_posix.lo `test -f 'os/threads_posix.c' || echo '$(srcdir)/'`os/threads_posix.c
|
||||
$(AM_V_at)$(am__mv) $(DEPDIR)/libusb_1_0_la-threads_posix.Tpo $(DEPDIR)/libusb_1_0_la-threads_posix.Plo
|
||||
# $(AM_V_CC) \
|
||||
# source='os/threads_posix.c' object='libusb_1_0_la-threads_posix.lo' libtool=yes \
|
||||
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
|
||||
# $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -c -o libusb_1_0_la-threads_posix.lo `test -f 'os/threads_posix.c' || echo '$(srcdir)/'`os/threads_posix.c
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
install-hdrHEADERS: $(hdr_HEADERS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(hdrdir)" || $(MKDIR_P) "$(DESTDIR)$(hdrdir)"
|
||||
@list='$(hdr_HEADERS)'; test -n "$(hdrdir)" || list=; \
|
||||
for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; \
|
||||
done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(hdrdir)'"; \
|
||||
$(INSTALL_HEADER) $$files "$(DESTDIR)$(hdrdir)" || exit $$?; \
|
||||
done
|
||||
|
||||
uninstall-hdrHEADERS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(hdr_HEADERS)'; test -n "$(hdrdir)" || list=; \
|
||||
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
||||
test -n "$$files" || exit 0; \
|
||||
echo " ( cd '$(DESTDIR)$(hdrdir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(hdrdir)" && rm -f $$files
|
||||
|
||||
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) $(HEADERS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(hdrdir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
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:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
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-libLTLIBRARIES clean-libtool \
|
||||
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-hdrHEADERS
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am: install-libLTLIBRARIES
|
||||
|
||||
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: uninstall-hdrHEADERS uninstall-libLTLIBRARIES
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-libLTLIBRARIES clean-libtool 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-hdrHEADERS \
|
||||
install-html install-html-am install-info install-info-am \
|
||||
install-libLTLIBRARIES 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 uninstall-hdrHEADERS \
|
||||
uninstall-libLTLIBRARIES
|
||||
|
||||
|
||||
#.rc.lo:
|
||||
# $(AM_V_GEN)$(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --tag=RC --mode=compile $(RC) $(RCFLAGS) -i $< -o $@
|
||||
|
||||
#libusb-1.0.rc: version.h
|
||||
|
||||
# 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:
|
|
@ -0,0 +1,49 @@
|
|||
lib_LTLIBRARIES = libusb-1.0.la
|
||||
|
||||
LINUX_USBFS_SRC = os/linux_usbfs.c
|
||||
DARWIN_USB_SRC = os/darwin_usb.c
|
||||
OPENBSD_USB_SRC = os/openbsd_usb.c
|
||||
WINDOWS_USB_SRC = os/poll_windows.c os/windows_usb.c libusb-1.0.rc \
|
||||
libusb-1.0.def
|
||||
|
||||
EXTRA_DIST = $(LINUX_USBFS_SRC) $(DARWIN_USB_SRC) $(OPENBSD_USB_SRC) \
|
||||
$(WINDOWS_USB_SRC) os/threads_posix.c os/threads_windows.c
|
||||
|
||||
if OS_LINUX
|
||||
OS_SRC = $(LINUX_USBFS_SRC)
|
||||
endif
|
||||
|
||||
if OS_DARWIN
|
||||
OS_SRC = $(DARWIN_USB_SRC)
|
||||
AM_CFLAGS_EXT = -no-cpp-precomp
|
||||
endif
|
||||
|
||||
if OS_OPENBSD
|
||||
OS_SRC = $(OPENBSD_USB_SRC)
|
||||
endif
|
||||
|
||||
if OS_WINDOWS
|
||||
OS_SRC = $(WINDOWS_USB_SRC)
|
||||
|
||||
.rc.lo:
|
||||
$(AM_V_GEN)$(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --tag=RC --mode=compile $(RC) $(RCFLAGS) -i $< -o $@
|
||||
|
||||
libusb-1.0.rc: version.h
|
||||
endif
|
||||
|
||||
if THREADS_POSIX
|
||||
THREADS_SRC = os/threads_posix.h os/threads_posix.c
|
||||
else
|
||||
THREADS_SRC = os/threads_windows.h os/threads_windows.c
|
||||
endif
|
||||
|
||||
libusb_1_0_la_CFLAGS = $(VISIBILITY_CFLAGS) $(AM_CFLAGS) $(THREAD_CFLAGS) \
|
||||
-DLIBUSB_DESCRIBE=\"`git --git-dir "$(top_srcdir)/.git" describe --tags 2>/dev/null`\"
|
||||
libusb_1_0_la_LDFLAGS = $(LTLDFLAGS)
|
||||
libusb_1_0_la_SOURCES = libusbi.h core.c descriptor.c io.c sync.c $(OS_SRC) \
|
||||
os/linux_usbfs.h os/darwin_usb.h os/windows_usb.h \
|
||||
$(THREADS_SRC) \
|
||||
os/poll_posix.h os/poll_windows.h
|
||||
|
||||
hdrdir = $(includedir)/libusb-1.0
|
||||
hdr_HEADERS = libusb.h
|
|
@ -0,0 +1,718 @@
|
|||
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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 = libusb
|
||||
DIST_COMMON = $(hdr_HEADERS) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/libusb/version.h \
|
||||
$(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 =
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||
am__install_max = 40
|
||||
am__nobase_strip_setup = \
|
||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||
am__nobase_strip = \
|
||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||
am__nobase_list = $(am__nobase_strip_setup); \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||
if (++n[$$2] == $(am__install_max)) \
|
||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||
END { for (dir in files) print dir, files[dir] }'
|
||||
am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(hdrdir)"
|
||||
LTLIBRARIES = $(lib_LTLIBRARIES)
|
||||
libusb_1_0_la_LIBADD =
|
||||
am__libusb_1_0_la_SOURCES_DIST = libusbi.h core.c descriptor.c io.c \
|
||||
sync.c os/darwin_usb.c os/linux_usbfs.c os/openbsd_usb.c \
|
||||
os/poll_windows.c os/windows_usb.c libusb-1.0.rc \
|
||||
libusb-1.0.def os/linux_usbfs.h os/darwin_usb.h \
|
||||
os/windows_usb.h os/threads_windows.h os/threads_windows.c \
|
||||
os/threads_posix.h os/threads_posix.c os/poll_posix.h \
|
||||
os/poll_windows.h
|
||||
am__objects_1 = libusb_1_0_la-darwin_usb.lo
|
||||
am__objects_2 = libusb_1_0_la-linux_usbfs.lo
|
||||
am__objects_3 = libusb_1_0_la-openbsd_usb.lo
|
||||
am__objects_4 = libusb_1_0_la-poll_windows.lo \
|
||||
libusb_1_0_la-windows_usb.lo libusb-1.0.lo
|
||||
@OS_DARWIN_FALSE@@OS_LINUX_FALSE@@OS_OPENBSD_FALSE@@OS_WINDOWS_TRUE@am__objects_5 = $(am__objects_4)
|
||||
@OS_DARWIN_FALSE@@OS_LINUX_FALSE@@OS_OPENBSD_TRUE@am__objects_5 = $(am__objects_3)
|
||||
@OS_DARWIN_FALSE@@OS_LINUX_TRUE@am__objects_5 = $(am__objects_2)
|
||||
@OS_DARWIN_TRUE@am__objects_5 = $(am__objects_1)
|
||||
@THREADS_POSIX_FALSE@am__objects_6 = libusb_1_0_la-threads_windows.lo
|
||||
@THREADS_POSIX_TRUE@am__objects_6 = libusb_1_0_la-threads_posix.lo
|
||||
am_libusb_1_0_la_OBJECTS = libusb_1_0_la-core.lo \
|
||||
libusb_1_0_la-descriptor.lo libusb_1_0_la-io.lo \
|
||||
libusb_1_0_la-sync.lo $(am__objects_5) $(am__objects_6)
|
||||
libusb_1_0_la_OBJECTS = $(am_libusb_1_0_la_OBJECTS)
|
||||
AM_V_lt = $(am__v_lt_$(V))
|
||||
am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
|
||||
am__v_lt_0 = --silent
|
||||
libusb_1_0_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(libusb_1_0_la_CFLAGS) \
|
||||
$(CFLAGS) $(libusb_1_0_la_LDFLAGS) $(LDFLAGS) -o $@
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/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_$(V))
|
||||
am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
|
||||
am__v_CC_0 = @echo " CC " $@;
|
||||
AM_V_at = $(am__v_at_$(V))
|
||||
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
|
||||
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_$(V))
|
||||
am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
|
||||
am__v_CCLD_0 = @echo " CCLD " $@;
|
||||
AM_V_GEN = $(am__v_GEN_$(V))
|
||||
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
SOURCES = $(libusb_1_0_la_SOURCES)
|
||||
DIST_SOURCES = $(am__libusb_1_0_la_SOURCES_DIST)
|
||||
HEADERS = $(hdr_HEADERS)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AM_CFLAGS = @AM_CFLAGS@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
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@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FGREP = @FGREP@
|
||||
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@
|
||||
LTLDFLAGS = @LTLDFLAGS@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OS_DARWIN = @OS_DARWIN@
|
||||
OS_LINUX = @OS_LINUX@
|
||||
OS_OPENBSD = @OS_OPENBSD@
|
||||
OS_WINDOWS = @OS_WINDOWS@
|
||||
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@
|
||||
PC_LIBS_PRIVATE = @PC_LIBS_PRIVATE@
|
||||
RANLIB = @RANLIB@
|
||||
RC = @RC@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
THREAD_CFLAGS = @THREAD_CFLAGS@
|
||||
VERSION = @VERSION@
|
||||
VISIBILITY_CFLAGS = @VISIBILITY_CFLAGS@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
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@
|
||||
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@
|
||||
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@
|
||||
lib_LTLIBRARIES = libusb-1.0.la
|
||||
LINUX_USBFS_SRC = os/linux_usbfs.c
|
||||
DARWIN_USB_SRC = os/darwin_usb.c
|
||||
OPENBSD_USB_SRC = os/openbsd_usb.c
|
||||
WINDOWS_USB_SRC = os/poll_windows.c os/windows_usb.c libusb-1.0.rc \
|
||||
libusb-1.0.def
|
||||
|
||||
EXTRA_DIST = $(LINUX_USBFS_SRC) $(DARWIN_USB_SRC) $(OPENBSD_USB_SRC) \
|
||||
$(WINDOWS_USB_SRC) os/threads_posix.c os/threads_windows.c
|
||||
|
||||
@OS_DARWIN_TRUE@OS_SRC = $(DARWIN_USB_SRC)
|
||||
@OS_LINUX_TRUE@OS_SRC = $(LINUX_USBFS_SRC)
|
||||
@OS_OPENBSD_TRUE@OS_SRC = $(OPENBSD_USB_SRC)
|
||||
@OS_WINDOWS_TRUE@OS_SRC = $(WINDOWS_USB_SRC)
|
||||
@OS_DARWIN_TRUE@AM_CFLAGS_EXT = -no-cpp-precomp
|
||||
@THREADS_POSIX_FALSE@THREADS_SRC = os/threads_windows.h os/threads_windows.c
|
||||
@THREADS_POSIX_TRUE@THREADS_SRC = os/threads_posix.h os/threads_posix.c
|
||||
libusb_1_0_la_CFLAGS = $(VISIBILITY_CFLAGS) $(AM_CFLAGS) $(THREAD_CFLAGS) \
|
||||
-DLIBUSB_DESCRIBE=\"`git --git-dir "$(top_srcdir)/.git" describe --tags 2>/dev/null`\"
|
||||
|
||||
libusb_1_0_la_LDFLAGS = $(LTLDFLAGS)
|
||||
libusb_1_0_la_SOURCES = libusbi.h core.c descriptor.c io.c sync.c $(OS_SRC) \
|
||||
os/linux_usbfs.h os/darwin_usb.h os/windows_usb.h \
|
||||
$(THREADS_SRC) \
|
||||
os/poll_posix.h os/poll_windows.h
|
||||
|
||||
hdrdir = $(includedir)/libusb-1.0
|
||||
hdr_HEADERS = libusb.h
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .obj .rc
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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 libusb/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu libusb/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
|
||||
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
|
||||
list2=; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
list2="$$list2 $$p"; \
|
||||
else :; fi; \
|
||||
done; \
|
||||
test -z "$$list2" || { \
|
||||
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
|
||||
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
|
||||
}
|
||||
|
||||
uninstall-libLTLIBRARIES:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
|
||||
for p in $$list; do \
|
||||
$(am__strip_dir) \
|
||||
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
|
||||
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
|
||||
done
|
||||
|
||||
clean-libLTLIBRARIES:
|
||||
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
|
||||
@list='$(lib_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
|
||||
libusb-1.0.la: $(libusb_1_0_la_OBJECTS) $(libusb_1_0_la_DEPENDENCIES)
|
||||
$(AM_V_CCLD)$(libusb_1_0_la_LINK) -rpath $(libdir) $(libusb_1_0_la_OBJECTS) $(libusb_1_0_la_LIBADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libusb_1_0_la-core.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libusb_1_0_la-darwin_usb.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libusb_1_0_la-descriptor.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libusb_1_0_la-io.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libusb_1_0_la-linux_usbfs.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libusb_1_0_la-openbsd_usb.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libusb_1_0_la-poll_windows.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libusb_1_0_la-sync.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libusb_1_0_la-threads_posix.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libusb_1_0_la-threads_windows.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libusb_1_0_la-windows_usb.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
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(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
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(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
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
libusb_1_0_la-core.lo: core.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) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -MT libusb_1_0_la-core.lo -MD -MP -MF $(DEPDIR)/libusb_1_0_la-core.Tpo -c -o libusb_1_0_la-core.lo `test -f 'core.c' || echo '$(srcdir)/'`core.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libusb_1_0_la-core.Tpo $(DEPDIR)/libusb_1_0_la-core.Plo
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='core.c' object='libusb_1_0_la-core.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -c -o libusb_1_0_la-core.lo `test -f 'core.c' || echo '$(srcdir)/'`core.c
|
||||
|
||||
libusb_1_0_la-descriptor.lo: descriptor.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) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -MT libusb_1_0_la-descriptor.lo -MD -MP -MF $(DEPDIR)/libusb_1_0_la-descriptor.Tpo -c -o libusb_1_0_la-descriptor.lo `test -f 'descriptor.c' || echo '$(srcdir)/'`descriptor.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libusb_1_0_la-descriptor.Tpo $(DEPDIR)/libusb_1_0_la-descriptor.Plo
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='descriptor.c' object='libusb_1_0_la-descriptor.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -c -o libusb_1_0_la-descriptor.lo `test -f 'descriptor.c' || echo '$(srcdir)/'`descriptor.c
|
||||
|
||||
libusb_1_0_la-io.lo: io.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) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -MT libusb_1_0_la-io.lo -MD -MP -MF $(DEPDIR)/libusb_1_0_la-io.Tpo -c -o libusb_1_0_la-io.lo `test -f 'io.c' || echo '$(srcdir)/'`io.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libusb_1_0_la-io.Tpo $(DEPDIR)/libusb_1_0_la-io.Plo
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='io.c' object='libusb_1_0_la-io.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -c -o libusb_1_0_la-io.lo `test -f 'io.c' || echo '$(srcdir)/'`io.c
|
||||
|
||||
libusb_1_0_la-sync.lo: sync.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) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -MT libusb_1_0_la-sync.lo -MD -MP -MF $(DEPDIR)/libusb_1_0_la-sync.Tpo -c -o libusb_1_0_la-sync.lo `test -f 'sync.c' || echo '$(srcdir)/'`sync.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libusb_1_0_la-sync.Tpo $(DEPDIR)/libusb_1_0_la-sync.Plo
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sync.c' object='libusb_1_0_la-sync.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -c -o libusb_1_0_la-sync.lo `test -f 'sync.c' || echo '$(srcdir)/'`sync.c
|
||||
|
||||
libusb_1_0_la-darwin_usb.lo: os/darwin_usb.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) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -MT libusb_1_0_la-darwin_usb.lo -MD -MP -MF $(DEPDIR)/libusb_1_0_la-darwin_usb.Tpo -c -o libusb_1_0_la-darwin_usb.lo `test -f 'os/darwin_usb.c' || echo '$(srcdir)/'`os/darwin_usb.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libusb_1_0_la-darwin_usb.Tpo $(DEPDIR)/libusb_1_0_la-darwin_usb.Plo
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='os/darwin_usb.c' object='libusb_1_0_la-darwin_usb.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -c -o libusb_1_0_la-darwin_usb.lo `test -f 'os/darwin_usb.c' || echo '$(srcdir)/'`os/darwin_usb.c
|
||||
|
||||
libusb_1_0_la-linux_usbfs.lo: os/linux_usbfs.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) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -MT libusb_1_0_la-linux_usbfs.lo -MD -MP -MF $(DEPDIR)/libusb_1_0_la-linux_usbfs.Tpo -c -o libusb_1_0_la-linux_usbfs.lo `test -f 'os/linux_usbfs.c' || echo '$(srcdir)/'`os/linux_usbfs.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libusb_1_0_la-linux_usbfs.Tpo $(DEPDIR)/libusb_1_0_la-linux_usbfs.Plo
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='os/linux_usbfs.c' object='libusb_1_0_la-linux_usbfs.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -c -o libusb_1_0_la-linux_usbfs.lo `test -f 'os/linux_usbfs.c' || echo '$(srcdir)/'`os/linux_usbfs.c
|
||||
|
||||
libusb_1_0_la-openbsd_usb.lo: os/openbsd_usb.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) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -MT libusb_1_0_la-openbsd_usb.lo -MD -MP -MF $(DEPDIR)/libusb_1_0_la-openbsd_usb.Tpo -c -o libusb_1_0_la-openbsd_usb.lo `test -f 'os/openbsd_usb.c' || echo '$(srcdir)/'`os/openbsd_usb.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libusb_1_0_la-openbsd_usb.Tpo $(DEPDIR)/libusb_1_0_la-openbsd_usb.Plo
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='os/openbsd_usb.c' object='libusb_1_0_la-openbsd_usb.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -c -o libusb_1_0_la-openbsd_usb.lo `test -f 'os/openbsd_usb.c' || echo '$(srcdir)/'`os/openbsd_usb.c
|
||||
|
||||
libusb_1_0_la-poll_windows.lo: os/poll_windows.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) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -MT libusb_1_0_la-poll_windows.lo -MD -MP -MF $(DEPDIR)/libusb_1_0_la-poll_windows.Tpo -c -o libusb_1_0_la-poll_windows.lo `test -f 'os/poll_windows.c' || echo '$(srcdir)/'`os/poll_windows.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libusb_1_0_la-poll_windows.Tpo $(DEPDIR)/libusb_1_0_la-poll_windows.Plo
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='os/poll_windows.c' object='libusb_1_0_la-poll_windows.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -c -o libusb_1_0_la-poll_windows.lo `test -f 'os/poll_windows.c' || echo '$(srcdir)/'`os/poll_windows.c
|
||||
|
||||
libusb_1_0_la-windows_usb.lo: os/windows_usb.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) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -MT libusb_1_0_la-windows_usb.lo -MD -MP -MF $(DEPDIR)/libusb_1_0_la-windows_usb.Tpo -c -o libusb_1_0_la-windows_usb.lo `test -f 'os/windows_usb.c' || echo '$(srcdir)/'`os/windows_usb.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libusb_1_0_la-windows_usb.Tpo $(DEPDIR)/libusb_1_0_la-windows_usb.Plo
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='os/windows_usb.c' object='libusb_1_0_la-windows_usb.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -c -o libusb_1_0_la-windows_usb.lo `test -f 'os/windows_usb.c' || echo '$(srcdir)/'`os/windows_usb.c
|
||||
|
||||
libusb_1_0_la-threads_windows.lo: os/threads_windows.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) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -MT libusb_1_0_la-threads_windows.lo -MD -MP -MF $(DEPDIR)/libusb_1_0_la-threads_windows.Tpo -c -o libusb_1_0_la-threads_windows.lo `test -f 'os/threads_windows.c' || echo '$(srcdir)/'`os/threads_windows.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libusb_1_0_la-threads_windows.Tpo $(DEPDIR)/libusb_1_0_la-threads_windows.Plo
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='os/threads_windows.c' object='libusb_1_0_la-threads_windows.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -c -o libusb_1_0_la-threads_windows.lo `test -f 'os/threads_windows.c' || echo '$(srcdir)/'`os/threads_windows.c
|
||||
|
||||
libusb_1_0_la-threads_posix.lo: os/threads_posix.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) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -MT libusb_1_0_la-threads_posix.lo -MD -MP -MF $(DEPDIR)/libusb_1_0_la-threads_posix.Tpo -c -o libusb_1_0_la-threads_posix.lo `test -f 'os/threads_posix.c' || echo '$(srcdir)/'`os/threads_posix.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libusb_1_0_la-threads_posix.Tpo $(DEPDIR)/libusb_1_0_la-threads_posix.Plo
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='os/threads_posix.c' object='libusb_1_0_la-threads_posix.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -c -o libusb_1_0_la-threads_posix.lo `test -f 'os/threads_posix.c' || echo '$(srcdir)/'`os/threads_posix.c
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
install-hdrHEADERS: $(hdr_HEADERS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(hdrdir)" || $(MKDIR_P) "$(DESTDIR)$(hdrdir)"
|
||||
@list='$(hdr_HEADERS)'; test -n "$(hdrdir)" || list=; \
|
||||
for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; \
|
||||
done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(hdrdir)'"; \
|
||||
$(INSTALL_HEADER) $$files "$(DESTDIR)$(hdrdir)" || exit $$?; \
|
||||
done
|
||||
|
||||
uninstall-hdrHEADERS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(hdr_HEADERS)'; test -n "$(hdrdir)" || list=; \
|
||||
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
||||
test -n "$$files" || exit 0; \
|
||||
echo " ( cd '$(DESTDIR)$(hdrdir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(hdrdir)" && rm -f $$files
|
||||
|
||||
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) $(HEADERS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(hdrdir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
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:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
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-libLTLIBRARIES clean-libtool \
|
||||
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-hdrHEADERS
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am: install-libLTLIBRARIES
|
||||
|
||||
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: uninstall-hdrHEADERS uninstall-libLTLIBRARIES
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-libLTLIBRARIES clean-libtool 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-hdrHEADERS \
|
||||
install-html install-html-am install-info install-info-am \
|
||||
install-libLTLIBRARIES 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 uninstall-hdrHEADERS \
|
||||
uninstall-libLTLIBRARIES
|
||||
|
||||
|
||||
@OS_WINDOWS_TRUE@.rc.lo:
|
||||
@OS_WINDOWS_TRUE@ $(AM_V_GEN)$(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --tag=RC --mode=compile $(RC) $(RCFLAGS) -i $< -o $@
|
||||
|
||||
@OS_WINDOWS_TRUE@libusb-1.0.rc: version.h
|
||||
|
||||
# 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:
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,730 @@
|
|||
/*
|
||||
* USB descriptor handling functions for libusb
|
||||
* Copyright (C) 2007 Daniel Drake <dsd@gentoo.org>
|
||||
* Copyright (c) 2001 Johannes Erdfelt <johannes@erdfelt.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "libusbi.h"
|
||||
|
||||
#define DESC_HEADER_LENGTH 2
|
||||
#define DEVICE_DESC_LENGTH 18
|
||||
#define CONFIG_DESC_LENGTH 9
|
||||
#define INTERFACE_DESC_LENGTH 9
|
||||
#define ENDPOINT_DESC_LENGTH 7
|
||||
#define ENDPOINT_AUDIO_DESC_LENGTH 9
|
||||
|
||||
/** @defgroup desc USB descriptors
|
||||
* This page details how to examine the various standard USB descriptors
|
||||
* for detected devices
|
||||
*/
|
||||
|
||||
/* set host_endian if the w values are already in host endian format,
|
||||
* as opposed to bus endian. */
|
||||
int usbi_parse_descriptor(unsigned char *source, const char *descriptor,
|
||||
void *dest, int host_endian)
|
||||
{
|
||||
unsigned char *sp = source, *dp = dest;
|
||||
uint16_t w;
|
||||
const char *cp;
|
||||
|
||||
for (cp = descriptor; *cp; cp++) {
|
||||
switch (*cp) {
|
||||
case 'b': /* 8-bit byte */
|
||||
*dp++ = *sp++;
|
||||
break;
|
||||
case 'w': /* 16-bit word, convert from little endian to CPU */
|
||||
dp += ((uintptr_t)dp & 1); /* Align to word boundary */
|
||||
|
||||
if (host_endian) {
|
||||
memcpy(dp, sp, 2);
|
||||
} else {
|
||||
w = (sp[1] << 8) | sp[0];
|
||||
*((uint16_t *)dp) = w;
|
||||
}
|
||||
sp += 2;
|
||||
dp += 2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return (int) (sp - source);
|
||||
}
|
||||
|
||||
static void clear_endpoint(struct libusb_endpoint_descriptor *endpoint)
|
||||
{
|
||||
if (endpoint->extra)
|
||||
free((unsigned char *) endpoint->extra);
|
||||
}
|
||||
|
||||
static int parse_endpoint(struct libusb_context *ctx,
|
||||
struct libusb_endpoint_descriptor *endpoint, unsigned char *buffer,
|
||||
int size, int host_endian)
|
||||
{
|
||||
struct usb_descriptor_header header;
|
||||
unsigned char *extra;
|
||||
unsigned char *begin;
|
||||
int parsed = 0;
|
||||
int len;
|
||||
|
||||
usbi_parse_descriptor(buffer, "bb", &header, 0);
|
||||
|
||||
/* Everything should be fine being passed into here, but we sanity */
|
||||
/* check JIC */
|
||||
if (header.bLength > size) {
|
||||
usbi_err(ctx, "ran out of descriptors parsing");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (header.bDescriptorType != LIBUSB_DT_ENDPOINT) {
|
||||
usbi_err(ctx, "unexpected descriptor %x (expected %x)",
|
||||
header.bDescriptorType, LIBUSB_DT_ENDPOINT);
|
||||
return parsed;
|
||||
}
|
||||
|
||||
if (header.bLength >= ENDPOINT_AUDIO_DESC_LENGTH)
|
||||
usbi_parse_descriptor(buffer, "bbbbwbbb", endpoint, host_endian);
|
||||
else if (header.bLength >= ENDPOINT_DESC_LENGTH)
|
||||
usbi_parse_descriptor(buffer, "bbbbwb", endpoint, host_endian);
|
||||
|
||||
buffer += header.bLength;
|
||||
size -= header.bLength;
|
||||
parsed += header.bLength;
|
||||
|
||||
/* Skip over the rest of the Class Specific or Vendor Specific */
|
||||
/* descriptors */
|
||||
begin = buffer;
|
||||
while (size >= DESC_HEADER_LENGTH) {
|
||||
usbi_parse_descriptor(buffer, "bb", &header, 0);
|
||||
|
||||
if (header.bLength < 2) {
|
||||
usbi_err(ctx, "invalid descriptor length %d", header.bLength);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* If we find another "proper" descriptor then we're done */
|
||||
if ((header.bDescriptorType == LIBUSB_DT_ENDPOINT) ||
|
||||
(header.bDescriptorType == LIBUSB_DT_INTERFACE) ||
|
||||
(header.bDescriptorType == LIBUSB_DT_CONFIG) ||
|
||||
(header.bDescriptorType == LIBUSB_DT_DEVICE))
|
||||
break;
|
||||
|
||||
usbi_dbg("skipping descriptor %x", header.bDescriptorType);
|
||||
buffer += header.bLength;
|
||||
size -= header.bLength;
|
||||
parsed += header.bLength;
|
||||
}
|
||||
|
||||
/* Copy any unknown descriptors into a storage area for drivers */
|
||||
/* to later parse */
|
||||
len = (int)(buffer - begin);
|
||||
if (!len) {
|
||||
endpoint->extra = NULL;
|
||||
endpoint->extra_length = 0;
|
||||
return parsed;
|
||||
}
|
||||
|
||||
extra = malloc(len);
|
||||
endpoint->extra = extra;
|
||||
if (!extra) {
|
||||
endpoint->extra_length = 0;
|
||||
return LIBUSB_ERROR_NO_MEM;
|
||||
}
|
||||
|
||||
memcpy(extra, begin, len);
|
||||
endpoint->extra_length = len;
|
||||
|
||||
return parsed;
|
||||
}
|
||||
|
||||
static void clear_interface(struct libusb_interface *usb_interface)
|
||||
{
|
||||
int i;
|
||||
int j;
|
||||
|
||||
if (usb_interface->altsetting) {
|
||||
for (i = 0; i < usb_interface->num_altsetting; i++) {
|
||||
struct libusb_interface_descriptor *ifp =
|
||||
(struct libusb_interface_descriptor *)
|
||||
usb_interface->altsetting + i;
|
||||
if (ifp->extra)
|
||||
free((void *) ifp->extra);
|
||||
if (ifp->endpoint) {
|
||||
for (j = 0; j < ifp->bNumEndpoints; j++)
|
||||
clear_endpoint((struct libusb_endpoint_descriptor *)
|
||||
ifp->endpoint + j);
|
||||
free((void *) ifp->endpoint);
|
||||
}
|
||||
}
|
||||
free((void *) usb_interface->altsetting);
|
||||
usb_interface->altsetting = NULL;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static int parse_interface(libusb_context *ctx,
|
||||
struct libusb_interface *usb_interface, unsigned char *buffer, int size,
|
||||
int host_endian)
|
||||
{
|
||||
int i;
|
||||
int len;
|
||||
int r;
|
||||
int parsed = 0;
|
||||
size_t tmp;
|
||||
struct usb_descriptor_header header;
|
||||
struct libusb_interface_descriptor *ifp;
|
||||
unsigned char *begin;
|
||||
|
||||
usb_interface->num_altsetting = 0;
|
||||
|
||||
while (size >= INTERFACE_DESC_LENGTH) {
|
||||
struct libusb_interface_descriptor *altsetting =
|
||||
(struct libusb_interface_descriptor *) usb_interface->altsetting;
|
||||
altsetting = realloc(altsetting,
|
||||
sizeof(struct libusb_interface_descriptor) *
|
||||
(usb_interface->num_altsetting + 1));
|
||||
if (!altsetting) {
|
||||
r = LIBUSB_ERROR_NO_MEM;
|
||||
goto err;
|
||||
}
|
||||
usb_interface->altsetting = altsetting;
|
||||
|
||||
ifp = altsetting + usb_interface->num_altsetting;
|
||||
usb_interface->num_altsetting++;
|
||||
usbi_parse_descriptor(buffer, "bbbbbbbbb", ifp, 0);
|
||||
ifp->extra = NULL;
|
||||
ifp->extra_length = 0;
|
||||
ifp->endpoint = NULL;
|
||||
|
||||
/* Skip over the interface */
|
||||
buffer += ifp->bLength;
|
||||
parsed += ifp->bLength;
|
||||
size -= ifp->bLength;
|
||||
|
||||
begin = buffer;
|
||||
|
||||
/* Skip over any interface, class or vendor descriptors */
|
||||
while (size >= DESC_HEADER_LENGTH) {
|
||||
usbi_parse_descriptor(buffer, "bb", &header, 0);
|
||||
if (header.bLength < 2) {
|
||||
usbi_err(ctx, "invalid descriptor of length %d",
|
||||
header.bLength);
|
||||
r = LIBUSB_ERROR_IO;
|
||||
goto err;
|
||||
}
|
||||
|
||||
/* If we find another "proper" descriptor then we're done */
|
||||
if ((header.bDescriptorType == LIBUSB_DT_INTERFACE) ||
|
||||
(header.bDescriptorType == LIBUSB_DT_ENDPOINT) ||
|
||||
(header.bDescriptorType == LIBUSB_DT_CONFIG) ||
|
||||
(header.bDescriptorType == LIBUSB_DT_DEVICE))
|
||||
break;
|
||||
|
||||
buffer += header.bLength;
|
||||
parsed += header.bLength;
|
||||
size -= header.bLength;
|
||||
}
|
||||
|
||||
/* Copy any unknown descriptors into a storage area for */
|
||||
/* drivers to later parse */
|
||||
len = (int)(buffer - begin);
|
||||
if (len) {
|
||||
ifp->extra = malloc(len);
|
||||
if (!ifp->extra) {
|
||||
r = LIBUSB_ERROR_NO_MEM;
|
||||
goto err;
|
||||
}
|
||||
memcpy((unsigned char *) ifp->extra, begin, len);
|
||||
ifp->extra_length = len;
|
||||
}
|
||||
|
||||
/* Did we hit an unexpected descriptor? */
|
||||
if (size >= DESC_HEADER_LENGTH) {
|
||||
usbi_parse_descriptor(buffer, "bb", &header, 0);
|
||||
if ((header.bDescriptorType == LIBUSB_DT_CONFIG) ||
|
||||
(header.bDescriptorType == LIBUSB_DT_DEVICE)) {
|
||||
return parsed;
|
||||
}
|
||||
}
|
||||
|
||||
if (ifp->bNumEndpoints > USB_MAXENDPOINTS) {
|
||||
usbi_err(ctx, "too many endpoints (%d)", ifp->bNumEndpoints);
|
||||
r = LIBUSB_ERROR_IO;
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (ifp->bNumEndpoints > 0) {
|
||||
struct libusb_endpoint_descriptor *endpoint;
|
||||
tmp = ifp->bNumEndpoints * sizeof(struct libusb_endpoint_descriptor);
|
||||
endpoint = malloc(tmp);
|
||||
ifp->endpoint = endpoint;
|
||||
if (!endpoint) {
|
||||
r = LIBUSB_ERROR_NO_MEM;
|
||||
goto err;
|
||||
}
|
||||
|
||||
memset(endpoint, 0, tmp);
|
||||
for (i = 0; i < ifp->bNumEndpoints; i++) {
|
||||
usbi_parse_descriptor(buffer, "bb", &header, 0);
|
||||
|
||||
if (header.bLength > size) {
|
||||
usbi_err(ctx, "ran out of descriptors parsing");
|
||||
r = LIBUSB_ERROR_IO;
|
||||
goto err;
|
||||
}
|
||||
|
||||
r = parse_endpoint(ctx, endpoint + i, buffer, size,
|
||||
host_endian);
|
||||
if (r < 0)
|
||||
goto err;
|
||||
|
||||
buffer += r;
|
||||
parsed += r;
|
||||
size -= r;
|
||||
}
|
||||
}
|
||||
|
||||
/* We check to see if it's an alternate to this one */
|
||||
ifp = (struct libusb_interface_descriptor *) buffer;
|
||||
if (size < LIBUSB_DT_INTERFACE_SIZE ||
|
||||
ifp->bDescriptorType != LIBUSB_DT_INTERFACE ||
|
||||
!ifp->bAlternateSetting)
|
||||
return parsed;
|
||||
}
|
||||
|
||||
return parsed;
|
||||
err:
|
||||
clear_interface(usb_interface);
|
||||
return r;
|
||||
}
|
||||
|
||||
static void clear_configuration(struct libusb_config_descriptor *config)
|
||||
{
|
||||
if (config->interface) {
|
||||
int i;
|
||||
for (i = 0; i < config->bNumInterfaces; i++)
|
||||
clear_interface((struct libusb_interface *)
|
||||
config->interface + i);
|
||||
free((void *) config->interface);
|
||||
}
|
||||
if (config->extra)
|
||||
free((void *) config->extra);
|
||||
}
|
||||
|
||||
static int parse_configuration(struct libusb_context *ctx,
|
||||
struct libusb_config_descriptor *config, unsigned char *buffer,
|
||||
int host_endian)
|
||||
{
|
||||
int i;
|
||||
int r;
|
||||
int size;
|
||||
size_t tmp;
|
||||
struct usb_descriptor_header header;
|
||||
struct libusb_interface *usb_interface;
|
||||
|
||||
usbi_parse_descriptor(buffer, "bbwbbbbb", config, host_endian);
|
||||
size = config->wTotalLength;
|
||||
|
||||
if (config->bNumInterfaces > USB_MAXINTERFACES) {
|
||||
usbi_err(ctx, "too many interfaces (%d)", config->bNumInterfaces);
|
||||
return LIBUSB_ERROR_IO;
|
||||
}
|
||||
|
||||
tmp = config->bNumInterfaces * sizeof(struct libusb_interface);
|
||||
usb_interface = malloc(tmp);
|
||||
config->interface = usb_interface;
|
||||
if (!config->interface)
|
||||
return LIBUSB_ERROR_NO_MEM;
|
||||
|
||||
memset(usb_interface, 0, tmp);
|
||||
buffer += config->bLength;
|
||||
size -= config->bLength;
|
||||
|
||||
config->extra = NULL;
|
||||
config->extra_length = 0;
|
||||
|
||||
for (i = 0; i < config->bNumInterfaces; i++) {
|
||||
int len;
|
||||
unsigned char *begin;
|
||||
|
||||
/* Skip over the rest of the Class Specific or Vendor */
|
||||
/* Specific descriptors */
|
||||
begin = buffer;
|
||||
while (size >= DESC_HEADER_LENGTH) {
|
||||
usbi_parse_descriptor(buffer, "bb", &header, 0);
|
||||
|
||||
if ((header.bLength > size) ||
|
||||
(header.bLength < DESC_HEADER_LENGTH)) {
|
||||
usbi_err(ctx, "invalid descriptor length of %d",
|
||||
header.bLength);
|
||||
r = LIBUSB_ERROR_IO;
|
||||
goto err;
|
||||
}
|
||||
|
||||
/* If we find another "proper" descriptor then we're done */
|
||||
if ((header.bDescriptorType == LIBUSB_DT_ENDPOINT) ||
|
||||
(header.bDescriptorType == LIBUSB_DT_INTERFACE) ||
|
||||
(header.bDescriptorType == LIBUSB_DT_CONFIG) ||
|
||||
(header.bDescriptorType == LIBUSB_DT_DEVICE))
|
||||
break;
|
||||
|
||||
usbi_dbg("skipping descriptor 0x%x\n", header.bDescriptorType);
|
||||
buffer += header.bLength;
|
||||
size -= header.bLength;
|
||||
}
|
||||
|
||||
/* Copy any unknown descriptors into a storage area for */
|
||||
/* drivers to later parse */
|
||||
len = (int)(buffer - begin);
|
||||
if (len) {
|
||||
/* FIXME: We should realloc and append here */
|
||||
if (!config->extra_length) {
|
||||
config->extra = malloc(len);
|
||||
if (!config->extra) {
|
||||
r = LIBUSB_ERROR_NO_MEM;
|
||||
goto err;
|
||||
}
|
||||
|
||||
memcpy((unsigned char *) config->extra, begin, len);
|
||||
config->extra_length = len;
|
||||
}
|
||||
}
|
||||
|
||||
r = parse_interface(ctx, usb_interface + i, buffer, size, host_endian);
|
||||
if (r < 0)
|
||||
goto err;
|
||||
|
||||
buffer += r;
|
||||
size -= r;
|
||||
}
|
||||
|
||||
return size;
|
||||
|
||||
err:
|
||||
clear_configuration(config);
|
||||
return r;
|
||||
}
|
||||
|
||||
/** \ingroup desc
|
||||
* Get the USB device descriptor for a given device.
|
||||
*
|
||||
* This is a non-blocking function; the device descriptor is cached in memory.
|
||||
*
|
||||
* \param dev the device
|
||||
* \param desc output location for the descriptor data
|
||||
* \returns 0 on success or a LIBUSB_ERROR code on failure
|
||||
*/
|
||||
int API_EXPORTED libusb_get_device_descriptor(libusb_device *dev,
|
||||
struct libusb_device_descriptor *desc)
|
||||
{
|
||||
unsigned char raw_desc[DEVICE_DESC_LENGTH];
|
||||
int host_endian = 0;
|
||||
int r;
|
||||
|
||||
usbi_dbg("");
|
||||
r = usbi_backend->get_device_descriptor(dev, raw_desc, &host_endian);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
memcpy((unsigned char *) desc, raw_desc, sizeof(raw_desc));
|
||||
if (!host_endian) {
|
||||
desc->bcdUSB = libusb_le16_to_cpu(desc->bcdUSB);
|
||||
desc->idVendor = libusb_le16_to_cpu(desc->idVendor);
|
||||
desc->idProduct = libusb_le16_to_cpu(desc->idProduct);
|
||||
desc->bcdDevice = libusb_le16_to_cpu(desc->bcdDevice);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** \ingroup desc
|
||||
* Get the USB configuration descriptor for the currently active configuration.
|
||||
* This is a non-blocking function which does not involve any requests being
|
||||
* sent to the device.
|
||||
*
|
||||
* \param dev a device
|
||||
* \param config output location for the USB configuration descriptor. Only
|
||||
* valid if 0 was returned. Must be freed with libusb_free_config_descriptor()
|
||||
* after use.
|
||||
* \returns 0 on success
|
||||
* \returns LIBUSB_ERROR_NOT_FOUND if the device is in unconfigured state
|
||||
* \returns another LIBUSB_ERROR code on error
|
||||
* \see libusb_get_config_descriptor
|
||||
*/
|
||||
int API_EXPORTED libusb_get_active_config_descriptor(libusb_device *dev,
|
||||
struct libusb_config_descriptor **config)
|
||||
{
|
||||
struct libusb_config_descriptor *_config = malloc(sizeof(*_config));
|
||||
unsigned char tmp[8];
|
||||
unsigned char *buf = NULL;
|
||||
int host_endian = 0;
|
||||
int r;
|
||||
|
||||
usbi_dbg("");
|
||||
if (!_config)
|
||||
return LIBUSB_ERROR_NO_MEM;
|
||||
|
||||
r = usbi_backend->get_active_config_descriptor(dev, tmp, sizeof(tmp),
|
||||
&host_endian);
|
||||
if (r < 0)
|
||||
goto err;
|
||||
|
||||
usbi_parse_descriptor(tmp, "bbw", _config, host_endian);
|
||||
buf = malloc(_config->wTotalLength);
|
||||
if (!buf) {
|
||||
r = LIBUSB_ERROR_NO_MEM;
|
||||
goto err;
|
||||
}
|
||||
|
||||
r = usbi_backend->get_active_config_descriptor(dev, buf,
|
||||
_config->wTotalLength, &host_endian);
|
||||
if (r < 0)
|
||||
goto err;
|
||||
|
||||
r = parse_configuration(dev->ctx, _config, buf, host_endian);
|
||||
if (r < 0) {
|
||||
usbi_err(dev->ctx, "parse_configuration failed with error %d", r);
|
||||
goto err;
|
||||
} else if (r > 0) {
|
||||
usbi_warn(dev->ctx, "descriptor data still left");
|
||||
}
|
||||
|
||||
free(buf);
|
||||
*config = _config;
|
||||
return 0;
|
||||
|
||||
err:
|
||||
free(_config);
|
||||
if (buf)
|
||||
free(buf);
|
||||
return r;
|
||||
}
|
||||
|
||||
/** \ingroup desc
|
||||
* Get a USB configuration descriptor based on its index.
|
||||
* This is a non-blocking function which does not involve any requests being
|
||||
* sent to the device.
|
||||
*
|
||||
* \param dev a device
|
||||
* \param config_index the index of the configuration you wish to retrieve
|
||||
* \param config output location for the USB configuration descriptor. Only
|
||||
* valid if 0 was returned. Must be freed with libusb_free_config_descriptor()
|
||||
* after use.
|
||||
* \returns 0 on success
|
||||
* \returns LIBUSB_ERROR_NOT_FOUND if the configuration does not exist
|
||||
* \returns another LIBUSB_ERROR code on error
|
||||
* \see libusb_get_active_config_descriptor()
|
||||
* \see libusb_get_config_descriptor_by_value()
|
||||
*/
|
||||
int API_EXPORTED libusb_get_config_descriptor(libusb_device *dev,
|
||||
uint8_t config_index, struct libusb_config_descriptor **config)
|
||||
{
|
||||
struct libusb_config_descriptor *_config;
|
||||
unsigned char tmp[8];
|
||||
unsigned char *buf = NULL;
|
||||
int host_endian = 0;
|
||||
int r;
|
||||
|
||||
usbi_dbg("index %d", config_index);
|
||||
if (config_index >= dev->num_configurations)
|
||||
return LIBUSB_ERROR_NOT_FOUND;
|
||||
|
||||
_config = malloc(sizeof(*_config));
|
||||
if (!_config)
|
||||
return LIBUSB_ERROR_NO_MEM;
|
||||
|
||||
r = usbi_backend->get_config_descriptor(dev, config_index, tmp,
|
||||
sizeof(tmp), &host_endian);
|
||||
if (r < 0)
|
||||
goto err;
|
||||
|
||||
usbi_parse_descriptor(tmp, "bbw", _config, host_endian);
|
||||
buf = malloc(_config->wTotalLength);
|
||||
if (!buf) {
|
||||
r = LIBUSB_ERROR_NO_MEM;
|
||||
goto err;
|
||||
}
|
||||
|
||||
host_endian = 0;
|
||||
r = usbi_backend->get_config_descriptor(dev, config_index, buf,
|
||||
_config->wTotalLength, &host_endian);
|
||||
if (r < 0)
|
||||
goto err;
|
||||
|
||||
r = parse_configuration(dev->ctx, _config, buf, host_endian);
|
||||
if (r < 0) {
|
||||
usbi_err(dev->ctx, "parse_configuration failed with error %d", r);
|
||||
goto err;
|
||||
} else if (r > 0) {
|
||||
usbi_warn(dev->ctx, "descriptor data still left");
|
||||
}
|
||||
|
||||
free(buf);
|
||||
*config = _config;
|
||||
return 0;
|
||||
|
||||
err:
|
||||
free(_config);
|
||||
if (buf)
|
||||
free(buf);
|
||||
return r;
|
||||
}
|
||||
|
||||
/* iterate through all configurations, returning the index of the configuration
|
||||
* matching a specific bConfigurationValue in the idx output parameter, or -1
|
||||
* if the config was not found.
|
||||
* returns 0 or a LIBUSB_ERROR code
|
||||
*/
|
||||
int usbi_get_config_index_by_value(struct libusb_device *dev,
|
||||
uint8_t bConfigurationValue, int *idx)
|
||||
{
|
||||
uint8_t i;
|
||||
|
||||
usbi_dbg("value %d", bConfigurationValue);
|
||||
for (i = 0; i < dev->num_configurations; i++) {
|
||||
unsigned char tmp[6];
|
||||
int host_endian;
|
||||
int r = usbi_backend->get_config_descriptor(dev, i, tmp, sizeof(tmp),
|
||||
&host_endian);
|
||||
if (r < 0)
|
||||
return r;
|
||||
if (tmp[5] == bConfigurationValue) {
|
||||
*idx = i;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
*idx = -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** \ingroup desc
|
||||
* Get a USB configuration descriptor with a specific bConfigurationValue.
|
||||
* This is a non-blocking function which does not involve any requests being
|
||||
* sent to the device.
|
||||
*
|
||||
* \param dev a device
|
||||
* \param bConfigurationValue the bConfigurationValue of the configuration you
|
||||
* wish to retrieve
|
||||
* \param config output location for the USB configuration descriptor. Only
|
||||
* valid if 0 was returned. Must be freed with libusb_free_config_descriptor()
|
||||
* after use.
|
||||
* \returns 0 on success
|
||||
* \returns LIBUSB_ERROR_NOT_FOUND if the configuration does not exist
|
||||
* \returns another LIBUSB_ERROR code on error
|
||||
* \see libusb_get_active_config_descriptor()
|
||||
* \see libusb_get_config_descriptor()
|
||||
*/
|
||||
int API_EXPORTED libusb_get_config_descriptor_by_value(libusb_device *dev,
|
||||
uint8_t bConfigurationValue, struct libusb_config_descriptor **config)
|
||||
{
|
||||
int idx;
|
||||
int r = usbi_get_config_index_by_value(dev, bConfigurationValue, &idx);
|
||||
if (r < 0)
|
||||
return r;
|
||||
else if (idx == -1)
|
||||
return LIBUSB_ERROR_NOT_FOUND;
|
||||
else
|
||||
return libusb_get_config_descriptor(dev, (uint8_t) idx, config);
|
||||
}
|
||||
|
||||
/** \ingroup desc
|
||||
* Free a configuration descriptor obtained from
|
||||
* libusb_get_active_config_descriptor() or libusb_get_config_descriptor().
|
||||
* It is safe to call this function with a NULL config parameter, in which
|
||||
* case the function simply returns.
|
||||
*
|
||||
* \param config the configuration descriptor to free
|
||||
*/
|
||||
void API_EXPORTED libusb_free_config_descriptor(
|
||||
struct libusb_config_descriptor *config)
|
||||
{
|
||||
if (!config)
|
||||
return;
|
||||
|
||||
clear_configuration(config);
|
||||
free(config);
|
||||
}
|
||||
|
||||
/** \ingroup desc
|
||||
* Retrieve a string descriptor in C style ASCII.
|
||||
*
|
||||
* Wrapper around libusb_get_string_descriptor(). Uses the first language
|
||||
* supported by the device.
|
||||
*
|
||||
* \param dev a device handle
|
||||
* \param desc_index the index of the descriptor to retrieve
|
||||
* \param data output buffer for ASCII string descriptor
|
||||
* \param length size of data buffer
|
||||
* \returns number of bytes returned in data, or LIBUSB_ERROR code on failure
|
||||
*/
|
||||
int API_EXPORTED libusb_get_string_descriptor_ascii(libusb_device_handle *dev,
|
||||
uint8_t desc_index, unsigned char *data, int length)
|
||||
{
|
||||
unsigned char tbuf[255]; /* Some devices choke on size > 255 */
|
||||
int r, si, di;
|
||||
uint16_t langid;
|
||||
|
||||
/* Asking for the zero'th index is special - it returns a string
|
||||
* descriptor that contains all the language IDs supported by the
|
||||
* device. Typically there aren't many - often only one. Language
|
||||
* IDs are 16 bit numbers, and they start at the third byte in the
|
||||
* descriptor. There's also no point in trying to read descriptor 0
|
||||
* with this function. See USB 2.0 specification section 9.6.7 for
|
||||
* more information.
|
||||
*/
|
||||
|
||||
if (desc_index == 0)
|
||||
return LIBUSB_ERROR_INVALID_PARAM;
|
||||
|
||||
r = libusb_get_string_descriptor(dev, 0, 0, tbuf, sizeof(tbuf));
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
if (r < 4)
|
||||
return LIBUSB_ERROR_IO;
|
||||
|
||||
langid = tbuf[2] | (tbuf[3] << 8);
|
||||
|
||||
r = libusb_get_string_descriptor(dev, desc_index, langid, tbuf,
|
||||
sizeof(tbuf));
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
if (tbuf[1] != LIBUSB_DT_STRING)
|
||||
return LIBUSB_ERROR_IO;
|
||||
|
||||
if (tbuf[0] > r)
|
||||
return LIBUSB_ERROR_IO;
|
||||
|
||||
for (di = 0, si = 2; si < tbuf[0]; si += 2) {
|
||||
if (di >= (length - 1))
|
||||
break;
|
||||
|
||||
if (tbuf[si + 1]) /* high byte */
|
||||
data[di++] = '?';
|
||||
else
|
||||
data[di++] = tbuf[si];
|
||||
}
|
||||
|
||||
data[di] = 0;
|
||||
return di;
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,120 @@
|
|||
LIBRARY
|
||||
EXPORTS
|
||||
libusb_alloc_transfer
|
||||
libusb_alloc_transfer@4 = libusb_alloc_transfer
|
||||
libusb_attach_kernel_driver
|
||||
libusb_attach_kernel_driver@8 = libusb_attach_kernel_driver
|
||||
libusb_bulk_transfer
|
||||
libusb_bulk_transfer@24 = libusb_bulk_transfer
|
||||
libusb_cancel_transfer
|
||||
libusb_cancel_transfer@4 = libusb_cancel_transfer
|
||||
libusb_claim_interface
|
||||
libusb_claim_interface@8 = libusb_claim_interface
|
||||
libusb_clear_halt
|
||||
libusb_clear_halt@8 = libusb_clear_halt
|
||||
libusb_close
|
||||
libusb_close@4 = libusb_close
|
||||
libusb_control_transfer
|
||||
libusb_control_transfer@32 = libusb_control_transfer
|
||||
libusb_detach_kernel_driver
|
||||
libusb_detach_kernel_driver@8 = libusb_detach_kernel_driver
|
||||
libusb_error_name
|
||||
libusb_error_name@4 = libusb_error_name
|
||||
libusb_event_handler_active
|
||||
libusb_event_handler_active@4 = libusb_event_handler_active
|
||||
libusb_event_handling_ok
|
||||
libusb_event_handling_ok@4 = libusb_event_handling_ok
|
||||
libusb_exit
|
||||
libusb_exit@4 = libusb_exit
|
||||
libusb_free_config_descriptor
|
||||
libusb_free_config_descriptor@4 = libusb_free_config_descriptor
|
||||
libusb_free_device_list
|
||||
libusb_free_device_list@8 = libusb_free_device_list
|
||||
libusb_free_transfer
|
||||
libusb_free_transfer@4 = libusb_free_transfer
|
||||
libusb_get_active_config_descriptor
|
||||
libusb_get_active_config_descriptor@8 = libusb_get_active_config_descriptor
|
||||
libusb_get_bus_number
|
||||
libusb_get_bus_number@4 = libusb_get_bus_number
|
||||
libusb_get_config_descriptor
|
||||
libusb_get_config_descriptor@12 = libusb_get_config_descriptor
|
||||
libusb_get_config_descriptor_by_value
|
||||
libusb_get_config_descriptor_by_value@12 = libusb_get_config_descriptor_by_value
|
||||
libusb_get_configuration
|
||||
libusb_get_configuration@8 = libusb_get_configuration
|
||||
libusb_get_device
|
||||
libusb_get_device@4 = libusb_get_device
|
||||
libusb_get_device_address
|
||||
libusb_get_device_address@4 = libusb_get_device_address
|
||||
libusb_get_device_descriptor
|
||||
libusb_get_device_descriptor@8 = libusb_get_device_descriptor
|
||||
libusb_get_device_list
|
||||
libusb_get_device_list@8 = libusb_get_device_list
|
||||
libusb_get_device_speed
|
||||
libusb_get_device_speed@4 = libusb_get_device_speed
|
||||
libusb_get_max_iso_packet_size
|
||||
libusb_get_max_iso_packet_size@8 = libusb_get_max_iso_packet_size
|
||||
libusb_get_max_packet_size
|
||||
libusb_get_max_packet_size@8 = libusb_get_max_packet_size
|
||||
libusb_get_next_timeout
|
||||
libusb_get_next_timeout@8 = libusb_get_next_timeout
|
||||
libusb_get_pollfds
|
||||
libusb_get_pollfds@4 = libusb_get_pollfds
|
||||
libusb_get_string_descriptor_ascii
|
||||
libusb_get_string_descriptor_ascii@16 = libusb_get_string_descriptor_ascii
|
||||
libusb_get_version
|
||||
libusb_get_version@0 = libusb_get_version
|
||||
libusb_handle_events
|
||||
libusb_handle_events@4 = libusb_handle_events
|
||||
libusb_handle_events_completed
|
||||
libusb_handle_events_completed@8 = libusb_handle_events_completed
|
||||
libusb_handle_events_locked
|
||||
libusb_handle_events_locked@8 = libusb_handle_events_locked
|
||||
libusb_handle_events_timeout
|
||||
libusb_handle_events_timeout@8 = libusb_handle_events_timeout
|
||||
libusb_handle_events_timeout_completed
|
||||
libusb_handle_events_timeout_completed@12 = libusb_handle_events_timeout_completed
|
||||
libusb_has_capability
|
||||
libusb_has_capability@4 = libusb_has_capability
|
||||
libusb_init
|
||||
libusb_init@4 = libusb_init
|
||||
libusb_interrupt_transfer
|
||||
libusb_interrupt_transfer@24 = libusb_interrupt_transfer
|
||||
libusb_kernel_driver_active
|
||||
libusb_kernel_driver_active@8 = libusb_kernel_driver_active
|
||||
libusb_lock_event_waiters
|
||||
libusb_lock_event_waiters@4 = libusb_lock_event_waiters
|
||||
libusb_lock_events
|
||||
libusb_lock_events@4 = libusb_lock_events
|
||||
libusb_open
|
||||
libusb_open@8 = libusb_open
|
||||
libusb_open_device_with_vid_pid
|
||||
libusb_open_device_with_vid_pid@12 = libusb_open_device_with_vid_pid
|
||||
libusb_pollfds_handle_timeouts
|
||||
libusb_pollfds_handle_timeouts@4 = libusb_pollfds_handle_timeouts
|
||||
libusb_ref_device
|
||||
libusb_ref_device@4 = libusb_ref_device
|
||||
libusb_release_interface
|
||||
libusb_release_interface@8 = libusb_release_interface
|
||||
libusb_reset_device
|
||||
libusb_reset_device@4 = libusb_reset_device
|
||||
libusb_set_configuration
|
||||
libusb_set_configuration@8 = libusb_set_configuration
|
||||
libusb_set_debug
|
||||
libusb_set_debug@8 = libusb_set_debug
|
||||
libusb_set_interface_alt_setting
|
||||
libusb_set_interface_alt_setting@12 = libusb_set_interface_alt_setting
|
||||
libusb_set_pollfd_notifiers
|
||||
libusb_set_pollfd_notifiers@16 = libusb_set_pollfd_notifiers
|
||||
libusb_submit_transfer
|
||||
libusb_submit_transfer@4 = libusb_submit_transfer
|
||||
libusb_try_lock_events
|
||||
libusb_try_lock_events@4 = libusb_try_lock_events
|
||||
libusb_unlock_event_waiters
|
||||
libusb_unlock_event_waiters@4 = libusb_unlock_event_waiters
|
||||
libusb_unlock_events
|
||||
libusb_unlock_events@4 = libusb_unlock_events
|
||||
libusb_unref_device
|
||||
libusb_unref_device@4 = libusb_unref_device
|
||||
libusb_wait_for_event
|
||||
libusb_wait_for_event@8 = libusb_wait_for_event
|
|
@ -0,0 +1,41 @@
|
|||
# libusb-1.0.la - a libtool library file
|
||||
# Generated by libtool (GNU libtool) 2.2.10
|
||||
#
|
||||
# Please DO NOT delete this file!
|
||||
# It is necessary for linking the library.
|
||||
|
||||
# The name that we can dlopen(3).
|
||||
dlname='libusb-1.0.so.0'
|
||||
|
||||
# Names of this library.
|
||||
library_names='libusb-1.0.so.0.1.0 libusb-1.0.so.0 libusb-1.0.so'
|
||||
|
||||
# The name of the static archive.
|
||||
old_library='libusb-1.0.a'
|
||||
|
||||
# Linker flags that can not go in dependency_libs.
|
||||
inherited_linker_flags=' -pthread'
|
||||
|
||||
# Libraries that this one depends upon.
|
||||
dependency_libs=' -lrt'
|
||||
|
||||
# Names of additional weak libraries provided by this library
|
||||
weak_library_names=''
|
||||
|
||||
# Version information for libusb-1.0.
|
||||
current=1
|
||||
age=1
|
||||
revision=0
|
||||
|
||||
# Is this an already installed library?
|
||||
installed=no
|
||||
|
||||
# Should we warn about portability when linking against -modules?
|
||||
shouldnotlink=no
|
||||
|
||||
# Files to dlopen/dlpreopen
|
||||
dlopen=''
|
||||
dlpreopen=''
|
||||
|
||||
# Directory that this library needs to be installed in:
|
||||
libdir='/usr/local/lib'
|
|
@ -0,0 +1,56 @@
|
|||
/*
|
||||
* For Windows: input this file to the Resoure Compiler to produce a binary
|
||||
* .res file. This is then embedded in the resultant library (like any other
|
||||
* compilation object).
|
||||
* The information can then be queried using standard APIs and can also be
|
||||
* viewed with utilities such as Windows Explorer.
|
||||
*/
|
||||
#include "winresrc.h"
|
||||
|
||||
#include "version.h"
|
||||
#ifndef LIBUSB_VERSIONSTRING
|
||||
#define LU_STR(s) #s
|
||||
#define LU_XSTR(s) LU_STR(s)
|
||||
#if LIBUSB_NANO > 0
|
||||
#define LIBUSB_VERSIONSTRING LU_XSTR(LIBUSB_MAJOR) "." LU_XSTR(LIBUSB_MINOR) "." LU_XSTR(LIBUSB_MICRO) "." LU_XSTR(LIBUSB_NANO) LIBUSB_RC "\0"
|
||||
#else
|
||||
#define LIBUSB_VERSIONSTRING LU_XSTR(LIBUSB_MAJOR) "." LU_XSTR(LIBUSB_MINOR) "." LU_XSTR(LIBUSB_MICRO) LIBUSB_RC "\0"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION LIBUSB_MAJOR,LIBUSB_MINOR,LIBUSB_MICRO,LIBUSB_NANO
|
||||
PRODUCTVERSION LIBUSB_MAJOR,LIBUSB_MINOR,LIBUSB_MICRO,LIBUSB_NANO
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x40004L
|
||||
FILETYPE 0x2L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "Comments", "\0"
|
||||
VALUE "CompanyName", "libusb.org\0"
|
||||
VALUE "FileDescription", "C library for writing portable USB drivers in userspace\0"
|
||||
VALUE "FileVersion", LIBUSB_VERSIONSTRING
|
||||
VALUE "InternalName", "libusb\0"
|
||||
VALUE "LegalCopyright", "See individual source files, GNU LGPL v2.1 or later.\0"
|
||||
VALUE "LegalTrademarks", "http://www.gnu.org/licenses/lgpl-2.1.html\0"
|
||||
VALUE "OriginalFilename", "libusb-1.0.dll\0"
|
||||
VALUE "PrivateBuild", "\0"
|
||||
VALUE "ProductName", "libusb-1.0\0"
|
||||
VALUE "ProductVersion", LIBUSB_VERSIONSTRING
|
||||
VALUE "SpecialBuild", "\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200
|
||||
END
|
||||
END
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,12 @@
|
|||
# libusb_1_0_la-core.lo - a libtool object file
|
||||
# Generated by libtool (GNU libtool) 2.2.10
|
||||
#
|
||||
# Please DO NOT delete this file!
|
||||
# It is necessary for linking the library.
|
||||
|
||||
# Name of the PIC object.
|
||||
pic_object='.libs/libusb_1_0_la-core.o'
|
||||
|
||||
# Name of the non-PIC object
|
||||
non_pic_object='libusb_1_0_la-core.o'
|
||||
|
Binary file not shown.
|
@ -0,0 +1,12 @@
|
|||
# libusb_1_0_la-descriptor.lo - a libtool object file
|
||||
# Generated by libtool (GNU libtool) 2.2.10
|
||||
#
|
||||
# Please DO NOT delete this file!
|
||||
# It is necessary for linking the library.
|
||||
|
||||
# Name of the PIC object.
|
||||
pic_object='.libs/libusb_1_0_la-descriptor.o'
|
||||
|
||||
# Name of the non-PIC object
|
||||
non_pic_object='libusb_1_0_la-descriptor.o'
|
||||
|
Binary file not shown.
|
@ -0,0 +1,12 @@
|
|||
# libusb_1_0_la-io.lo - a libtool object file
|
||||
# Generated by libtool (GNU libtool) 2.2.10
|
||||
#
|
||||
# Please DO NOT delete this file!
|
||||
# It is necessary for linking the library.
|
||||
|
||||
# Name of the PIC object.
|
||||
pic_object='.libs/libusb_1_0_la-io.o'
|
||||
|
||||
# Name of the non-PIC object
|
||||
non_pic_object='libusb_1_0_la-io.o'
|
||||
|
Binary file not shown.
|
@ -0,0 +1,12 @@
|
|||
# libusb_1_0_la-linux_usbfs.lo - a libtool object file
|
||||
# Generated by libtool (GNU libtool) 2.2.10
|
||||
#
|
||||
# Please DO NOT delete this file!
|
||||
# It is necessary for linking the library.
|
||||
|
||||
# Name of the PIC object.
|
||||
pic_object='.libs/libusb_1_0_la-linux_usbfs.o'
|
||||
|
||||
# Name of the non-PIC object
|
||||
non_pic_object='libusb_1_0_la-linux_usbfs.o'
|
||||
|
Binary file not shown.
|
@ -0,0 +1,12 @@
|
|||
# libusb_1_0_la-sync.lo - a libtool object file
|
||||
# Generated by libtool (GNU libtool) 2.2.10
|
||||
#
|
||||
# Please DO NOT delete this file!
|
||||
# It is necessary for linking the library.
|
||||
|
||||
# Name of the PIC object.
|
||||
pic_object='.libs/libusb_1_0_la-sync.o'
|
||||
|
||||
# Name of the non-PIC object
|
||||
non_pic_object='libusb_1_0_la-sync.o'
|
||||
|
Binary file not shown.
|
@ -0,0 +1,12 @@
|
|||
# libusb_1_0_la-threads_posix.lo - a libtool object file
|
||||
# Generated by libtool (GNU libtool) 2.2.10
|
||||
#
|
||||
# Please DO NOT delete this file!
|
||||
# It is necessary for linking the library.
|
||||
|
||||
# Name of the PIC object.
|
||||
pic_object='.libs/libusb_1_0_la-threads_posix.o'
|
||||
|
||||
# Name of the non-PIC object
|
||||
non_pic_object='libusb_1_0_la-threads_posix.o'
|
||||
|
Binary file not shown.
|
@ -0,0 +1,935 @@
|
|||
/*
|
||||
* Internal header for libusb
|
||||
* Copyright (C) 2007-2009 Daniel Drake <dsd@gentoo.org>
|
||||
* Copyright (c) 2001 Johannes Erdfelt <johannes@erdfelt.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef LIBUSBI_H
|
||||
#define LIBUSBI_H
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <time.h>
|
||||
#include <stdarg.h>
|
||||
#ifdef HAVE_POLL_H
|
||||
#include <poll.h>
|
||||
#endif
|
||||
|
||||
#include <libusb.h>
|
||||
#include <version.h>
|
||||
|
||||
/* Inside the libusb code, mark all public functions as follows:
|
||||
* return_type API_EXPORTED function_name(params) { ... }
|
||||
* But if the function returns a pointer, mark it as follows:
|
||||
* DEFAULT_VISIBILITY return_type * LIBUSB_CALL function_name(params) { ... }
|
||||
* In the libusb public header, mark all declarations as:
|
||||
* return_type LIBUSB_CALL function_name(params);
|
||||
*/
|
||||
#define API_EXPORTED LIBUSB_CALL DEFAULT_VISIBILITY
|
||||
|
||||
#define DEVICE_DESC_LENGTH 18
|
||||
|
||||
#define USB_MAXENDPOINTS 32
|
||||
#define USB_MAXINTERFACES 32
|
||||
#define USB_MAXCONFIG 8
|
||||
|
||||
struct list_head {
|
||||
struct list_head *prev, *next;
|
||||
};
|
||||
|
||||
/* Get an entry from the list
|
||||
* ptr - the address of this list_head element in "type"
|
||||
* type - the data type that contains "member"
|
||||
* member - the list_head element in "type"
|
||||
*/
|
||||
#define list_entry(ptr, type, member) \
|
||||
((type *)((uintptr_t)(ptr) - (uintptr_t)(&((type *)0L)->member)))
|
||||
|
||||
/* Get each entry from a list
|
||||
* pos - A structure pointer has a "member" element
|
||||
* head - list head
|
||||
* member - the list_head element in "pos"
|
||||
* type - the type of the first parameter
|
||||
*/
|
||||
#define list_for_each_entry(pos, head, member, type) \
|
||||
for (pos = list_entry((head)->next, type, member); \
|
||||
&pos->member != (head); \
|
||||
pos = list_entry(pos->member.next, type, member))
|
||||
|
||||
#define list_for_each_entry_safe(pos, n, head, member, type) \
|
||||
for (pos = list_entry((head)->next, type, member), \
|
||||
n = list_entry(pos->member.next, type, member); \
|
||||
&pos->member != (head); \
|
||||
pos = n, n = list_entry(n->member.next, type, member))
|
||||
|
||||
#define list_empty(entry) ((entry)->next == (entry))
|
||||
|
||||
static inline void list_init(struct list_head *entry)
|
||||
{
|
||||
entry->prev = entry->next = entry;
|
||||
}
|
||||
|
||||
static inline void list_add(struct list_head *entry, struct list_head *head)
|
||||
{
|
||||
entry->next = head->next;
|
||||
entry->prev = head;
|
||||
|
||||
head->next->prev = entry;
|
||||
head->next = entry;
|
||||
}
|
||||
|
||||
static inline void list_add_tail(struct list_head *entry,
|
||||
struct list_head *head)
|
||||
{
|
||||
entry->next = head;
|
||||
entry->prev = head->prev;
|
||||
|
||||
head->prev->next = entry;
|
||||
head->prev = entry;
|
||||
}
|
||||
|
||||
static inline void list_del(struct list_head *entry)
|
||||
{
|
||||
entry->next->prev = entry->prev;
|
||||
entry->prev->next = entry->next;
|
||||
}
|
||||
|
||||
#define container_of(ptr, type, member) ({ \
|
||||
const typeof( ((type *)0)->member ) *mptr = (ptr); \
|
||||
(type *)( (char *)mptr - offsetof(type,member) );})
|
||||
|
||||
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
||||
#define MAX(a, b) ((a) > (b) ? (a) : (b))
|
||||
|
||||
#define TIMESPEC_IS_SET(ts) ((ts)->tv_sec != 0 || (ts)->tv_nsec != 0)
|
||||
|
||||
enum usbi_log_level {
|
||||
LOG_LEVEL_DEBUG,
|
||||
LOG_LEVEL_INFO,
|
||||
LOG_LEVEL_WARNING,
|
||||
LOG_LEVEL_ERROR,
|
||||
};
|
||||
|
||||
void usbi_log(struct libusb_context *ctx, enum usbi_log_level level,
|
||||
const char *function, const char *format, ...);
|
||||
|
||||
void usbi_log_v(struct libusb_context *ctx, enum usbi_log_level level,
|
||||
const char *function, const char *format, va_list args);
|
||||
|
||||
#if !defined(_MSC_VER) || _MSC_VER >= 1400
|
||||
|
||||
#ifdef ENABLE_LOGGING
|
||||
#define _usbi_log(ctx, level, ...) usbi_log(ctx, level, __FUNCTION__, __VA_ARGS__)
|
||||
#else
|
||||
#define _usbi_log(ctx, level, ...) do { (void)(ctx); } while(0)
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_DEBUG_LOGGING
|
||||
#define usbi_dbg(...) _usbi_log(NULL, LOG_LEVEL_DEBUG, __VA_ARGS__)
|
||||
#else
|
||||
#define usbi_dbg(...) do {} while(0)
|
||||
#endif
|
||||
|
||||
#define usbi_info(ctx, ...) _usbi_log(ctx, LOG_LEVEL_INFO, __VA_ARGS__)
|
||||
#define usbi_warn(ctx, ...) _usbi_log(ctx, LOG_LEVEL_WARNING, __VA_ARGS__)
|
||||
#define usbi_err(ctx, ...) _usbi_log(ctx, LOG_LEVEL_ERROR, __VA_ARGS__)
|
||||
|
||||
#else /* !defined(_MSC_VER) || _MSC_VER >= 1400 */
|
||||
|
||||
/* Old MS compilers don't support variadic macros. The code is simple, so we
|
||||
* repeat it for each loglevel. Note that the debug case is special.
|
||||
*
|
||||
* Support for variadic macros was introduced in Visual C++ 2005.
|
||||
* http://msdn.microsoft.com/en-us/library/ms177415%28v=VS.80%29.aspx
|
||||
*/
|
||||
|
||||
static inline void usbi_info(struct libusb_context *ctx, const char *fmt, ...)
|
||||
{
|
||||
#ifdef ENABLE_LOGGING
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
usbi_log_v(ctx, LOG_LEVEL_INFO, "", fmt, args);
|
||||
va_end(args);
|
||||
#else
|
||||
(void)ctx;
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline void usbi_warn(struct libusb_context *ctx, const char *fmt, ...)
|
||||
{
|
||||
#ifdef ENABLE_LOGGING
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
usbi_log_v(ctx, LOG_LEVEL_WARNING, "", fmt, args);
|
||||
va_end(args);
|
||||
#else
|
||||
(void)ctx;
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline void usbi_err(struct libusb_context *ctx, const char *fmt, ...)
|
||||
{
|
||||
#ifdef ENABLE_LOGGING
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
usbi_log_v(ctx, LOG_LEVEL_ERROR, "", fmt, args);
|
||||
va_end(args);
|
||||
#else
|
||||
(void)ctx;
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline void usbi_dbg(const char *fmt, ...)
|
||||
{
|
||||
#ifdef ENABLE_DEBUG_LOGGING
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
usbi_log_v(NULL, LOG_LEVEL_DEBUG, "", fmt, args);
|
||||
va_end(args);
|
||||
#else
|
||||
(void)fmt;
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /* !defined(_MSC_VER) || _MSC_VER >= 1400 */
|
||||
|
||||
#define USBI_GET_CONTEXT(ctx) if (!(ctx)) (ctx) = usbi_default_context
|
||||
#define DEVICE_CTX(dev) ((dev)->ctx)
|
||||
#define HANDLE_CTX(handle) (DEVICE_CTX((handle)->dev))
|
||||
#define TRANSFER_CTX(transfer) (HANDLE_CTX((transfer)->dev_handle))
|
||||
#define ITRANSFER_CTX(transfer) \
|
||||
(TRANSFER_CTX(USBI_TRANSFER_TO_LIBUSB_TRANSFER(transfer)))
|
||||
|
||||
#define IS_EPIN(ep) (0 != ((ep) & LIBUSB_ENDPOINT_IN))
|
||||
#define IS_EPOUT(ep) (!IS_EPIN(ep))
|
||||
#define IS_XFERIN(xfer) (0 != ((xfer)->endpoint & LIBUSB_ENDPOINT_IN))
|
||||
#define IS_XFEROUT(xfer) (!IS_XFERIN(xfer))
|
||||
|
||||
/* Internal abstractions for thread synchronization and poll */
|
||||
#if defined(THREADS_POSIX)
|
||||
#include <os/threads_posix.h>
|
||||
#elif defined(OS_WINDOWS)
|
||||
#include <os/threads_windows.h>
|
||||
#endif
|
||||
|
||||
#if defined(OS_LINUX) || defined(OS_DARWIN) || defined(OS_OPENBSD)
|
||||
#include <unistd.h>
|
||||
#include <os/poll_posix.h>
|
||||
#elif defined(OS_WINDOWS)
|
||||
#include <os/poll_windows.h>
|
||||
#endif
|
||||
|
||||
#if defined(OS_WINDOWS) && !defined(__GCC__)
|
||||
#undef HAVE_GETTIMEOFDAY
|
||||
int usbi_gettimeofday(struct timeval *tp, void *tzp);
|
||||
#define LIBUSB_GETTIMEOFDAY_WIN32
|
||||
#define HAVE_USBI_GETTIMEOFDAY
|
||||
#else
|
||||
#ifdef HAVE_GETTIMEOFDAY
|
||||
#define usbi_gettimeofday(tv, tz) gettimeofday((tv), (tz))
|
||||
#define HAVE_USBI_GETTIMEOFDAY
|
||||
#endif
|
||||
#endif
|
||||
|
||||
extern struct libusb_context *usbi_default_context;
|
||||
|
||||
struct libusb_context {
|
||||
int debug;
|
||||
int debug_fixed;
|
||||
|
||||
/* internal control pipe, used for interrupting event handling when
|
||||
* something needs to modify poll fds. */
|
||||
int ctrl_pipe[2];
|
||||
|
||||
struct list_head usb_devs;
|
||||
usbi_mutex_t usb_devs_lock;
|
||||
|
||||
/* A list of open handles. Backends are free to traverse this if required.
|
||||
*/
|
||||
struct list_head open_devs;
|
||||
usbi_mutex_t open_devs_lock;
|
||||
|
||||
/* this is a list of in-flight transfer handles, sorted by timeout
|
||||
* expiration. URBs to timeout the soonest are placed at the beginning of
|
||||
* the list, URBs that will time out later are placed after, and urbs with
|
||||
* infinite timeout are always placed at the very end. */
|
||||
struct list_head flying_transfers;
|
||||
usbi_mutex_t flying_transfers_lock;
|
||||
|
||||
/* list of poll fds */
|
||||
struct list_head pollfds;
|
||||
usbi_mutex_t pollfds_lock;
|
||||
|
||||
/* a counter that is set when we want to interrupt event handling, in order
|
||||
* to modify the poll fd set. and a lock to protect it. */
|
||||
unsigned int pollfd_modify;
|
||||
usbi_mutex_t pollfd_modify_lock;
|
||||
|
||||
/* user callbacks for pollfd changes */
|
||||
libusb_pollfd_added_cb fd_added_cb;
|
||||
libusb_pollfd_removed_cb fd_removed_cb;
|
||||
void *fd_cb_user_data;
|
||||
|
||||
/* ensures that only one thread is handling events at any one time */
|
||||
usbi_mutex_t events_lock;
|
||||
|
||||
/* used to see if there is an active thread doing event handling */
|
||||
int event_handler_active;
|
||||
|
||||
/* used to wait for event completion in threads other than the one that is
|
||||
* event handling */
|
||||
usbi_mutex_t event_waiters_lock;
|
||||
usbi_cond_t event_waiters_cond;
|
||||
|
||||
#ifdef USBI_TIMERFD_AVAILABLE
|
||||
/* used for timeout handling, if supported by OS.
|
||||
* this timerfd is maintained to trigger on the next pending timeout */
|
||||
int timerfd;
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifdef USBI_TIMERFD_AVAILABLE
|
||||
#define usbi_using_timerfd(ctx) ((ctx)->timerfd >= 0)
|
||||
#else
|
||||
#define usbi_using_timerfd(ctx) (0)
|
||||
#endif
|
||||
|
||||
struct libusb_device {
|
||||
/* lock protects refcnt, everything else is finalized at initialization
|
||||
* time */
|
||||
usbi_mutex_t lock;
|
||||
int refcnt;
|
||||
|
||||
struct libusb_context *ctx;
|
||||
|
||||
uint8_t bus_number;
|
||||
uint8_t device_address;
|
||||
uint8_t num_configurations;
|
||||
enum libusb_speed speed;
|
||||
|
||||
struct list_head list;
|
||||
unsigned long session_data;
|
||||
unsigned char os_priv[0];
|
||||
};
|
||||
|
||||
struct libusb_device_handle {
|
||||
/* lock protects claimed_interfaces */
|
||||
usbi_mutex_t lock;
|
||||
unsigned long claimed_interfaces;
|
||||
|
||||
struct list_head list;
|
||||
struct libusb_device *dev;
|
||||
unsigned char os_priv[0];
|
||||
};
|
||||
|
||||
enum {
|
||||
USBI_CLOCK_MONOTONIC,
|
||||
USBI_CLOCK_REALTIME
|
||||
};
|
||||
|
||||
/* in-memory transfer layout:
|
||||
*
|
||||
* 1. struct usbi_transfer
|
||||
* 2. struct libusb_transfer (which includes iso packets) [variable size]
|
||||
* 3. os private data [variable size]
|
||||
*
|
||||
* from a libusb_transfer, you can get the usbi_transfer by rewinding the
|
||||
* appropriate number of bytes.
|
||||
* the usbi_transfer includes the number of allocated packets, so you can
|
||||
* determine the size of the transfer and hence the start and length of the
|
||||
* OS-private data.
|
||||
*/
|
||||
|
||||
struct usbi_transfer {
|
||||
int num_iso_packets;
|
||||
struct list_head list;
|
||||
struct timeval timeout;
|
||||
int transferred;
|
||||
uint8_t flags;
|
||||
|
||||
/* this lock is held during libusb_submit_transfer() and
|
||||
* libusb_cancel_transfer() (allowing the OS backend to prevent duplicate
|
||||
* cancellation, submission-during-cancellation, etc). the OS backend
|
||||
* should also take this lock in the handle_events path, to prevent the user
|
||||
* cancelling the transfer from another thread while you are processing
|
||||
* its completion (presumably there would be races within your OS backend
|
||||
* if this were possible). */
|
||||
usbi_mutex_t lock;
|
||||
};
|
||||
|
||||
enum usbi_transfer_flags {
|
||||
/* The transfer has timed out */
|
||||
USBI_TRANSFER_TIMED_OUT = 1 << 0,
|
||||
|
||||
/* Set by backend submit_transfer() if the OS handles timeout */
|
||||
USBI_TRANSFER_OS_HANDLES_TIMEOUT = 1 << 1,
|
||||
|
||||
/* Cancellation was requested via libusb_cancel_transfer() */
|
||||
USBI_TRANSFER_CANCELLING = 1 << 2,
|
||||
|
||||
/* Operation on the transfer failed because the device disappeared */
|
||||
USBI_TRANSFER_DEVICE_DISAPPEARED = 1 << 3,
|
||||
};
|
||||
|
||||
#define USBI_TRANSFER_TO_LIBUSB_TRANSFER(transfer) \
|
||||
((struct libusb_transfer *)(((unsigned char *)(transfer)) \
|
||||
+ sizeof(struct usbi_transfer)))
|
||||
#define LIBUSB_TRANSFER_TO_USBI_TRANSFER(transfer) \
|
||||
((struct usbi_transfer *)(((unsigned char *)(transfer)) \
|
||||
- sizeof(struct usbi_transfer)))
|
||||
|
||||
static inline void *usbi_transfer_get_os_priv(struct usbi_transfer *transfer)
|
||||
{
|
||||
return ((unsigned char *)transfer) + sizeof(struct usbi_transfer)
|
||||
+ sizeof(struct libusb_transfer)
|
||||
+ (transfer->num_iso_packets
|
||||
* sizeof(struct libusb_iso_packet_descriptor));
|
||||
}
|
||||
|
||||
/* bus structures */
|
||||
|
||||
/* All standard descriptors have these 2 fields in common */
|
||||
struct usb_descriptor_header {
|
||||
uint8_t bLength;
|
||||
uint8_t bDescriptorType;
|
||||
};
|
||||
|
||||
/* shared data and functions */
|
||||
|
||||
int usbi_io_init(struct libusb_context *ctx);
|
||||
void usbi_io_exit(struct libusb_context *ctx);
|
||||
|
||||
struct libusb_device *usbi_alloc_device(struct libusb_context *ctx,
|
||||
unsigned long session_id);
|
||||
struct libusb_device *usbi_get_device_by_session_id(struct libusb_context *ctx,
|
||||
unsigned long session_id);
|
||||
int usbi_sanitize_device(struct libusb_device *dev);
|
||||
void usbi_handle_disconnect(struct libusb_device_handle *handle);
|
||||
|
||||
int usbi_handle_transfer_completion(struct usbi_transfer *itransfer,
|
||||
enum libusb_transfer_status status);
|
||||
int usbi_handle_transfer_cancellation(struct usbi_transfer *transfer);
|
||||
|
||||
int usbi_parse_descriptor(unsigned char *source, const char *descriptor,
|
||||
void *dest, int host_endian);
|
||||
int usbi_get_config_index_by_value(struct libusb_device *dev,
|
||||
uint8_t bConfigurationValue, int *idx);
|
||||
|
||||
/* polling */
|
||||
|
||||
struct usbi_pollfd {
|
||||
/* must come first */
|
||||
struct libusb_pollfd pollfd;
|
||||
|
||||
struct list_head list;
|
||||
};
|
||||
|
||||
int usbi_add_pollfd(struct libusb_context *ctx, int fd, short events);
|
||||
void usbi_remove_pollfd(struct libusb_context *ctx, int fd);
|
||||
void usbi_fd_notification(struct libusb_context *ctx);
|
||||
|
||||
/* device discovery */
|
||||
|
||||
/* we traverse usbfs without knowing how many devices we are going to find.
|
||||
* so we create this discovered_devs model which is similar to a linked-list
|
||||
* which grows when required. it can be freed once discovery has completed,
|
||||
* eliminating the need for a list node in the libusb_device structure
|
||||
* itself. */
|
||||
struct discovered_devs {
|
||||
size_t len;
|
||||
size_t capacity;
|
||||
struct libusb_device *devices[0];
|
||||
};
|
||||
|
||||
struct discovered_devs *discovered_devs_append(
|
||||
struct discovered_devs *discdevs, struct libusb_device *dev);
|
||||
|
||||
/* OS abstraction */
|
||||
|
||||
/* This is the interface that OS backends need to implement.
|
||||
* All fields are mandatory, except ones explicitly noted as optional. */
|
||||
struct usbi_os_backend {
|
||||
/* A human-readable name for your backend, e.g. "Linux usbfs" */
|
||||
const char *name;
|
||||
|
||||
/* Perform initialization of your backend. You might use this function
|
||||
* to determine specific capabilities of the system, allocate required
|
||||
* data structures for later, etc.
|
||||
*
|
||||
* This function is called when a libusb user initializes the library
|
||||
* prior to use.
|
||||
*
|
||||
* Return 0 on success, or a LIBUSB_ERROR code on failure.
|
||||
*/
|
||||
int (*init)(struct libusb_context *ctx);
|
||||
|
||||
/* Deinitialization. Optional. This function should destroy anything
|
||||
* that was set up by init.
|
||||
*
|
||||
* This function is called when the user deinitializes the library.
|
||||
*/
|
||||
void (*exit)(void);
|
||||
|
||||
/* Enumerate all the USB devices on the system, returning them in a list
|
||||
* of discovered devices.
|
||||
*
|
||||
* Your implementation should enumerate all devices on the system,
|
||||
* regardless of whether they have been seen before or not.
|
||||
*
|
||||
* When you have found a device, compute a session ID for it. The session
|
||||
* ID should uniquely represent that particular device for that particular
|
||||
* connection session since boot (i.e. if you disconnect and reconnect a
|
||||
* device immediately after, it should be assigned a different session ID).
|
||||
* If your OS cannot provide a unique session ID as described above,
|
||||
* presenting a session ID of (bus_number << 8 | device_address) should
|
||||
* be sufficient. Bus numbers and device addresses wrap and get reused,
|
||||
* but that is an unlikely case.
|
||||
*
|
||||
* After computing a session ID for a device, call
|
||||
* usbi_get_device_by_session_id(). This function checks if libusb already
|
||||
* knows about the device, and if so, it provides you with a libusb_device
|
||||
* structure for it.
|
||||
*
|
||||
* If usbi_get_device_by_session_id() returns NULL, it is time to allocate
|
||||
* a new device structure for the device. Call usbi_alloc_device() to
|
||||
* obtain a new libusb_device structure with reference count 1. Populate
|
||||
* the bus_number and device_address attributes of the new device, and
|
||||
* perform any other internal backend initialization you need to do. At
|
||||
* this point, you should be ready to provide device descriptors and so
|
||||
* on through the get_*_descriptor functions. Finally, call
|
||||
* usbi_sanitize_device() to perform some final sanity checks on the
|
||||
* device. Assuming all of the above succeeded, we can now continue.
|
||||
* If any of the above failed, remember to unreference the device that
|
||||
* was returned by usbi_alloc_device().
|
||||
*
|
||||
* At this stage we have a populated libusb_device structure (either one
|
||||
* that was found earlier, or one that we have just allocated and
|
||||
* populated). This can now be added to the discovered devices list
|
||||
* using discovered_devs_append(). Note that discovered_devs_append()
|
||||
* may reallocate the list, returning a new location for it, and also
|
||||
* note that reallocation can fail. Your backend should handle these
|
||||
* error conditions appropriately.
|
||||
*
|
||||
* This function should not generate any bus I/O and should not block.
|
||||
* If I/O is required (e.g. reading the active configuration value), it is
|
||||
* OK to ignore these suggestions :)
|
||||
*
|
||||
* This function is executed when the user wishes to retrieve a list
|
||||
* of USB devices connected to the system.
|
||||
*
|
||||
* Return 0 on success, or a LIBUSB_ERROR code on failure.
|
||||
*/
|
||||
int (*get_device_list)(struct libusb_context *ctx,
|
||||
struct discovered_devs **discdevs);
|
||||
|
||||
/* Open a device for I/O and other USB operations. The device handle
|
||||
* is preallocated for you, you can retrieve the device in question
|
||||
* through handle->dev.
|
||||
*
|
||||
* Your backend should allocate any internal resources required for I/O
|
||||
* and other operations so that those operations can happen (hopefully)
|
||||
* without hiccup. This is also a good place to inform libusb that it
|
||||
* should monitor certain file descriptors related to this device -
|
||||
* see the usbi_add_pollfd() function.
|
||||
*
|
||||
* This function should not generate any bus I/O and should not block.
|
||||
*
|
||||
* This function is called when the user attempts to obtain a device
|
||||
* handle for a device.
|
||||
*
|
||||
* Return:
|
||||
* - 0 on success
|
||||
* - LIBUSB_ERROR_ACCESS if the user has insufficient permissions
|
||||
* - LIBUSB_ERROR_NO_DEVICE if the device has been disconnected since
|
||||
* discovery
|
||||
* - another LIBUSB_ERROR code on other failure
|
||||
*
|
||||
* Do not worry about freeing the handle on failed open, the upper layers
|
||||
* do this for you.
|
||||
*/
|
||||
int (*open)(struct libusb_device_handle *handle);
|
||||
|
||||
/* Close a device such that the handle cannot be used again. Your backend
|
||||
* should destroy any resources that were allocated in the open path.
|
||||
* This may also be a good place to call usbi_remove_pollfd() to inform
|
||||
* libusb of any file descriptors associated with this device that should
|
||||
* no longer be monitored.
|
||||
*
|
||||
* This function is called when the user closes a device handle.
|
||||
*/
|
||||
void (*close)(struct libusb_device_handle *handle);
|
||||
|
||||
/* Retrieve the device descriptor from a device.
|
||||
*
|
||||
* The descriptor should be retrieved from memory, NOT via bus I/O to the
|
||||
* device. This means that you may have to cache it in a private structure
|
||||
* during get_device_list enumeration. Alternatively, you may be able
|
||||
* to retrieve it from a kernel interface (some Linux setups can do this)
|
||||
* still without generating bus I/O.
|
||||
*
|
||||
* This function is expected to write DEVICE_DESC_LENGTH (18) bytes into
|
||||
* buffer, which is guaranteed to be big enough.
|
||||
*
|
||||
* This function is called when sanity-checking a device before adding
|
||||
* it to the list of discovered devices, and also when the user requests
|
||||
* to read the device descriptor.
|
||||
*
|
||||
* This function is expected to return the descriptor in bus-endian format
|
||||
* (LE). If it returns the multi-byte values in host-endian format,
|
||||
* set the host_endian output parameter to "1".
|
||||
*
|
||||
* Return 0 on success or a LIBUSB_ERROR code on failure.
|
||||
*/
|
||||
int (*get_device_descriptor)(struct libusb_device *device,
|
||||
unsigned char *buffer, int *host_endian);
|
||||
|
||||
/* Get the ACTIVE configuration descriptor for a device.
|
||||
*
|
||||
* The descriptor should be retrieved from memory, NOT via bus I/O to the
|
||||
* device. This means that you may have to cache it in a private structure
|
||||
* during get_device_list enumeration. You may also have to keep track
|
||||
* of which configuration is active when the user changes it.
|
||||
*
|
||||
* This function is expected to write len bytes of data into buffer, which
|
||||
* is guaranteed to be big enough. If you can only do a partial write,
|
||||
* return an error code.
|
||||
*
|
||||
* This function is expected to return the descriptor in bus-endian format
|
||||
* (LE). If it returns the multi-byte values in host-endian format,
|
||||
* set the host_endian output parameter to "1".
|
||||
*
|
||||
* Return:
|
||||
* - 0 on success
|
||||
* - LIBUSB_ERROR_NOT_FOUND if the device is in unconfigured state
|
||||
* - another LIBUSB_ERROR code on other failure
|
||||
*/
|
||||
int (*get_active_config_descriptor)(struct libusb_device *device,
|
||||
unsigned char *buffer, size_t len, int *host_endian);
|
||||
|
||||
/* Get a specific configuration descriptor for a device.
|
||||
*
|
||||
* The descriptor should be retrieved from memory, NOT via bus I/O to the
|
||||
* device. This means that you may have to cache it in a private structure
|
||||
* during get_device_list enumeration.
|
||||
*
|
||||
* The requested descriptor is expressed as a zero-based index (i.e. 0
|
||||
* indicates that we are requesting the first descriptor). The index does
|
||||
* not (necessarily) equal the bConfigurationValue of the configuration
|
||||
* being requested.
|
||||
*
|
||||
* This function is expected to write len bytes of data into buffer, which
|
||||
* is guaranteed to be big enough. If you can only do a partial write,
|
||||
* return an error code.
|
||||
*
|
||||
* This function is expected to return the descriptor in bus-endian format
|
||||
* (LE). If it returns the multi-byte values in host-endian format,
|
||||
* set the host_endian output parameter to "1".
|
||||
*
|
||||
* Return 0 on success or a LIBUSB_ERROR code on failure.
|
||||
*/
|
||||
int (*get_config_descriptor)(struct libusb_device *device,
|
||||
uint8_t config_index, unsigned char *buffer, size_t len,
|
||||
int *host_endian);
|
||||
|
||||
/* Get the bConfigurationValue for the active configuration for a device.
|
||||
* Optional. This should only be implemented if you can retrieve it from
|
||||
* cache (don't generate I/O).
|
||||
*
|
||||
* If you cannot retrieve this from cache, either do not implement this
|
||||
* function, or return LIBUSB_ERROR_NOT_SUPPORTED. This will cause
|
||||
* libusb to retrieve the information through a standard control transfer.
|
||||
*
|
||||
* This function must be non-blocking.
|
||||
* Return:
|
||||
* - 0 on success
|
||||
* - LIBUSB_ERROR_NO_DEVICE if the device has been disconnected since it
|
||||
* was opened
|
||||
* - LIBUSB_ERROR_NOT_SUPPORTED if the value cannot be retrieved without
|
||||
* blocking
|
||||
* - another LIBUSB_ERROR code on other failure.
|
||||
*/
|
||||
int (*get_configuration)(struct libusb_device_handle *handle, int *config);
|
||||
|
||||
/* Set the active configuration for a device.
|
||||
*
|
||||
* A configuration value of -1 should put the device in unconfigured state.
|
||||
*
|
||||
* This function can block.
|
||||
*
|
||||
* Return:
|
||||
* - 0 on success
|
||||
* - LIBUSB_ERROR_NOT_FOUND if the configuration does not exist
|
||||
* - LIBUSB_ERROR_BUSY if interfaces are currently claimed (and hence
|
||||
* configuration cannot be changed)
|
||||
* - LIBUSB_ERROR_NO_DEVICE if the device has been disconnected since it
|
||||
* was opened
|
||||
* - another LIBUSB_ERROR code on other failure.
|
||||
*/
|
||||
int (*set_configuration)(struct libusb_device_handle *handle, int config);
|
||||
|
||||
/* Claim an interface. When claimed, the application can then perform
|
||||
* I/O to an interface's endpoints.
|
||||
*
|
||||
* This function should not generate any bus I/O and should not block.
|
||||
* Interface claiming is a logical operation that simply ensures that
|
||||
* no other drivers/applications are using the interface, and after
|
||||
* claiming, no other drivers/applicatiosn can use the interface because
|
||||
* we now "own" it.
|
||||
*
|
||||
* Return:
|
||||
* - 0 on success
|
||||
* - LIBUSB_ERROR_NOT_FOUND if the interface does not exist
|
||||
* - LIBUSB_ERROR_BUSY if the interface is in use by another driver/app
|
||||
* - LIBUSB_ERROR_NO_DEVICE if the device has been disconnected since it
|
||||
* was opened
|
||||
* - another LIBUSB_ERROR code on other failure
|
||||
*/
|
||||
int (*claim_interface)(struct libusb_device_handle *handle, int interface_number);
|
||||
|
||||
/* Release a previously claimed interface.
|
||||
*
|
||||
* This function should also generate a SET_INTERFACE control request,
|
||||
* resetting the alternate setting of that interface to 0. It's OK for
|
||||
* this function to block as a result.
|
||||
*
|
||||
* You will only ever be asked to release an interface which was
|
||||
* successfully claimed earlier.
|
||||
*
|
||||
* Return:
|
||||
* - 0 on success
|
||||
* - LIBUSB_ERROR_NO_DEVICE if the device has been disconnected since it
|
||||
* was opened
|
||||
* - another LIBUSB_ERROR code on other failure
|
||||
*/
|
||||
int (*release_interface)(struct libusb_device_handle *handle, int interface_number);
|
||||
|
||||
/* Set the alternate setting for an interface.
|
||||
*
|
||||
* You will only ever be asked to set the alternate setting for an
|
||||
* interface which was successfully claimed earlier.
|
||||
*
|
||||
* It's OK for this function to block.
|
||||
*
|
||||
* Return:
|
||||
* - 0 on success
|
||||
* - LIBUSB_ERROR_NOT_FOUND if the alternate setting does not exist
|
||||
* - LIBUSB_ERROR_NO_DEVICE if the device has been disconnected since it
|
||||
* was opened
|
||||
* - another LIBUSB_ERROR code on other failure
|
||||
*/
|
||||
int (*set_interface_altsetting)(struct libusb_device_handle *handle,
|
||||
int interface_number, int altsetting);
|
||||
|
||||
/* Clear a halt/stall condition on an endpoint.
|
||||
*
|
||||
* It's OK for this function to block.
|
||||
*
|
||||
* Return:
|
||||
* - 0 on success
|
||||
* - LIBUSB_ERROR_NOT_FOUND if the endpoint does not exist
|
||||
* - LIBUSB_ERROR_NO_DEVICE if the device has been disconnected since it
|
||||
* was opened
|
||||
* - another LIBUSB_ERROR code on other failure
|
||||
*/
|
||||
int (*clear_halt)(struct libusb_device_handle *handle,
|
||||
unsigned char endpoint);
|
||||
|
||||
/* Perform a USB port reset to reinitialize a device.
|
||||
*
|
||||
* If possible, the handle should still be usable after the reset
|
||||
* completes, assuming that the device descriptors did not change during
|
||||
* reset and all previous interface state can be restored.
|
||||
*
|
||||
* If something changes, or you cannot easily locate/verify the resetted
|
||||
* device, return LIBUSB_ERROR_NOT_FOUND. This prompts the application
|
||||
* to close the old handle and re-enumerate the device.
|
||||
*
|
||||
* Return:
|
||||
* - 0 on success
|
||||
* - LIBUSB_ERROR_NOT_FOUND if re-enumeration is required, or if the device
|
||||
* has been disconnected since it was opened
|
||||
* - another LIBUSB_ERROR code on other failure
|
||||
*/
|
||||
int (*reset_device)(struct libusb_device_handle *handle);
|
||||
|
||||
/* Determine if a kernel driver is active on an interface. Optional.
|
||||
*
|
||||
* The presence of a kernel driver on an interface indicates that any
|
||||
* calls to claim_interface would fail with the LIBUSB_ERROR_BUSY code.
|
||||
*
|
||||
* Return:
|
||||
* - 0 if no driver is active
|
||||
* - 1 if a driver is active
|
||||
* - LIBUSB_ERROR_NO_DEVICE if the device has been disconnected since it
|
||||
* was opened
|
||||
* - another LIBUSB_ERROR code on other failure
|
||||
*/
|
||||
int (*kernel_driver_active)(struct libusb_device_handle *handle,
|
||||
int interface_number);
|
||||
|
||||
/* Detach a kernel driver from an interface. Optional.
|
||||
*
|
||||
* After detaching a kernel driver, the interface should be available
|
||||
* for claim.
|
||||
*
|
||||
* Return:
|
||||
* - 0 on success
|
||||
* - LIBUSB_ERROR_NOT_FOUND if no kernel driver was active
|
||||
* - LIBUSB_ERROR_INVALID_PARAM if the interface does not exist
|
||||
* - LIBUSB_ERROR_NO_DEVICE if the device has been disconnected since it
|
||||
* was opened
|
||||
* - another LIBUSB_ERROR code on other failure
|
||||
*/
|
||||
int (*detach_kernel_driver)(struct libusb_device_handle *handle,
|
||||
int interface_number);
|
||||
|
||||
/* Attach a kernel driver to an interface. Optional.
|
||||
*
|
||||
* Reattach a kernel driver to the device.
|
||||
*
|
||||
* Return:
|
||||
* - 0 on success
|
||||
* - LIBUSB_ERROR_NOT_FOUND if no kernel driver was active
|
||||
* - LIBUSB_ERROR_INVALID_PARAM if the interface does not exist
|
||||
* - LIBUSB_ERROR_NO_DEVICE if the device has been disconnected since it
|
||||
* was opened
|
||||
* - LIBUSB_ERROR_BUSY if a program or driver has claimed the interface,
|
||||
* preventing reattachment
|
||||
* - another LIBUSB_ERROR code on other failure
|
||||
*/
|
||||
int (*attach_kernel_driver)(struct libusb_device_handle *handle,
|
||||
int interface_number);
|
||||
|
||||
/* Destroy a device. Optional.
|
||||
*
|
||||
* This function is called when the last reference to a device is
|
||||
* destroyed. It should free any resources allocated in the get_device_list
|
||||
* path.
|
||||
*/
|
||||
void (*destroy_device)(struct libusb_device *dev);
|
||||
|
||||
/* Submit a transfer. Your implementation should take the transfer,
|
||||
* morph it into whatever form your platform requires, and submit it
|
||||
* asynchronously.
|
||||
*
|
||||
* This function must not block.
|
||||
*
|
||||
* Return:
|
||||
* - 0 on success
|
||||
* - LIBUSB_ERROR_NO_DEVICE if the device has been disconnected
|
||||
* - another LIBUSB_ERROR code on other failure
|
||||
*/
|
||||
int (*submit_transfer)(struct usbi_transfer *itransfer);
|
||||
|
||||
/* Cancel a previously submitted transfer.
|
||||
*
|
||||
* This function must not block. The transfer cancellation must complete
|
||||
* later, resulting in a call to usbi_handle_transfer_cancellation()
|
||||
* from the context of handle_events.
|
||||
*/
|
||||
int (*cancel_transfer)(struct usbi_transfer *itransfer);
|
||||
|
||||
/* Clear a transfer as if it has completed or cancelled, but do not
|
||||
* report any completion/cancellation to the library. You should free
|
||||
* all private data from the transfer as if you were just about to report
|
||||
* completion or cancellation.
|
||||
*
|
||||
* This function might seem a bit out of place. It is used when libusb
|
||||
* detects a disconnected device - it calls this function for all pending
|
||||
* transfers before reporting completion (with the disconnect code) to
|
||||
* the user. Maybe we can improve upon this internal interface in future.
|
||||
*/
|
||||
void (*clear_transfer_priv)(struct usbi_transfer *itransfer);
|
||||
|
||||
/* Handle any pending events. This involves monitoring any active
|
||||
* transfers and processing their completion or cancellation.
|
||||
*
|
||||
* The function is passed an array of pollfd structures (size nfds)
|
||||
* as a result of the poll() system call. The num_ready parameter
|
||||
* indicates the number of file descriptors that have reported events
|
||||
* (i.e. the poll() return value). This should be enough information
|
||||
* for you to determine which actions need to be taken on the currently
|
||||
* active transfers.
|
||||
*
|
||||
* For any cancelled transfers, call usbi_handle_transfer_cancellation().
|
||||
* For completed transfers, call usbi_handle_transfer_completion().
|
||||
* For control/bulk/interrupt transfers, populate the "transferred"
|
||||
* element of the appropriate usbi_transfer structure before calling the
|
||||
* above functions. For isochronous transfers, populate the status and
|
||||
* transferred fields of the iso packet descriptors of the transfer.
|
||||
*
|
||||
* This function should also be able to detect disconnection of the
|
||||
* device, reporting that situation with usbi_handle_disconnect().
|
||||
*
|
||||
* When processing an event related to a transfer, you probably want to
|
||||
* take usbi_transfer.lock to prevent races. See the documentation for
|
||||
* the usbi_transfer structure.
|
||||
*
|
||||
* Return 0 on success, or a LIBUSB_ERROR code on failure.
|
||||
*/
|
||||
int (*handle_events)(struct libusb_context *ctx,
|
||||
struct pollfd *fds, POLL_NFDS_TYPE nfds, int num_ready);
|
||||
|
||||
/* Get time from specified clock. At least two clocks must be implemented
|
||||
by the backend: USBI_CLOCK_REALTIME, and USBI_CLOCK_MONOTONIC.
|
||||
|
||||
Description of clocks:
|
||||
USBI_CLOCK_REALTIME : clock returns time since system epoch.
|
||||
USBI_CLOCK_MONOTONIC: clock returns time since unspecified start
|
||||
time (usually boot).
|
||||
*/
|
||||
int (*clock_gettime)(int clkid, struct timespec *tp);
|
||||
|
||||
#ifdef USBI_TIMERFD_AVAILABLE
|
||||
/* clock ID of the clock that should be used for timerfd */
|
||||
clockid_t (*get_timerfd_clockid)(void);
|
||||
#endif
|
||||
|
||||
/* Number of bytes to reserve for per-device private backend data.
|
||||
* This private data area is accessible through the "os_priv" field of
|
||||
* struct libusb_device. */
|
||||
size_t device_priv_size;
|
||||
|
||||
/* Number of bytes to reserve for per-handle private backend data.
|
||||
* This private data area is accessible through the "os_priv" field of
|
||||
* struct libusb_device. */
|
||||
size_t device_handle_priv_size;
|
||||
|
||||
/* Number of bytes to reserve for per-transfer private backend data.
|
||||
* This private data area is accessible by calling
|
||||
* usbi_transfer_get_os_priv() on the appropriate usbi_transfer instance.
|
||||
*/
|
||||
size_t transfer_priv_size;
|
||||
|
||||
/* Mumber of additional bytes for os_priv for each iso packet.
|
||||
* Can your backend use this? */
|
||||
/* FIXME: linux can't use this any more. if other OS's cannot either,
|
||||
* then remove this */
|
||||
size_t add_iso_packet_size;
|
||||
};
|
||||
|
||||
extern const struct usbi_os_backend * const usbi_backend;
|
||||
|
||||
extern const struct usbi_os_backend linux_usbfs_backend;
|
||||
extern const struct usbi_os_backend darwin_backend;
|
||||
extern const struct usbi_os_backend openbsd_backend;
|
||||
extern const struct usbi_os_backend windows_backend;
|
||||
|
||||
#endif
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,169 @@
|
|||
/*
|
||||
* darwin backend for libusb 1.0
|
||||
* Copyright (C) 2008-2009 Nathan Hjelm <hjelmn@users.sourceforge.net>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#if !defined(LIBUSB_DARWIN_H)
|
||||
#define LIBUSB_DARWIN_H
|
||||
|
||||
#include "libusbi.h"
|
||||
|
||||
#include <IOKit/IOTypes.h>
|
||||
#include <IOKit/IOCFBundle.h>
|
||||
#include <IOKit/usb/IOUSBLib.h>
|
||||
#include <IOKit/IOCFPlugIn.h>
|
||||
|
||||
/* IOUSBInterfaceInferface */
|
||||
#if defined (kIOUSBInterfaceInterfaceID300)
|
||||
|
||||
#define usb_interface_t IOUSBInterfaceInterface300
|
||||
#define InterfaceInterfaceID kIOUSBInterfaceInterfaceID300
|
||||
#define InterfaceVersion 300
|
||||
|
||||
#elif defined (kIOUSBInterfaceInterfaceID245)
|
||||
|
||||
#define usb_interface_t IOUSBInterfaceInterface245
|
||||
#define InterfaceInterfaceID kIOUSBInterfaceInterfaceID245
|
||||
#define InterfaceVersion 245
|
||||
|
||||
#elif defined (kIOUSBInterfaceInterfaceID220)
|
||||
|
||||
#define usb_interface_t IOUSBInterfaceInterface220
|
||||
#define InterfaceInterfaceID kIOUSBInterfaceInterfaceID220
|
||||
#define InterfaceVersion 220
|
||||
|
||||
#elif defined (kIOUSBInterfaceInterfaceID197)
|
||||
|
||||
#define usb_interface_t IOUSBInterfaceInterface197
|
||||
#define InterfaceInterfaceID kIOUSBInterfaceInterfaceID197
|
||||
#define InterfaceVersion 197
|
||||
|
||||
#elif defined (kIOUSBInterfaceInterfaceID190)
|
||||
|
||||
#define usb_interface_t IOUSBInterfaceInterface190
|
||||
#define InterfaceInterfaceID kIOUSBInterfaceInterfaceID190
|
||||
#define InterfaceVersion 190
|
||||
|
||||
#elif defined (kIOUSBInterfaceInterfaceID182)
|
||||
|
||||
#define usb_interface_t IOUSBInterfaceInterface182
|
||||
#define InterfaceInterfaceID kIOUSBInterfaceInterfaceID182
|
||||
#define InterfaceVersion 182
|
||||
|
||||
#else
|
||||
|
||||
#error "IOUSBFamily is too old. Please upgrade your OS"
|
||||
|
||||
#endif
|
||||
|
||||
/* IOUSBDeviceInterface */
|
||||
#if defined (kIOUSBDeviceInterfaceID320)
|
||||
|
||||
#define usb_device_t IOUSBDeviceInterface320
|
||||
#define DeviceInterfaceID kIOUSBDeviceInterfaceID320
|
||||
#define DeviceVersion 320
|
||||
|
||||
#elif defined (kIOUSBDeviceInterfaceID300)
|
||||
|
||||
#define usb_device_t IOUSBDeviceInterface300
|
||||
#define DeviceInterfaceID kIOUSBDeviceInterfaceID300
|
||||
#define DeviceVersion 300
|
||||
|
||||
#elif defined (kIOUSBDeviceInterfaceID245)
|
||||
|
||||
#define usb_device_t IOUSBDeviceInterface245
|
||||
#define DeviceInterfaceID kIOUSBDeviceInterfaceID245
|
||||
#define DeviceVersion 245
|
||||
|
||||
#elif defined (kIOUSBDeviceInterfaceID197)
|
||||
|
||||
#define usb_device_t IOUSBDeviceInterface197
|
||||
#define DeviceInterfaceID kIOUSBDeviceInterfaceID197
|
||||
#define DeviceVersion 197
|
||||
|
||||
#elif defined (kIOUSBDeviceInterfaceID187)
|
||||
|
||||
#define usb_device_t IOUSBDeviceInterface187
|
||||
#define DeviceInterfaceID kIOUSBDeviceInterfaceID187
|
||||
#define DeviceVersion 187
|
||||
|
||||
#elif defined (kIOUSBDeviceInterfaceID182)
|
||||
|
||||
#define usb_device_t IOUSBDeviceInterface182
|
||||
#define DeviceInterfaceID kIOUSBDeviceInterfaceID182
|
||||
#define DeviceVersion 182
|
||||
|
||||
#else
|
||||
|
||||
#error "IOUSBFamily is too old. Please upgrade your OS"
|
||||
|
||||
#endif
|
||||
|
||||
#if !defined(IO_OBJECT_NULL)
|
||||
#define IO_OBJECT_NULL ((io_object_t) 0)
|
||||
#endif
|
||||
|
||||
typedef IOCFPlugInInterface *io_cf_plugin_ref_t;
|
||||
typedef IONotificationPortRef io_notification_port_t;
|
||||
|
||||
/* private structures */
|
||||
struct darwin_device_priv {
|
||||
IOUSBDeviceDescriptor dev_descriptor;
|
||||
UInt32 location;
|
||||
char sys_path[21];
|
||||
usb_device_t **device;
|
||||
int open_count;
|
||||
UInt8 first_config, active_config;
|
||||
};
|
||||
|
||||
struct darwin_device_handle_priv {
|
||||
int is_open;
|
||||
CFRunLoopSourceRef cfSource;
|
||||
int fds[2];
|
||||
|
||||
struct darwin_interface {
|
||||
usb_interface_t **interface;
|
||||
uint8_t num_endpoints;
|
||||
CFRunLoopSourceRef cfSource;
|
||||
uint64_t frames[256];
|
||||
uint8_t endpoint_addrs[USB_MAXENDPOINTS];
|
||||
} interfaces[USB_MAXINTERFACES];
|
||||
};
|
||||
|
||||
struct darwin_transfer_priv {
|
||||
/* Isoc */
|
||||
IOUSBIsocFrame *isoc_framelist;
|
||||
size_t num_iso_packets;
|
||||
|
||||
/* Control */
|
||||
#if !defined (LIBUSB_NO_TIMEOUT_DEVICE)
|
||||
IOUSBDevRequestTO req;
|
||||
#else
|
||||
IOUSBDevRequest req;
|
||||
#endif
|
||||
|
||||
/* Bulk */
|
||||
};
|
||||
|
||||
enum {
|
||||
MESSAGE_DEVICE_GONE,
|
||||
MESSAGE_ASYNC_IO_COMPLETE
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,139 @@
|
|||
/*
|
||||
* usbfs header structures
|
||||
* Copyright (C) 2007 Daniel Drake <dsd@gentoo.org>
|
||||
* Copyright (c) 2001 Johannes Erdfelt <johannes@erdfelt.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef LIBUSB_USBFS_H
|
||||
#define LIBUSB_USBFS_H
|
||||
|
||||
#define SYSFS_DEVICE_PATH "/sys/bus/usb/devices"
|
||||
|
||||
struct usbfs_ctrltransfer {
|
||||
/* keep in sync with usbdevice_fs.h:usbdevfs_ctrltransfer */
|
||||
uint8_t bmRequestType;
|
||||
uint8_t bRequest;
|
||||
uint16_t wValue;
|
||||
uint16_t wIndex;
|
||||
uint16_t wLength;
|
||||
|
||||
uint32_t timeout; /* in milliseconds */
|
||||
|
||||
/* pointer to data */
|
||||
void *data;
|
||||
};
|
||||
|
||||
struct usbfs_bulktransfer {
|
||||
/* keep in sync with usbdevice_fs.h:usbdevfs_bulktransfer */
|
||||
unsigned int ep;
|
||||
unsigned int len;
|
||||
unsigned int timeout; /* in milliseconds */
|
||||
|
||||
/* pointer to data */
|
||||
void *data;
|
||||
};
|
||||
|
||||
struct usbfs_setinterface {
|
||||
/* keep in sync with usbdevice_fs.h:usbdevfs_setinterface */
|
||||
unsigned int interface;
|
||||
unsigned int altsetting;
|
||||
};
|
||||
|
||||
#define USBFS_MAXDRIVERNAME 255
|
||||
|
||||
struct usbfs_getdriver {
|
||||
unsigned int interface;
|
||||
char driver[USBFS_MAXDRIVERNAME + 1];
|
||||
};
|
||||
|
||||
#define USBFS_URB_SHORT_NOT_OK 0x01
|
||||
#define USBFS_URB_ISO_ASAP 0x02
|
||||
#define USBFS_URB_BULK_CONTINUATION 0x04
|
||||
#define USBFS_URB_QUEUE_BULK 0x10
|
||||
#define USBFS_URB_ZERO_PACKET 0x40
|
||||
|
||||
enum usbfs_urb_type {
|
||||
USBFS_URB_TYPE_ISO = 0,
|
||||
USBFS_URB_TYPE_INTERRUPT = 1,
|
||||
USBFS_URB_TYPE_CONTROL = 2,
|
||||
USBFS_URB_TYPE_BULK = 3,
|
||||
};
|
||||
|
||||
struct usbfs_iso_packet_desc {
|
||||
unsigned int length;
|
||||
unsigned int actual_length;
|
||||
unsigned int status;
|
||||
};
|
||||
|
||||
#define MAX_ISO_BUFFER_LENGTH 32768
|
||||
#define MAX_BULK_BUFFER_LENGTH 16384
|
||||
#define MAX_CTRL_BUFFER_LENGTH 4096
|
||||
|
||||
struct usbfs_urb {
|
||||
unsigned char type;
|
||||
unsigned char endpoint;
|
||||
int status;
|
||||
unsigned int flags;
|
||||
void *buffer;
|
||||
int buffer_length;
|
||||
int actual_length;
|
||||
int start_frame;
|
||||
int number_of_packets;
|
||||
int error_count;
|
||||
unsigned int signr;
|
||||
void *usercontext;
|
||||
struct usbfs_iso_packet_desc iso_frame_desc[0];
|
||||
};
|
||||
|
||||
struct usbfs_connectinfo {
|
||||
unsigned int devnum;
|
||||
unsigned char slow;
|
||||
};
|
||||
|
||||
struct usbfs_ioctl {
|
||||
int ifno; /* interface 0..N ; negative numbers reserved */
|
||||
int ioctl_code; /* MUST encode size + direction of data so the
|
||||
* macros in <asm/ioctl.h> give correct values */
|
||||
void *data; /* param buffer (in, or out) */
|
||||
};
|
||||
|
||||
struct usbfs_hub_portinfo {
|
||||
unsigned char numports;
|
||||
unsigned char port[127]; /* port to device num mapping */
|
||||
};
|
||||
|
||||
#define IOCTL_USBFS_CONTROL _IOWR('U', 0, struct usbfs_ctrltransfer)
|
||||
#define IOCTL_USBFS_BULK _IOWR('U', 2, struct usbfs_bulktransfer)
|
||||
#define IOCTL_USBFS_RESETEP _IOR('U', 3, unsigned int)
|
||||
#define IOCTL_USBFS_SETINTF _IOR('U', 4, struct usbfs_setinterface)
|
||||
#define IOCTL_USBFS_SETCONFIG _IOR('U', 5, unsigned int)
|
||||
#define IOCTL_USBFS_GETDRIVER _IOW('U', 8, struct usbfs_getdriver)
|
||||
#define IOCTL_USBFS_SUBMITURB _IOR('U', 10, struct usbfs_urb)
|
||||
#define IOCTL_USBFS_DISCARDURB _IO('U', 11)
|
||||
#define IOCTL_USBFS_REAPURB _IOW('U', 12, void *)
|
||||
#define IOCTL_USBFS_REAPURBNDELAY _IOW('U', 13, void *)
|
||||
#define IOCTL_USBFS_CLAIMINTF _IOR('U', 15, unsigned int)
|
||||
#define IOCTL_USBFS_RELEASEINTF _IOR('U', 16, unsigned int)
|
||||
#define IOCTL_USBFS_CONNECTINFO _IOW('U', 17, struct usbfs_connectinfo)
|
||||
#define IOCTL_USBFS_IOCTL _IOWR('U', 18, struct usbfs_ioctl)
|
||||
#define IOCTL_USBFS_HUB_PORTINFO _IOR('U', 19, struct usbfs_hub_portinfo)
|
||||
#define IOCTL_USBFS_RESET _IO('U', 20)
|
||||
#define IOCTL_USBFS_CLEAR_HALT _IOR('U', 21, unsigned int)
|
||||
#define IOCTL_USBFS_DISCONNECT _IO('U', 22)
|
||||
#define IOCTL_USBFS_CONNECT _IO('U', 23)
|
||||
|
||||
#endif
|
|
@ -0,0 +1,727 @@
|
|||
/*
|
||||
* Copyright (c) 2011 Martin Pieuchot <mpi@openbsd.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <dev/usb/usb.h>
|
||||
|
||||
#include "libusb.h"
|
||||
#include "libusbi.h"
|
||||
|
||||
struct device_priv {
|
||||
char devnode[16];
|
||||
int fd;
|
||||
|
||||
unsigned char *cdesc; /* active config descriptor */
|
||||
usb_device_descriptor_t ddesc; /* usb device descriptor */
|
||||
};
|
||||
|
||||
struct handle_priv {
|
||||
int pipe[2]; /* for event notification */
|
||||
int endpoints[USB_MAX_ENDPOINTS];
|
||||
};
|
||||
|
||||
/*
|
||||
* Backend functions
|
||||
*/
|
||||
static int obsd_get_device_list(struct libusb_context *,
|
||||
struct discovered_devs **);
|
||||
static int obsd_open(struct libusb_device_handle *);
|
||||
static void obsd_close(struct libusb_device_handle *);
|
||||
|
||||
static int obsd_get_device_descriptor(struct libusb_device *, unsigned char *,
|
||||
int *);
|
||||
static int obsd_get_active_config_descriptor(struct libusb_device *,
|
||||
unsigned char *, size_t, int *);
|
||||
static int obsd_get_config_descriptor(struct libusb_device *, uint8_t,
|
||||
unsigned char *, size_t, int *);
|
||||
|
||||
static int obsd_get_configuration(struct libusb_device_handle *, int *);
|
||||
static int obsd_set_configuration(struct libusb_device_handle *, int);
|
||||
|
||||
static int obsd_claim_interface(struct libusb_device_handle *, int);
|
||||
static int obsd_release_interface(struct libusb_device_handle *, int);
|
||||
|
||||
static int obsd_set_interface_altsetting(struct libusb_device_handle *, int,
|
||||
int);
|
||||
static int obsd_clear_halt(struct libusb_device_handle *, unsigned char);
|
||||
static int obsd_reset_device(struct libusb_device_handle *);
|
||||
static void obsd_destroy_device(struct libusb_device *);
|
||||
|
||||
static int obsd_submit_transfer(struct usbi_transfer *);
|
||||
static int obsd_cancel_transfer(struct usbi_transfer *);
|
||||
static void obsd_clear_transfer_priv(struct usbi_transfer *);
|
||||
static int obsd_handle_events(struct libusb_context *ctx, struct pollfd *,
|
||||
nfds_t, int);
|
||||
static int obsd_clock_gettime(int, struct timespec *);
|
||||
|
||||
/*
|
||||
* Private functions
|
||||
*/
|
||||
static int _errno_to_libusb(int);
|
||||
static int _cache_active_config_descriptor(struct libusb_device *, int);
|
||||
static int _sync_control_transfer(struct usbi_transfer *);
|
||||
static int _sync_gen_transfer(struct usbi_transfer *);
|
||||
static int _access_endpoint(struct libusb_transfer *);
|
||||
|
||||
const struct usbi_os_backend openbsd_backend = {
|
||||
"Synchronous OpenBSD backend",
|
||||
NULL, /* init() */
|
||||
NULL, /* exit() */
|
||||
obsd_get_device_list,
|
||||
obsd_open,
|
||||
obsd_close,
|
||||
|
||||
obsd_get_device_descriptor,
|
||||
obsd_get_active_config_descriptor,
|
||||
obsd_get_config_descriptor,
|
||||
|
||||
obsd_get_configuration,
|
||||
obsd_set_configuration,
|
||||
|
||||
obsd_claim_interface,
|
||||
obsd_release_interface,
|
||||
|
||||
obsd_set_interface_altsetting,
|
||||
obsd_clear_halt,
|
||||
obsd_reset_device,
|
||||
|
||||
NULL, /* kernel_driver_active() */
|
||||
NULL, /* detach_kernel_driver() */
|
||||
NULL, /* attach_kernel_driver() */
|
||||
|
||||
obsd_destroy_device,
|
||||
|
||||
obsd_submit_transfer,
|
||||
obsd_cancel_transfer,
|
||||
obsd_clear_transfer_priv,
|
||||
|
||||
obsd_handle_events,
|
||||
|
||||
obsd_clock_gettime,
|
||||
sizeof(struct device_priv),
|
||||
sizeof(struct handle_priv),
|
||||
0, /* transfer_priv_size */
|
||||
0, /* add_iso_packet_size */
|
||||
};
|
||||
|
||||
int
|
||||
obsd_get_device_list(struct libusb_context * ctx,
|
||||
struct discovered_devs **discdevs)
|
||||
{
|
||||
struct libusb_device *dev;
|
||||
struct device_priv *dpriv;
|
||||
struct usb_device_info di;
|
||||
unsigned long session_id;
|
||||
char devnode[16];
|
||||
int fd, err, i;
|
||||
|
||||
usbi_dbg("");
|
||||
|
||||
/* Only ugen(4) is supported */
|
||||
for (i = 0; i < USB_MAX_DEVICES; i++) {
|
||||
/* Control endpoint is always .00 */
|
||||
snprintf(devnode, sizeof(devnode), "/dev/ugen%d.00", i);
|
||||
|
||||
if ((fd = open(devnode, O_RDONLY)) < 0) {
|
||||
if (errno != ENOENT && errno != ENXIO)
|
||||
usbi_err(ctx, "could not open %s", devnode);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ioctl(fd, USB_GET_DEVICEINFO, &di) < 0)
|
||||
continue;
|
||||
|
||||
session_id = (di.udi_bus << 8 | di.udi_addr);
|
||||
dev = usbi_get_device_by_session_id(ctx, session_id);
|
||||
|
||||
if (dev == NULL) {
|
||||
dev = usbi_alloc_device(ctx, session_id);
|
||||
if (dev == NULL)
|
||||
return (LIBUSB_ERROR_NO_MEM);
|
||||
|
||||
dev->bus_number = di.udi_bus;
|
||||
dev->device_address = di.udi_addr;
|
||||
dev->speed = di.udi_speed;
|
||||
|
||||
dpriv = (struct device_priv *)dev->os_priv;
|
||||
strlcpy(dpriv->devnode, devnode, sizeof(devnode));
|
||||
dpriv->fd = -1;
|
||||
|
||||
if (ioctl(fd, USB_GET_DEVICE_DESC, &dpriv->ddesc) < 0) {
|
||||
err = errno;
|
||||
goto error;
|
||||
}
|
||||
|
||||
dpriv->cdesc = NULL;
|
||||
if (_cache_active_config_descriptor(dev, fd)) {
|
||||
err = errno;
|
||||
goto error;
|
||||
}
|
||||
|
||||
if ((err = usbi_sanitize_device(dev)))
|
||||
goto error;
|
||||
}
|
||||
close(fd);
|
||||
|
||||
if (discovered_devs_append(*discdevs, dev) == NULL)
|
||||
return (LIBUSB_ERROR_NO_MEM);
|
||||
}
|
||||
|
||||
return (LIBUSB_SUCCESS);
|
||||
|
||||
error:
|
||||
close(fd);
|
||||
libusb_unref_device(dev);
|
||||
return _errno_to_libusb(err);
|
||||
}
|
||||
|
||||
int
|
||||
obsd_open(struct libusb_device_handle *handle)
|
||||
{
|
||||
struct handle_priv *hpriv = (struct handle_priv *)handle->os_priv;
|
||||
struct device_priv *dpriv = (struct device_priv *)handle->dev->os_priv;
|
||||
|
||||
dpriv->fd = open(dpriv->devnode, O_RDWR);
|
||||
if (dpriv->fd < 0) {
|
||||
dpriv->fd = open(dpriv->devnode, O_RDONLY);
|
||||
if (dpriv->fd < 0)
|
||||
return _errno_to_libusb(errno);
|
||||
}
|
||||
|
||||
usbi_dbg("open %s: fd %d", dpriv->devnode, dpriv->fd);
|
||||
|
||||
if (pipe(hpriv->pipe) < 0)
|
||||
return _errno_to_libusb(errno);
|
||||
|
||||
return usbi_add_pollfd(HANDLE_CTX(handle), hpriv->pipe[0], POLLIN);
|
||||
}
|
||||
|
||||
void
|
||||
obsd_close(struct libusb_device_handle *handle)
|
||||
{
|
||||
struct handle_priv *hpriv = (struct handle_priv *)handle->os_priv;
|
||||
struct device_priv *dpriv = (struct device_priv *)handle->dev->os_priv;
|
||||
|
||||
usbi_dbg("close: fd %d", dpriv->fd);
|
||||
|
||||
close(dpriv->fd);
|
||||
dpriv->fd = -1;
|
||||
|
||||
usbi_remove_pollfd(HANDLE_CTX(handle), hpriv->pipe[0]);
|
||||
|
||||
close(hpriv->pipe[0]);
|
||||
close(hpriv->pipe[1]);
|
||||
}
|
||||
|
||||
int
|
||||
obsd_get_device_descriptor(struct libusb_device *dev, unsigned char *buf,
|
||||
int *host_endian)
|
||||
{
|
||||
struct device_priv *dpriv = (struct device_priv *)dev->os_priv;
|
||||
|
||||
usbi_dbg("");
|
||||
|
||||
memcpy(buf, &dpriv->ddesc, DEVICE_DESC_LENGTH);
|
||||
|
||||
*host_endian = 0;
|
||||
|
||||
return (LIBUSB_SUCCESS);
|
||||
}
|
||||
|
||||
int
|
||||
obsd_get_active_config_descriptor(struct libusb_device *dev,
|
||||
unsigned char *buf, size_t len, int *host_endian)
|
||||
{
|
||||
struct device_priv *dpriv = (struct device_priv *)dev->os_priv;
|
||||
usb_config_descriptor_t *ucd;
|
||||
|
||||
ucd = (usb_config_descriptor_t *) dpriv->cdesc;
|
||||
len = MIN(len, UGETW(ucd->wTotalLength));
|
||||
|
||||
usbi_dbg("len %d", len);
|
||||
|
||||
memcpy(buf, dpriv->cdesc, len);
|
||||
|
||||
*host_endian = 0;
|
||||
|
||||
return (LIBUSB_SUCCESS);
|
||||
}
|
||||
|
||||
int
|
||||
obsd_get_config_descriptor(struct libusb_device *dev, uint8_t idx,
|
||||
unsigned char *buf, size_t len, int *host_endian)
|
||||
{
|
||||
struct device_priv *dpriv = (struct device_priv *)dev->os_priv;
|
||||
struct usb_full_desc ufd;
|
||||
int fd, err;
|
||||
|
||||
usbi_dbg("index %d, len %d", idx, len);
|
||||
|
||||
/* A config descriptor may be requested before opening the device */
|
||||
if (dpriv->fd >= 0) {
|
||||
fd = dpriv->fd;
|
||||
} else {
|
||||
fd = open(dpriv->devnode, O_RDONLY);
|
||||
if (fd < 0)
|
||||
return _errno_to_libusb(errno);
|
||||
}
|
||||
|
||||
ufd.ufd_config_index = idx;
|
||||
ufd.ufd_size = len;
|
||||
ufd.ufd_data = buf;
|
||||
|
||||
if ((ioctl(fd, USB_GET_FULL_DESC, &ufd)) < 0) {
|
||||
err = errno;
|
||||
if (dpriv->fd < 0)
|
||||
close(fd);
|
||||
return _errno_to_libusb(err);
|
||||
}
|
||||
|
||||
if (dpriv->fd < 0)
|
||||
close(fd);
|
||||
|
||||
*host_endian = 0;
|
||||
|
||||
return (LIBUSB_SUCCESS);
|
||||
}
|
||||
|
||||
int
|
||||
obsd_get_configuration(struct libusb_device_handle *handle, int *config)
|
||||
{
|
||||
struct device_priv *dpriv = (struct device_priv *)handle->dev->os_priv;
|
||||
|
||||
usbi_dbg("");
|
||||
|
||||
if (ioctl(dpriv->fd, USB_GET_CONFIG, config) < 0)
|
||||
return _errno_to_libusb(errno);
|
||||
|
||||
usbi_dbg("configuration %d", *config);
|
||||
|
||||
return (LIBUSB_SUCCESS);
|
||||
}
|
||||
|
||||
int
|
||||
obsd_set_configuration(struct libusb_device_handle *handle, int config)
|
||||
{
|
||||
struct device_priv *dpriv = (struct device_priv *)handle->dev->os_priv;
|
||||
|
||||
usbi_dbg("configuration %d", config);
|
||||
|
||||
if (ioctl(dpriv->fd, USB_SET_CONFIG, &config) < 0)
|
||||
return _errno_to_libusb(errno);
|
||||
|
||||
return _cache_active_config_descriptor(handle->dev, dpriv->fd);
|
||||
}
|
||||
|
||||
int
|
||||
obsd_claim_interface(struct libusb_device_handle *handle, int iface)
|
||||
{
|
||||
struct handle_priv *hpriv = (struct handle_priv *)handle->os_priv;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < USB_MAX_ENDPOINTS; i++)
|
||||
hpriv->endpoints[i] = -1;
|
||||
|
||||
return (LIBUSB_SUCCESS);
|
||||
}
|
||||
|
||||
int
|
||||
obsd_release_interface(struct libusb_device_handle *handle, int iface)
|
||||
{
|
||||
struct handle_priv *hpriv = (struct handle_priv *)handle->os_priv;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < USB_MAX_ENDPOINTS; i++)
|
||||
if (hpriv->endpoints[i] >= 0)
|
||||
close(hpriv->endpoints[i]);
|
||||
|
||||
return (LIBUSB_SUCCESS);
|
||||
}
|
||||
|
||||
int
|
||||
obsd_set_interface_altsetting(struct libusb_device_handle *handle, int iface,
|
||||
int altsetting)
|
||||
{
|
||||
struct device_priv *dpriv = (struct device_priv *)handle->dev->os_priv;
|
||||
struct usb_alt_interface intf;
|
||||
|
||||
usbi_dbg("iface %d, setting %d", iface, altsetting);
|
||||
|
||||
memset(&intf, 0, sizeof(intf));
|
||||
|
||||
intf.uai_interface_index = iface;
|
||||
intf.uai_alt_no = altsetting;
|
||||
|
||||
if (ioctl(dpriv->fd, USB_SET_ALTINTERFACE, &intf) < 0)
|
||||
return _errno_to_libusb(errno);
|
||||
|
||||
return (LIBUSB_SUCCESS);
|
||||
}
|
||||
|
||||
int
|
||||
obsd_clear_halt(struct libusb_device_handle *handle, unsigned char endpoint)
|
||||
{
|
||||
struct device_priv *dpriv = (struct device_priv *)handle->dev->os_priv;
|
||||
struct usb_ctl_request req;
|
||||
|
||||
usbi_dbg("");
|
||||
|
||||
req.ucr_request.bmRequestType = UT_WRITE_ENDPOINT;
|
||||
req.ucr_request.bRequest = UR_CLEAR_FEATURE;
|
||||
USETW(req.ucr_request.wValue, UF_ENDPOINT_HALT);
|
||||
USETW(req.ucr_request.wIndex, endpoint);
|
||||
USETW(req.ucr_request.wLength, 0);
|
||||
|
||||
if (ioctl(dpriv->fd, USB_DO_REQUEST, &req) < 0)
|
||||
return _errno_to_libusb(errno);
|
||||
|
||||
return (LIBUSB_SUCCESS);
|
||||
}
|
||||
|
||||
int
|
||||
obsd_reset_device(struct libusb_device_handle *handle)
|
||||
{
|
||||
usbi_dbg("");
|
||||
|
||||
return (LIBUSB_ERROR_NOT_SUPPORTED);
|
||||
}
|
||||
|
||||
void
|
||||
obsd_destroy_device(struct libusb_device *dev)
|
||||
{
|
||||
struct device_priv *dpriv = (struct device_priv *)dev->os_priv;
|
||||
|
||||
usbi_dbg("");
|
||||
|
||||
free(dpriv->cdesc);
|
||||
}
|
||||
|
||||
int
|
||||
obsd_submit_transfer(struct usbi_transfer *itransfer)
|
||||
{
|
||||
struct libusb_transfer *transfer;
|
||||
struct handle_priv *hpriv;
|
||||
int err = 0;
|
||||
|
||||
usbi_dbg("");
|
||||
|
||||
transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
|
||||
hpriv = (struct handle_priv *)transfer->dev_handle->os_priv;
|
||||
|
||||
switch (transfer->type) {
|
||||
case LIBUSB_TRANSFER_TYPE_CONTROL:
|
||||
err = _sync_control_transfer(itransfer);
|
||||
break;
|
||||
case LIBUSB_TRANSFER_TYPE_ISOCHRONOUS:
|
||||
if (IS_XFEROUT(transfer)) {
|
||||
/* Isochronous write is not supported */
|
||||
err = LIBUSB_ERROR_NOT_SUPPORTED;
|
||||
break;
|
||||
}
|
||||
err = _sync_gen_transfer(itransfer);
|
||||
break;
|
||||
case LIBUSB_TRANSFER_TYPE_BULK:
|
||||
case LIBUSB_TRANSFER_TYPE_INTERRUPT:
|
||||
if (IS_XFEROUT(transfer) &&
|
||||
transfer->flags & LIBUSB_TRANSFER_ADD_ZERO_PACKET) {
|
||||
err = LIBUSB_ERROR_NOT_SUPPORTED;
|
||||
break;
|
||||
}
|
||||
err = _sync_gen_transfer(itransfer);
|
||||
break;
|
||||
}
|
||||
|
||||
if (err)
|
||||
return (err);
|
||||
|
||||
if (write(hpriv->pipe[1], &itransfer, sizeof(itransfer)) < 0)
|
||||
return _errno_to_libusb(errno);
|
||||
|
||||
return (LIBUSB_SUCCESS);
|
||||
}
|
||||
|
||||
int
|
||||
obsd_cancel_transfer(struct usbi_transfer *itransfer)
|
||||
{
|
||||
usbi_dbg("");
|
||||
|
||||
return (LIBUSB_ERROR_NOT_SUPPORTED);
|
||||
}
|
||||
|
||||
void
|
||||
obsd_clear_transfer_priv(struct usbi_transfer *itransfer)
|
||||
{
|
||||
usbi_dbg("");
|
||||
|
||||
/* Nothing to do */
|
||||
}
|
||||
|
||||
int
|
||||
obsd_handle_events(struct libusb_context *ctx, struct pollfd *fds, nfds_t nfds,
|
||||
int num_ready)
|
||||
{
|
||||
struct libusb_device_handle *handle;
|
||||
struct handle_priv *hpriv = NULL;
|
||||
struct usbi_transfer *itransfer;
|
||||
struct pollfd *pollfd;
|
||||
int i, err = 0;
|
||||
|
||||
usbi_dbg("");
|
||||
|
||||
pthread_mutex_lock(&ctx->open_devs_lock);
|
||||
for (i = 0; i < nfds && num_ready > 0; i++) {
|
||||
pollfd = &fds[i];
|
||||
|
||||
if (!pollfd->revents)
|
||||
continue;
|
||||
|
||||
hpriv = NULL;
|
||||
num_ready--;
|
||||
list_for_each_entry(handle, &ctx->open_devs, list,
|
||||
struct libusb_device_handle) {
|
||||
hpriv = (struct handle_priv *)handle->os_priv;
|
||||
|
||||
if (hpriv->pipe[0] == pollfd->fd)
|
||||
break;
|
||||
|
||||
hpriv = NULL;
|
||||
}
|
||||
|
||||
if (NULL == hpriv) {
|
||||
usbi_dbg("fd %d is not an event pipe!", pollfd->fd);
|
||||
err = ENOENT;
|
||||
break;
|
||||
}
|
||||
|
||||
if (pollfd->revents & POLLERR) {
|
||||
usbi_remove_pollfd(HANDLE_CTX(handle), hpriv->pipe[0]);
|
||||
usbi_handle_disconnect(handle);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (read(hpriv->pipe[0], &itransfer, sizeof(itransfer)) < 0) {
|
||||
err = errno;
|
||||
break;
|
||||
}
|
||||
|
||||
if ((err = usbi_handle_transfer_completion(itransfer,
|
||||
LIBUSB_TRANSFER_COMPLETED)))
|
||||
break;
|
||||
}
|
||||
pthread_mutex_unlock(&ctx->open_devs_lock);
|
||||
|
||||
if (err)
|
||||
return _errno_to_libusb(err);
|
||||
|
||||
return (LIBUSB_SUCCESS);
|
||||
}
|
||||
|
||||
int
|
||||
obsd_clock_gettime(int clkid, struct timespec *tp)
|
||||
{
|
||||
usbi_dbg("clock %d", clkid);
|
||||
|
||||
if (clkid == USBI_CLOCK_REALTIME)
|
||||
return clock_gettime(CLOCK_REALTIME, tp);
|
||||
|
||||
if (clkid == USBI_CLOCK_MONOTONIC)
|
||||
return clock_gettime(CLOCK_MONOTONIC, tp);
|
||||
|
||||
return (LIBUSB_ERROR_INVALID_PARAM);
|
||||
}
|
||||
|
||||
int
|
||||
_errno_to_libusb(int err)
|
||||
{
|
||||
switch (err) {
|
||||
case EIO:
|
||||
return (LIBUSB_ERROR_IO);
|
||||
case EACCES:
|
||||
return (LIBUSB_ERROR_ACCESS);
|
||||
case ENOENT:
|
||||
return (LIBUSB_ERROR_NO_DEVICE);
|
||||
case ENOMEM:
|
||||
return (LIBUSB_ERROR_NO_MEM);
|
||||
}
|
||||
|
||||
usbi_dbg("error: %s", strerror(err));
|
||||
|
||||
return (LIBUSB_ERROR_OTHER);
|
||||
}
|
||||
|
||||
int
|
||||
_cache_active_config_descriptor(struct libusb_device *dev, int fd)
|
||||
{
|
||||
struct device_priv *dpriv = (struct device_priv *)dev->os_priv;
|
||||
struct usb_config_desc ucd;
|
||||
struct usb_full_desc ufd;
|
||||
unsigned char* buf;
|
||||
int len;
|
||||
|
||||
usbi_dbg("fd %d", fd);
|
||||
|
||||
ucd.ucd_config_index = USB_CURRENT_CONFIG_INDEX;
|
||||
|
||||
if ((ioctl(fd, USB_GET_CONFIG_DESC, &ucd)) < 0)
|
||||
return _errno_to_libusb(errno);
|
||||
|
||||
usbi_dbg("active bLength %d", ucd.ucd_desc.bLength);
|
||||
|
||||
len = UGETW(ucd.ucd_desc.wTotalLength);
|
||||
buf = malloc(len);
|
||||
if (buf == NULL)
|
||||
return (LIBUSB_ERROR_NO_MEM);
|
||||
|
||||
ufd.ufd_config_index = ucd.ucd_config_index;
|
||||
ufd.ufd_size = len;
|
||||
ufd.ufd_data = buf;
|
||||
|
||||
usbi_dbg("index %d, len %d", ufd.ufd_config_index, len);
|
||||
|
||||
if ((ioctl(fd, USB_GET_FULL_DESC, &ufd)) < 0) {
|
||||
free(buf);
|
||||
return _errno_to_libusb(errno);
|
||||
}
|
||||
|
||||
if (dpriv->cdesc)
|
||||
free(dpriv->cdesc);
|
||||
dpriv->cdesc = buf;
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
_sync_control_transfer(struct usbi_transfer *itransfer)
|
||||
{
|
||||
struct libusb_transfer *transfer;
|
||||
struct libusb_control_setup *setup;
|
||||
struct device_priv *dpriv;
|
||||
struct usb_ctl_request req;
|
||||
|
||||
transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
|
||||
dpriv = (struct device_priv *)transfer->dev_handle->dev->os_priv;
|
||||
setup = (struct libusb_control_setup *)transfer->buffer;
|
||||
|
||||
usbi_dbg("type %d request %d value %d index %d length %d timeout %d",
|
||||
setup->bmRequestType, setup->bRequest,
|
||||
libusb_le16_to_cpu(setup->wValue),
|
||||
libusb_le16_to_cpu(setup->wIndex),
|
||||
libusb_le16_to_cpu(setup->wLength), transfer->timeout);
|
||||
|
||||
req.ucr_request.bmRequestType = setup->bmRequestType;
|
||||
req.ucr_request.bRequest = setup->bRequest;
|
||||
/* Don't use USETW, libusb already deals with the endianness */
|
||||
(*(uint16_t *)req.ucr_request.wValue) = setup->wValue;
|
||||
(*(uint16_t *)req.ucr_request.wIndex) = setup->wIndex;
|
||||
(*(uint16_t *)req.ucr_request.wLength) = setup->wLength;
|
||||
req.ucr_data = transfer->buffer + LIBUSB_CONTROL_SETUP_SIZE;
|
||||
|
||||
if ((transfer->flags & LIBUSB_TRANSFER_SHORT_NOT_OK) == 0)
|
||||
req.ucr_flags = USBD_SHORT_XFER_OK;
|
||||
|
||||
if ((ioctl(dpriv->fd, USB_SET_TIMEOUT, &transfer->timeout)) < 0)
|
||||
return _errno_to_libusb(errno);
|
||||
|
||||
if ((ioctl(dpriv->fd, USB_DO_REQUEST, &req)) < 0)
|
||||
return _errno_to_libusb(errno);
|
||||
|
||||
itransfer->transferred = req.ucr_actlen;
|
||||
|
||||
usbi_dbg("transferred %d", itransfer->transferred);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
_access_endpoint(struct libusb_transfer *transfer)
|
||||
{
|
||||
struct handle_priv *hpriv;
|
||||
struct device_priv *dpriv;
|
||||
char *s, devnode[16];
|
||||
int fd, endpt;
|
||||
mode_t mode;
|
||||
|
||||
hpriv = (struct handle_priv *)transfer->dev_handle->os_priv;
|
||||
dpriv = (struct device_priv *)transfer->dev_handle->dev->os_priv;
|
||||
|
||||
endpt = UE_GET_ADDR(transfer->endpoint);
|
||||
mode = IS_XFERIN(transfer) ? O_RDONLY : O_WRONLY;
|
||||
|
||||
usbi_dbg("endpoint %d mode %d", endpt, mode);
|
||||
|
||||
if (hpriv->endpoints[endpt] < 0) {
|
||||
/* Pick the right node given the control one */
|
||||
strlcpy(devnode, dpriv->devnode, sizeof(devnode));
|
||||
s = strchr(devnode, '.');
|
||||
snprintf(s, 4, ".%02d", endpt);
|
||||
|
||||
/* We may need to read/write to the same endpoint later. */
|
||||
if (((fd = open(devnode, O_RDWR)) < 0) && (errno == ENXIO))
|
||||
if ((fd = open(devnode, mode)) < 0)
|
||||
return (-1);
|
||||
|
||||
hpriv->endpoints[endpt] = fd;
|
||||
}
|
||||
|
||||
return (hpriv->endpoints[endpt]);
|
||||
}
|
||||
|
||||
int
|
||||
_sync_gen_transfer(struct usbi_transfer *itransfer)
|
||||
{
|
||||
struct libusb_transfer *transfer;
|
||||
int fd, nr = 1;
|
||||
|
||||
transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
|
||||
|
||||
/*
|
||||
* Bulk, Interrupt or Isochronous transfer depends on the
|
||||
* endpoint and thus the node to open.
|
||||
*/
|
||||
if ((fd = _access_endpoint(transfer)) < 0)
|
||||
return _errno_to_libusb(errno);
|
||||
|
||||
if ((ioctl(fd, USB_SET_TIMEOUT, &transfer->timeout)) < 0)
|
||||
return _errno_to_libusb(errno);
|
||||
|
||||
if (IS_XFERIN(transfer)) {
|
||||
if ((transfer->flags & LIBUSB_TRANSFER_SHORT_NOT_OK) == 0)
|
||||
if ((ioctl(fd, USB_SET_SHORT_XFER, &nr)) < 0)
|
||||
return _errno_to_libusb(errno);
|
||||
|
||||
nr = read(fd, transfer->buffer, transfer->length);
|
||||
} else {
|
||||
nr = write(fd, transfer->buffer, transfer->length);
|
||||
}
|
||||
|
||||
if (nr < 0)
|
||||
return _errno_to_libusb(errno);
|
||||
|
||||
itransfer->transferred = nr;
|
||||
|
||||
return (0);
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
#ifndef LIBUSB_POLL_POSIX_H
|
||||
#define LIBUSB_POLL_POSIX_H
|
||||
|
||||
#define usbi_write write
|
||||
#define usbi_read read
|
||||
#define usbi_close close
|
||||
#define usbi_pipe pipe
|
||||
#define usbi_poll poll
|
||||
|
||||
#endif /* LIBUSB_POLL_POSIX_H */
|
|
@ -0,0 +1,745 @@
|
|||
/*
|
||||
* poll_windows: poll compatibility wrapper for Windows
|
||||
* Copyright (C) 2009-2010 Pete Batard <pbatard@gmail.com>
|
||||
* With contributions from Michael Plante, Orin Eman et al.
|
||||
* Parts of poll implementation from libusb-win32, by Stephan Meyer et al.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* poll() and pipe() Windows compatibility layer for libusb 1.0
|
||||
*
|
||||
* The way this layer works is by using OVERLAPPED with async I/O transfers, as
|
||||
* OVERLAPPED have an associated event which is flagged for I/O completion.
|
||||
*
|
||||
* For USB pollable async I/O, you would typically:
|
||||
* - obtain a Windows HANDLE to a file or device that has been opened in
|
||||
* OVERLAPPED mode
|
||||
* - call usbi_create_fd with this handle to obtain a custom fd.
|
||||
* Note that if you need simultaneous R/W access, you need to call create_fd
|
||||
* twice, once in _O_RDONLY and once in _O_WRONLY mode to obtain 2 separate
|
||||
* pollable fds
|
||||
* - leave the core functions call the poll routine and flag POLLIN/POLLOUT
|
||||
*
|
||||
* The pipe pollable synchronous I/O works using the overlapped event associated
|
||||
* with a fake pipe. The read/write functions are only meant to be used in that
|
||||
* context.
|
||||
*/
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <io.h>
|
||||
|
||||
#include <libusbi.h>
|
||||
|
||||
// Uncomment to debug the polling layer
|
||||
//#define DEBUG_POLL_WINDOWS
|
||||
#if defined(DEBUG_POLL_WINDOWS)
|
||||
#define poll_dbg usbi_dbg
|
||||
#else
|
||||
// MSVC++ < 2005 cannot use a variadic argument and non MSVC
|
||||
// compilers produce warnings if parenthesis are omitted.
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1400
|
||||
#define poll_dbg
|
||||
#else
|
||||
#define poll_dbg(...)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(_PREFAST_)
|
||||
#pragma warning(disable:28719)
|
||||
#endif
|
||||
|
||||
#if defined(__CYGWIN__)
|
||||
// cygwin produces a warning unless these prototypes are defined
|
||||
extern int _open(char* name, int flags);
|
||||
extern int _close(int fd);
|
||||
extern int _snprintf(char *buffer, size_t count, const char *format, ...);
|
||||
#define NUL_DEVICE "/dev/null"
|
||||
#else
|
||||
#define NUL_DEVICE "NUL"
|
||||
#endif
|
||||
|
||||
#define CHECK_INIT_POLLING do {if(!is_polling_set) init_polling();} while(0)
|
||||
|
||||
// public fd data
|
||||
const struct winfd INVALID_WINFD = {-1, INVALID_HANDLE_VALUE, NULL, RW_NONE};
|
||||
struct winfd poll_fd[MAX_FDS];
|
||||
// internal fd data
|
||||
struct {
|
||||
CRITICAL_SECTION mutex; // lock for fds
|
||||
// Additional variables for XP CancelIoEx partial emulation
|
||||
HANDLE original_handle;
|
||||
DWORD thread_id;
|
||||
} _poll_fd[MAX_FDS];
|
||||
|
||||
// globals
|
||||
BOOLEAN is_polling_set = FALSE;
|
||||
LONG pipe_number = 0;
|
||||
static volatile LONG compat_spinlock = 0;
|
||||
|
||||
// CancelIoEx, available on Vista and later only, provides the ability to cancel
|
||||
// a single transfer (OVERLAPPED) when used. As it may not be part of any of the
|
||||
// platform headers, we hook into the Kernel32 system DLL directly to seek it.
|
||||
static BOOL (__stdcall *pCancelIoEx)(HANDLE, LPOVERLAPPED) = NULL;
|
||||
#define CancelIoEx_Available (pCancelIoEx != NULL)
|
||||
static __inline BOOL cancel_io(int _index)
|
||||
{
|
||||
if ((_index < 0) || (_index >= MAX_FDS)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if ( (poll_fd[_index].fd < 0) || (poll_fd[_index].handle == INVALID_HANDLE_VALUE)
|
||||
|| (poll_fd[_index].handle == 0) || (poll_fd[_index].overlapped == NULL) ) {
|
||||
return TRUE;
|
||||
}
|
||||
if (CancelIoEx_Available) {
|
||||
return (*pCancelIoEx)(poll_fd[_index].handle, poll_fd[_index].overlapped);
|
||||
}
|
||||
if (_poll_fd[_index].thread_id == GetCurrentThreadId()) {
|
||||
return CancelIo(poll_fd[_index].handle);
|
||||
}
|
||||
usbi_warn(NULL, "Unable to cancel I/O that was started from another thread");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// Init
|
||||
void init_polling(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
while (InterlockedExchange((LONG *)&compat_spinlock, 1) == 1) {
|
||||
SleepEx(0, TRUE);
|
||||
}
|
||||
if (!is_polling_set) {
|
||||
pCancelIoEx = (BOOL (__stdcall *)(HANDLE,LPOVERLAPPED))
|
||||
GetProcAddress(GetModuleHandleA("KERNEL32"), "CancelIoEx");
|
||||
usbi_dbg("Will use CancelIo%s for I/O cancellation",
|
||||
CancelIoEx_Available?"Ex":"");
|
||||
for (i=0; i<MAX_FDS; i++) {
|
||||
poll_fd[i] = INVALID_WINFD;
|
||||
_poll_fd[i].original_handle = INVALID_HANDLE_VALUE;
|
||||
_poll_fd[i].thread_id = 0;
|
||||
InitializeCriticalSection(&_poll_fd[i].mutex);
|
||||
}
|
||||
is_polling_set = TRUE;
|
||||
}
|
||||
compat_spinlock = 0;
|
||||
}
|
||||
|
||||
// Internal function to retrieve the table index (and lock the fd mutex)
|
||||
int _fd_to_index_and_lock(int fd)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (fd <= 0)
|
||||
return -1;
|
||||
|
||||
for (i=0; i<MAX_FDS; i++) {
|
||||
if (poll_fd[i].fd == fd) {
|
||||
EnterCriticalSection(&_poll_fd[i].mutex);
|
||||
// fd might have changed before we got to critical
|
||||
if (poll_fd[i].fd != fd) {
|
||||
LeaveCriticalSection(&_poll_fd[i].mutex);
|
||||
continue;
|
||||
}
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
OVERLAPPED *create_overlapped(void)
|
||||
{
|
||||
OVERLAPPED *overlapped = (OVERLAPPED*) calloc(1, sizeof(OVERLAPPED));
|
||||
if (overlapped == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
overlapped->hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
|
||||
if(overlapped->hEvent == NULL) {
|
||||
free (overlapped);
|
||||
return NULL;
|
||||
}
|
||||
return overlapped;
|
||||
}
|
||||
|
||||
void free_overlapped(OVERLAPPED *overlapped)
|
||||
{
|
||||
if (overlapped == NULL)
|
||||
return;
|
||||
|
||||
if ( (overlapped->hEvent != 0)
|
||||
&& (overlapped->hEvent != INVALID_HANDLE_VALUE) ) {
|
||||
CloseHandle(overlapped->hEvent);
|
||||
}
|
||||
free(overlapped);
|
||||
}
|
||||
|
||||
void reset_overlapped(OVERLAPPED *overlapped)
|
||||
{
|
||||
HANDLE event_handle;
|
||||
if (overlapped == NULL)
|
||||
return;
|
||||
|
||||
event_handle = overlapped->hEvent;
|
||||
if (event_handle != NULL) {
|
||||
ResetEvent(event_handle);
|
||||
}
|
||||
memset(overlapped, 0, sizeof(OVERLAPPED));
|
||||
overlapped->hEvent = event_handle;
|
||||
}
|
||||
|
||||
void exit_polling(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
while (InterlockedExchange((LONG *)&compat_spinlock, 1) == 1) {
|
||||
SleepEx(0, TRUE);
|
||||
}
|
||||
if (is_polling_set) {
|
||||
is_polling_set = FALSE;
|
||||
|
||||
for (i=0; i<MAX_FDS; i++) {
|
||||
// Cancel any async I/O (handle can be invalid)
|
||||
cancel_io(i);
|
||||
// If anything was pending on that I/O, it should be
|
||||
// terminating, and we should be able to access the fd
|
||||
// mutex lock before too long
|
||||
EnterCriticalSection(&_poll_fd[i].mutex);
|
||||
if ( (poll_fd[i].fd > 0) && (poll_fd[i].handle != INVALID_HANDLE_VALUE) && (poll_fd[i].handle != 0)
|
||||
&& (GetFileType(poll_fd[i].handle) == FILE_TYPE_UNKNOWN) ) {
|
||||
_close(poll_fd[i].fd);
|
||||
}
|
||||
free_overlapped(poll_fd[i].overlapped);
|
||||
if (!CancelIoEx_Available) {
|
||||
// Close duplicate handle
|
||||
if (_poll_fd[i].original_handle != INVALID_HANDLE_VALUE) {
|
||||
CloseHandle(poll_fd[i].handle);
|
||||
}
|
||||
}
|
||||
poll_fd[i] = INVALID_WINFD;
|
||||
LeaveCriticalSection(&_poll_fd[i].mutex);
|
||||
DeleteCriticalSection(&_poll_fd[i].mutex);
|
||||
}
|
||||
}
|
||||
compat_spinlock = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Create a fake pipe.
|
||||
* As libusb only uses pipes for signaling, all we need from a pipe is an
|
||||
* event. To that extent, we create a single wfd and overlapped as a means
|
||||
* to access that event.
|
||||
*/
|
||||
int usbi_pipe(int filedes[2])
|
||||
{
|
||||
int i;
|
||||
OVERLAPPED* overlapped;
|
||||
|
||||
CHECK_INIT_POLLING;
|
||||
|
||||
overlapped = (OVERLAPPED*) calloc(1, sizeof(OVERLAPPED));
|
||||
if (overlapped == NULL) {
|
||||
return -1;
|
||||
}
|
||||
// The overlapped must have status pending for signaling to work in poll
|
||||
overlapped->Internal = STATUS_PENDING;
|
||||
overlapped->InternalHigh = 0;
|
||||
|
||||
// Read end of the "pipe"
|
||||
filedes[0] = _open(NUL_DEVICE, _O_WRONLY);
|
||||
if (filedes[0] < 0) {
|
||||
usbi_err(NULL, "could not create pipe: errno %d", errno);
|
||||
goto out1;
|
||||
}
|
||||
// We can use the same handle for both ends
|
||||
filedes[1] = filedes[0];
|
||||
poll_dbg("pipe filedes = %d", filedes[0]);
|
||||
|
||||
// Note: manual reset must be true (second param) as the reset occurs in read
|
||||
overlapped->hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
|
||||
if(!overlapped->hEvent) {
|
||||
goto out2;
|
||||
}
|
||||
|
||||
for (i=0; i<MAX_FDS; i++) {
|
||||
if (poll_fd[i].fd < 0) {
|
||||
EnterCriticalSection(&_poll_fd[i].mutex);
|
||||
// fd might have been allocated before we got to critical
|
||||
if (poll_fd[i].fd >= 0) {
|
||||
LeaveCriticalSection(&_poll_fd[i].mutex);
|
||||
continue;
|
||||
}
|
||||
|
||||
poll_fd[i].fd = filedes[0];
|
||||
poll_fd[i].handle = DUMMY_HANDLE;
|
||||
poll_fd[i].overlapped = overlapped;
|
||||
// There's no polling on the write end, so we just use READ for our needs
|
||||
poll_fd[i].rw = RW_READ;
|
||||
_poll_fd[i].original_handle = INVALID_HANDLE_VALUE;
|
||||
LeaveCriticalSection(&_poll_fd[i].mutex);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
CloseHandle(overlapped->hEvent);
|
||||
out2:
|
||||
_close(filedes[0]);
|
||||
out1:
|
||||
free(overlapped);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Create both an fd and an OVERLAPPED from an open Windows handle, so that
|
||||
* it can be used with our polling function
|
||||
* The handle MUST support overlapped transfers (usually requires CreateFile
|
||||
* with FILE_FLAG_OVERLAPPED)
|
||||
* Return a pollable file descriptor struct, or INVALID_WINFD on error
|
||||
*
|
||||
* Note that the fd returned by this function is a per-transfer fd, rather
|
||||
* than a per-session fd and cannot be used for anything else but our
|
||||
* custom functions (the fd itself points to the NUL: device)
|
||||
* if you plan to do R/W on the same handle, you MUST create 2 fds: one for
|
||||
* read and one for write. Using a single R/W fd is unsupported and will
|
||||
* produce unexpected results
|
||||
*/
|
||||
struct winfd usbi_create_fd(HANDLE handle, int access_mode)
|
||||
{
|
||||
int i, fd;
|
||||
struct winfd wfd = INVALID_WINFD;
|
||||
OVERLAPPED* overlapped = NULL;
|
||||
|
||||
CHECK_INIT_POLLING;
|
||||
|
||||
if ((handle == 0) || (handle == INVALID_HANDLE_VALUE)) {
|
||||
return INVALID_WINFD;
|
||||
}
|
||||
|
||||
if ((access_mode != _O_RDONLY) && (access_mode != _O_WRONLY)) {
|
||||
usbi_warn(NULL, "only one of _O_RDONLY or _O_WRONLY are supported.\n"
|
||||
"If you want to poll for R/W simultaneously, create multiple fds from the same handle.");
|
||||
return INVALID_WINFD;
|
||||
}
|
||||
if (access_mode == _O_RDONLY) {
|
||||
wfd.rw = RW_READ;
|
||||
} else {
|
||||
wfd.rw = RW_WRITE;
|
||||
}
|
||||
|
||||
// Ensure that we get a non system conflicting unique fd, using
|
||||
// the same fd attribution system as the pipe ends
|
||||
fd = _open(NUL_DEVICE, _O_WRONLY);
|
||||
if (fd < 0) {
|
||||
return INVALID_WINFD;
|
||||
}
|
||||
|
||||
overlapped = create_overlapped();
|
||||
if(overlapped == NULL) {
|
||||
_close(fd);
|
||||
return INVALID_WINFD;
|
||||
}
|
||||
|
||||
for (i=0; i<MAX_FDS; i++) {
|
||||
if (poll_fd[i].fd < 0) {
|
||||
EnterCriticalSection(&_poll_fd[i].mutex);
|
||||
// fd might have been removed before we got to critical
|
||||
if (poll_fd[i].fd >= 0) {
|
||||
LeaveCriticalSection(&_poll_fd[i].mutex);
|
||||
continue;
|
||||
}
|
||||
wfd.fd = fd;
|
||||
// Attempt to emulate some of the CancelIoEx behaviour on platforms
|
||||
// that don't have it
|
||||
if (!CancelIoEx_Available) {
|
||||
_poll_fd[i].thread_id = GetCurrentThreadId();
|
||||
if (!DuplicateHandle(GetCurrentProcess(), handle, GetCurrentProcess(),
|
||||
&wfd.handle, 0, TRUE, DUPLICATE_SAME_ACCESS)) {
|
||||
usbi_dbg("could not duplicate handle for CancelIo - using original one");
|
||||
wfd.handle = handle;
|
||||
// Make sure we won't close the original handle on fd deletion then
|
||||
_poll_fd[i].original_handle = INVALID_HANDLE_VALUE;
|
||||
} else {
|
||||
_poll_fd[i].original_handle = handle;
|
||||
}
|
||||
} else {
|
||||
wfd.handle = handle;
|
||||
}
|
||||
wfd.overlapped = overlapped;
|
||||
memcpy(&poll_fd[i], &wfd, sizeof(struct winfd));
|
||||
LeaveCriticalSection(&_poll_fd[i].mutex);
|
||||
return wfd;
|
||||
}
|
||||
}
|
||||
free_overlapped(overlapped);
|
||||
_close(fd);
|
||||
return INVALID_WINFD;
|
||||
}
|
||||
|
||||
void _free_index(int _index)
|
||||
{
|
||||
// Cancel any async IO (Don't care about the validity of our handles for this)
|
||||
cancel_io(_index);
|
||||
// close fake handle for devices
|
||||
if ( (poll_fd[_index].handle != INVALID_HANDLE_VALUE) && (poll_fd[_index].handle != 0)
|
||||
&& (GetFileType(poll_fd[_index].handle) == FILE_TYPE_UNKNOWN) ) {
|
||||
_close(poll_fd[_index].fd);
|
||||
}
|
||||
// close the duplicate handle (if we have an actual duplicate)
|
||||
if (!CancelIoEx_Available) {
|
||||
if (_poll_fd[_index].original_handle != INVALID_HANDLE_VALUE) {
|
||||
CloseHandle(poll_fd[_index].handle);
|
||||
}
|
||||
_poll_fd[_index].original_handle = INVALID_HANDLE_VALUE;
|
||||
_poll_fd[_index].thread_id = 0;
|
||||
}
|
||||
free_overlapped(poll_fd[_index].overlapped);
|
||||
poll_fd[_index] = INVALID_WINFD;
|
||||
}
|
||||
|
||||
/*
|
||||
* Release a pollable file descriptor.
|
||||
*
|
||||
* Note that the associated Windows handle is not closed by this call
|
||||
*/
|
||||
void usbi_free_fd(int fd)
|
||||
{
|
||||
int _index;
|
||||
|
||||
CHECK_INIT_POLLING;
|
||||
|
||||
_index = _fd_to_index_and_lock(fd);
|
||||
if (_index < 0) {
|
||||
return;
|
||||
}
|
||||
_free_index(_index);
|
||||
LeaveCriticalSection(&_poll_fd[_index].mutex);
|
||||
}
|
||||
|
||||
/*
|
||||
* The functions below perform various conversions between fd, handle and OVERLAPPED
|
||||
*/
|
||||
struct winfd fd_to_winfd(int fd)
|
||||
{
|
||||
int i;
|
||||
struct winfd wfd;
|
||||
|
||||
CHECK_INIT_POLLING;
|
||||
|
||||
if (fd <= 0)
|
||||
return INVALID_WINFD;
|
||||
|
||||
for (i=0; i<MAX_FDS; i++) {
|
||||
if (poll_fd[i].fd == fd) {
|
||||
EnterCriticalSection(&_poll_fd[i].mutex);
|
||||
// fd might have been deleted before we got to critical
|
||||
if (poll_fd[i].fd != fd) {
|
||||
LeaveCriticalSection(&_poll_fd[i].mutex);
|
||||
continue;
|
||||
}
|
||||
memcpy(&wfd, &poll_fd[i], sizeof(struct winfd));
|
||||
LeaveCriticalSection(&_poll_fd[i].mutex);
|
||||
return wfd;
|
||||
}
|
||||
}
|
||||
return INVALID_WINFD;
|
||||
}
|
||||
|
||||
struct winfd handle_to_winfd(HANDLE handle)
|
||||
{
|
||||
int i;
|
||||
struct winfd wfd;
|
||||
|
||||
CHECK_INIT_POLLING;
|
||||
|
||||
if ((handle == 0) || (handle == INVALID_HANDLE_VALUE))
|
||||
return INVALID_WINFD;
|
||||
|
||||
for (i=0; i<MAX_FDS; i++) {
|
||||
if (poll_fd[i].handle == handle) {
|
||||
EnterCriticalSection(&_poll_fd[i].mutex);
|
||||
// fd might have been deleted before we got to critical
|
||||
if (poll_fd[i].handle != handle) {
|
||||
LeaveCriticalSection(&_poll_fd[i].mutex);
|
||||
continue;
|
||||
}
|
||||
memcpy(&wfd, &poll_fd[i], sizeof(struct winfd));
|
||||
LeaveCriticalSection(&_poll_fd[i].mutex);
|
||||
return wfd;
|
||||
}
|
||||
}
|
||||
return INVALID_WINFD;
|
||||
}
|
||||
|
||||
struct winfd overlapped_to_winfd(OVERLAPPED* overlapped)
|
||||
{
|
||||
int i;
|
||||
struct winfd wfd;
|
||||
|
||||
CHECK_INIT_POLLING;
|
||||
|
||||
if (overlapped == NULL)
|
||||
return INVALID_WINFD;
|
||||
|
||||
for (i=0; i<MAX_FDS; i++) {
|
||||
if (poll_fd[i].overlapped == overlapped) {
|
||||
EnterCriticalSection(&_poll_fd[i].mutex);
|
||||
// fd might have been deleted before we got to critical
|
||||
if (poll_fd[i].overlapped != overlapped) {
|
||||
LeaveCriticalSection(&_poll_fd[i].mutex);
|
||||
continue;
|
||||
}
|
||||
memcpy(&wfd, &poll_fd[i], sizeof(struct winfd));
|
||||
LeaveCriticalSection(&_poll_fd[i].mutex);
|
||||
return wfd;
|
||||
}
|
||||
}
|
||||
return INVALID_WINFD;
|
||||
}
|
||||
|
||||
/*
|
||||
* POSIX poll equivalent, using Windows OVERLAPPED
|
||||
* Currently, this function only accepts one of POLLIN or POLLOUT per fd
|
||||
* (but you can create multiple fds from the same handle for read and write)
|
||||
*/
|
||||
int usbi_poll(struct pollfd *fds, unsigned int nfds, int timeout)
|
||||
{
|
||||
unsigned i;
|
||||
int _index, object_index, triggered;
|
||||
HANDLE *handles_to_wait_on;
|
||||
int *handle_to_index;
|
||||
DWORD nb_handles_to_wait_on = 0;
|
||||
DWORD ret;
|
||||
|
||||
CHECK_INIT_POLLING;
|
||||
|
||||
triggered = 0;
|
||||
handles_to_wait_on = (HANDLE*) calloc(nfds+1, sizeof(HANDLE)); // +1 for fd_update
|
||||
handle_to_index = (int*) calloc(nfds, sizeof(int));
|
||||
if ((handles_to_wait_on == NULL) || (handle_to_index == NULL)) {
|
||||
errno = ENOMEM;
|
||||
triggered = -1;
|
||||
goto poll_exit;
|
||||
}
|
||||
|
||||
for (i = 0; i < nfds; ++i) {
|
||||
fds[i].revents = 0;
|
||||
|
||||
// Only one of POLLIN or POLLOUT can be selected with this version of poll (not both)
|
||||
if ((fds[i].events & ~POLLIN) && (!(fds[i].events & POLLOUT))) {
|
||||
fds[i].revents |= POLLERR;
|
||||
errno = EACCES;
|
||||
usbi_warn(NULL, "unsupported set of events");
|
||||
triggered = -1;
|
||||
goto poll_exit;
|
||||
}
|
||||
|
||||
_index = _fd_to_index_and_lock(fds[i].fd);
|
||||
poll_dbg("fd[%d]=%d: (overlapped=%p) got events %04X", i, poll_fd[_index].fd, poll_fd[_index].overlapped, fds[i].events);
|
||||
|
||||
if ( (_index < 0) || (poll_fd[_index].handle == INVALID_HANDLE_VALUE)
|
||||
|| (poll_fd[_index].handle == 0) || (poll_fd[_index].overlapped == NULL)) {
|
||||
fds[i].revents |= POLLNVAL | POLLERR;
|
||||
errno = EBADF;
|
||||
if (_index >= 0) {
|
||||
LeaveCriticalSection(&_poll_fd[_index].mutex);
|
||||
}
|
||||
usbi_warn(NULL, "invalid fd");
|
||||
triggered = -1;
|
||||
goto poll_exit;
|
||||
}
|
||||
|
||||
// IN or OUT must match our fd direction
|
||||
if ((fds[i].events & POLLIN) && (poll_fd[_index].rw != RW_READ)) {
|
||||
fds[i].revents |= POLLNVAL | POLLERR;
|
||||
errno = EBADF;
|
||||
usbi_warn(NULL, "attempted POLLIN on fd without READ access");
|
||||
LeaveCriticalSection(&_poll_fd[_index].mutex);
|
||||
triggered = -1;
|
||||
goto poll_exit;
|
||||
}
|
||||
|
||||
if ((fds[i].events & POLLOUT) && (poll_fd[_index].rw != RW_WRITE)) {
|
||||
fds[i].revents |= POLLNVAL | POLLERR;
|
||||
errno = EBADF;
|
||||
usbi_warn(NULL, "attempted POLLOUT on fd without WRITE access");
|
||||
LeaveCriticalSection(&_poll_fd[_index].mutex);
|
||||
triggered = -1;
|
||||
goto poll_exit;
|
||||
}
|
||||
|
||||
// The following macro only works if overlapped I/O was reported pending
|
||||
if ( (HasOverlappedIoCompleted(poll_fd[_index].overlapped))
|
||||
|| (HasOverlappedIoCompletedSync(poll_fd[_index].overlapped)) ) {
|
||||
poll_dbg(" completed");
|
||||
// checks above should ensure this works:
|
||||
fds[i].revents = fds[i].events;
|
||||
triggered++;
|
||||
} else {
|
||||
handles_to_wait_on[nb_handles_to_wait_on] = poll_fd[_index].overlapped->hEvent;
|
||||
handle_to_index[nb_handles_to_wait_on] = i;
|
||||
nb_handles_to_wait_on++;
|
||||
}
|
||||
LeaveCriticalSection(&_poll_fd[_index].mutex);
|
||||
}
|
||||
|
||||
// If nothing was triggered, wait on all fds that require it
|
||||
if ((timeout != 0) && (triggered == 0) && (nb_handles_to_wait_on != 0)) {
|
||||
if (timeout < 0) {
|
||||
poll_dbg("starting infinite wait for %d handles...", (int)nb_handles_to_wait_on);
|
||||
} else {
|
||||
poll_dbg("starting %d ms wait for %d handles...", timeout, (int)nb_handles_to_wait_on);
|
||||
}
|
||||
ret = WaitForMultipleObjects(nb_handles_to_wait_on, handles_to_wait_on,
|
||||
FALSE, (timeout<0)?INFINITE:(DWORD)timeout);
|
||||
object_index = ret-WAIT_OBJECT_0;
|
||||
if ((object_index >= 0) && ((DWORD)object_index < nb_handles_to_wait_on)) {
|
||||
poll_dbg(" completed after wait");
|
||||
i = handle_to_index[object_index];
|
||||
_index = _fd_to_index_and_lock(fds[i].fd);
|
||||
fds[i].revents = fds[i].events;
|
||||
triggered++;
|
||||
if (_index >= 0) {
|
||||
LeaveCriticalSection(&_poll_fd[_index].mutex);
|
||||
}
|
||||
} else if (ret == WAIT_TIMEOUT) {
|
||||
poll_dbg(" timed out");
|
||||
triggered = 0; // 0 = timeout
|
||||
} else {
|
||||
errno = EIO;
|
||||
triggered = -1; // error
|
||||
}
|
||||
}
|
||||
|
||||
poll_exit:
|
||||
if (handles_to_wait_on != NULL) {
|
||||
free(handles_to_wait_on);
|
||||
}
|
||||
if (handle_to_index != NULL) {
|
||||
free(handle_to_index);
|
||||
}
|
||||
return triggered;
|
||||
}
|
||||
|
||||
/*
|
||||
* close a fake pipe fd
|
||||
*/
|
||||
int usbi_close(int fd)
|
||||
{
|
||||
int _index;
|
||||
int r = -1;
|
||||
|
||||
CHECK_INIT_POLLING;
|
||||
|
||||
_index = _fd_to_index_and_lock(fd);
|
||||
|
||||
if (_index < 0) {
|
||||
errno = EBADF;
|
||||
} else {
|
||||
if (poll_fd[_index].overlapped != NULL) {
|
||||
// Must be a different event for each end of the pipe
|
||||
CloseHandle(poll_fd[_index].overlapped->hEvent);
|
||||
free(poll_fd[_index].overlapped);
|
||||
}
|
||||
r = _close(poll_fd[_index].fd);
|
||||
if (r != 0) {
|
||||
errno = EIO;
|
||||
}
|
||||
poll_fd[_index] = INVALID_WINFD;
|
||||
LeaveCriticalSection(&_poll_fd[_index].mutex);
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
/*
|
||||
* synchronous write for fake "pipe" signaling
|
||||
*/
|
||||
ssize_t usbi_write(int fd, const void *buf, size_t count)
|
||||
{
|
||||
int _index;
|
||||
|
||||
CHECK_INIT_POLLING;
|
||||
|
||||
if (count != sizeof(unsigned char)) {
|
||||
usbi_err(NULL, "this function should only used for signaling");
|
||||
return -1;
|
||||
}
|
||||
|
||||
_index = _fd_to_index_and_lock(fd);
|
||||
|
||||
if ( (_index < 0) || (poll_fd[_index].overlapped == NULL) ) {
|
||||
errno = EBADF;
|
||||
if (_index >= 0) {
|
||||
LeaveCriticalSection(&_poll_fd[_index].mutex);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
poll_dbg("set pipe event (fd = %d, thread = %08X)", _index, GetCurrentThreadId());
|
||||
SetEvent(poll_fd[_index].overlapped->hEvent);
|
||||
poll_fd[_index].overlapped->Internal = STATUS_WAIT_0;
|
||||
// If two threads write on the pipe at the same time, we need to
|
||||
// process two separate reads => use the overlapped as a counter
|
||||
poll_fd[_index].overlapped->InternalHigh++;
|
||||
|
||||
LeaveCriticalSection(&_poll_fd[_index].mutex);
|
||||
return sizeof(unsigned char);
|
||||
}
|
||||
|
||||
/*
|
||||
* synchronous read for fake "pipe" signaling
|
||||
*/
|
||||
ssize_t usbi_read(int fd, void *buf, size_t count)
|
||||
{
|
||||
int _index;
|
||||
ssize_t r = -1;
|
||||
|
||||
CHECK_INIT_POLLING;
|
||||
|
||||
if (count != sizeof(unsigned char)) {
|
||||
usbi_err(NULL, "this function should only used for signaling");
|
||||
return -1;
|
||||
}
|
||||
|
||||
_index = _fd_to_index_and_lock(fd);
|
||||
|
||||
if (_index < 0) {
|
||||
errno = EBADF;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (WaitForSingleObject(poll_fd[_index].overlapped->hEvent, INFINITE) != WAIT_OBJECT_0) {
|
||||
usbi_warn(NULL, "waiting for event failed: %d", (int)GetLastError());
|
||||
errno = EIO;
|
||||
goto out;
|
||||
}
|
||||
|
||||
poll_dbg("clr pipe event (fd = %d, thread = %08X)", _index, GetCurrentThreadId());
|
||||
poll_fd[_index].overlapped->InternalHigh--;
|
||||
// Don't reset unless we don't have any more events to process
|
||||
if (poll_fd[_index].overlapped->InternalHigh <= 0) {
|
||||
ResetEvent(poll_fd[_index].overlapped->hEvent);
|
||||
poll_fd[_index].overlapped->Internal = STATUS_PENDING;
|
||||
}
|
||||
|
||||
r = sizeof(unsigned char);
|
||||
|
||||
out:
|
||||
LeaveCriticalSection(&_poll_fd[_index].mutex);
|
||||
return r;
|
||||
}
|
|
@ -0,0 +1,115 @@
|
|||
/*
|
||||
* Windows compat: POSIX compatibility wrapper
|
||||
* Copyright (C) 2009-2010 Pete Batard <pbatard@gmail.com>
|
||||
* With contributions from Michael Plante, Orin Eman et al.
|
||||
* Parts of poll implementation from libusb-win32, by Stephan Meyer et al.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
// disable /W4 MSVC warnings that are benign
|
||||
#pragma warning(disable:4127) // conditional expression is constant
|
||||
#endif
|
||||
|
||||
// Handle synchronous completion through the overlapped structure
|
||||
#if !defined(STATUS_REPARSE) // reuse the REPARSE status code
|
||||
#define STATUS_REPARSE ((LONG)0x00000104L)
|
||||
#endif
|
||||
#define STATUS_COMPLETED_SYNCHRONOUSLY STATUS_REPARSE
|
||||
#define HasOverlappedIoCompletedSync(lpOverlapped) (((DWORD)(lpOverlapped)->Internal) == STATUS_COMPLETED_SYNCHRONOUSLY)
|
||||
|
||||
#define DUMMY_HANDLE ((HANDLE)(LONG_PTR)-2)
|
||||
|
||||
enum windows_version {
|
||||
WINDOWS_UNSUPPORTED,
|
||||
WINDOWS_XP,
|
||||
WINDOWS_2003, // also includes XP 64
|
||||
WINDOWS_VISTA_AND_LATER,
|
||||
};
|
||||
extern enum windows_version windows_version;
|
||||
|
||||
#define MAX_FDS 256
|
||||
|
||||
#define POLLIN 0x0001 /* There is data to read */
|
||||
#define POLLPRI 0x0002 /* There is urgent data to read */
|
||||
#define POLLOUT 0x0004 /* Writing now will not block */
|
||||
#define POLLERR 0x0008 /* Error condition */
|
||||
#define POLLHUP 0x0010 /* Hung up */
|
||||
#define POLLNVAL 0x0020 /* Invalid request: fd not open */
|
||||
|
||||
struct pollfd {
|
||||
int fd; /* file descriptor */
|
||||
short events; /* requested events */
|
||||
short revents; /* returned events */
|
||||
};
|
||||
|
||||
// access modes
|
||||
enum rw_type {
|
||||
RW_NONE,
|
||||
RW_READ,
|
||||
RW_WRITE,
|
||||
};
|
||||
|
||||
// fd struct that can be used for polling on Windows
|
||||
struct winfd {
|
||||
int fd; // what's exposed to libusb core
|
||||
HANDLE handle; // what we need to attach overlapped to the I/O op, so we can poll it
|
||||
OVERLAPPED* overlapped; // what will report our I/O status
|
||||
enum rw_type rw; // I/O transfer direction: read *XOR* write (NOT BOTH)
|
||||
};
|
||||
extern const struct winfd INVALID_WINFD;
|
||||
|
||||
int usbi_pipe(int pipefd[2]);
|
||||
int usbi_poll(struct pollfd *fds, unsigned int nfds, int timeout);
|
||||
ssize_t usbi_write(int fd, const void *buf, size_t count);
|
||||
ssize_t usbi_read(int fd, void *buf, size_t count);
|
||||
int usbi_close(int fd);
|
||||
|
||||
void init_polling(void);
|
||||
void exit_polling(void);
|
||||
struct winfd usbi_create_fd(HANDLE handle, int access_mode);
|
||||
void usbi_free_fd(int fd);
|
||||
struct winfd fd_to_winfd(int fd);
|
||||
struct winfd handle_to_winfd(HANDLE handle);
|
||||
struct winfd overlapped_to_winfd(OVERLAPPED* overlapped);
|
||||
|
||||
/*
|
||||
* Timeval operations
|
||||
*/
|
||||
#if defined(DDKBUILD)
|
||||
#include <winsock.h> // defines timeval functions on DDK
|
||||
#endif
|
||||
|
||||
#if !defined(TIMESPEC_TO_TIMEVAL)
|
||||
#define TIMESPEC_TO_TIMEVAL(tv, ts) { \
|
||||
(tv)->tv_sec = (long)(ts)->tv_sec; \
|
||||
(tv)->tv_usec = (long)(ts)->tv_nsec / 1000; \
|
||||
}
|
||||
#endif
|
||||
#if !defined(timersub)
|
||||
#define timersub(a, b, result) \
|
||||
do { \
|
||||
(result)->tv_sec = (a)->tv_sec - (b)->tv_sec; \
|
||||
(result)->tv_usec = (a)->tv_usec - (b)->tv_usec; \
|
||||
if ((result)->tv_usec < 0) { \
|
||||
--(result)->tv_sec; \
|
||||
(result)->tv_usec += 1000000; \
|
||||
} \
|
||||
} while (0)
|
||||
#endif
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
* libusb synchronization using POSIX Threads
|
||||
*
|
||||
* Copyright (C) 2011 Vitali Lovich <vlovich@aliph.com>
|
||||
* Copyright (C) 2011 Peter Stuge <peter@stuge.se>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifdef _XOPEN_SOURCE
|
||||
# if _XOPEN_SOURCE < 500
|
||||
# undef _XOPEN_SOURCE
|
||||
# define _XOPEN_SOURCE 500
|
||||
# endif
|
||||
#else
|
||||
#define _XOPEN_SOURCE 500
|
||||
#endif /* _XOPEN_SOURCE */
|
||||
|
||||
#include "threads_posix.h"
|
||||
|
||||
int usbi_mutex_init_recursive(pthread_mutex_t *mutex, pthread_mutexattr_t *attr)
|
||||
{
|
||||
int err;
|
||||
pthread_mutexattr_t stack_attr;
|
||||
if (!attr) {
|
||||
attr = &stack_attr;
|
||||
err = pthread_mutexattr_init(&stack_attr);
|
||||
if (err != 0)
|
||||
return err;
|
||||
}
|
||||
|
||||
err = pthread_mutexattr_settype(attr, PTHREAD_MUTEX_RECURSIVE);
|
||||
if (err != 0)
|
||||
goto finish;
|
||||
|
||||
err = pthread_mutex_init(mutex, attr);
|
||||
|
||||
finish:
|
||||
if (attr == &stack_attr)
|
||||
pthread_mutexattr_destroy(&stack_attr);
|
||||
|
||||
return err;
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
/*
|
||||
* libusb synchronization using POSIX Threads
|
||||
*
|
||||
* Copyright (C) 2010 Peter Stuge <peter@stuge.se>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef LIBUSB_THREADS_POSIX_H
|
||||
#define LIBUSB_THREADS_POSIX_H
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#define usbi_mutex_static_t pthread_mutex_t
|
||||
#define USBI_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
|
||||
#define usbi_mutex_static_lock pthread_mutex_lock
|
||||
#define usbi_mutex_static_unlock pthread_mutex_unlock
|
||||
|
||||
#define usbi_mutex_t pthread_mutex_t
|
||||
#define usbi_mutex_init pthread_mutex_init
|
||||
#define usbi_mutex_lock pthread_mutex_lock
|
||||
#define usbi_mutex_unlock pthread_mutex_unlock
|
||||
#define usbi_mutex_trylock pthread_mutex_trylock
|
||||
#define usbi_mutex_destroy pthread_mutex_destroy
|
||||
|
||||
#define usbi_cond_t pthread_cond_t
|
||||
#define usbi_cond_init pthread_cond_init
|
||||
#define usbi_cond_wait pthread_cond_wait
|
||||
#define usbi_cond_timedwait pthread_cond_timedwait
|
||||
#define usbi_cond_broadcast pthread_cond_broadcast
|
||||
#define usbi_cond_destroy pthread_cond_destroy
|
||||
#define usbi_cond_signal pthread_cond_signal
|
||||
|
||||
extern int usbi_mutex_init_recursive(pthread_mutex_t *mutex, pthread_mutexattr_t *attr);
|
||||
|
||||
#endif /* LIBUSB_THREADS_POSIX_H */
|
|
@ -0,0 +1,207 @@
|
|||
/*
|
||||
* libusb synchronization on Microsoft Windows
|
||||
*
|
||||
* Copyright (C) 2010 Michael Plante <michael.plante@gmail.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <objbase.h>
|
||||
#include <errno.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "libusbi.h"
|
||||
|
||||
|
||||
int usbi_mutex_init(usbi_mutex_t *mutex,
|
||||
const usbi_mutexattr_t *attr) {
|
||||
if(! mutex) return ((errno=EINVAL));
|
||||
*mutex = CreateMutex(NULL, FALSE, NULL);
|
||||
if(!*mutex) return ((errno=ENOMEM));
|
||||
return 0;
|
||||
}
|
||||
int usbi_mutex_destroy(usbi_mutex_t *mutex) {
|
||||
// It is not clear if CloseHandle failure is due to failure to unlock.
|
||||
// If so, this should be errno=EBUSY.
|
||||
if(!mutex || !CloseHandle(*mutex)) return ((errno=EINVAL));
|
||||
*mutex = NULL;
|
||||
return 0;
|
||||
}
|
||||
int usbi_mutex_trylock(usbi_mutex_t *mutex) {
|
||||
DWORD result;
|
||||
if(!mutex) return ((errno=EINVAL));
|
||||
result = WaitForSingleObject(*mutex, 0);
|
||||
if(result == WAIT_OBJECT_0 || result == WAIT_ABANDONED)
|
||||
return 0; // acquired (ToDo: check that abandoned is ok)
|
||||
if(result == WAIT_TIMEOUT)
|
||||
return ((errno=EBUSY));
|
||||
return ((errno=EINVAL)); // don't know how this would happen
|
||||
// so don't know proper errno
|
||||
}
|
||||
int usbi_mutex_lock(usbi_mutex_t *mutex) {
|
||||
DWORD result;
|
||||
if(!mutex) return ((errno=EINVAL));
|
||||
result = WaitForSingleObject(*mutex, INFINITE);
|
||||
if(result == WAIT_OBJECT_0 || result == WAIT_ABANDONED)
|
||||
return 0; // acquired (ToDo: check that abandoned is ok)
|
||||
return ((errno=EINVAL)); // don't know how this would happen
|
||||
// so don't know proper errno
|
||||
}
|
||||
int usbi_mutex_unlock(usbi_mutex_t *mutex) {
|
||||
if(!mutex) return ((errno=EINVAL));
|
||||
if(!ReleaseMutex(*mutex)) return ((errno=EPERM ));
|
||||
return 0;
|
||||
}
|
||||
|
||||
int usbi_mutex_static_lock(usbi_mutex_static_t *mutex) {
|
||||
if(!mutex) return ((errno=EINVAL));
|
||||
while (InterlockedExchange((LONG *)mutex, 1) == 1) {
|
||||
SleepEx(0, TRUE);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
int usbi_mutex_static_unlock(usbi_mutex_static_t *mutex) {
|
||||
if(!mutex) return ((errno=EINVAL));
|
||||
*mutex = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int usbi_cond_init(usbi_cond_t *cond,
|
||||
const usbi_condattr_t *attr) {
|
||||
if(!cond) return ((errno=EINVAL));
|
||||
list_init(&cond->waiters );
|
||||
list_init(&cond->not_waiting);
|
||||
return 0;
|
||||
}
|
||||
int usbi_cond_destroy(usbi_cond_t *cond) {
|
||||
// This assumes no one is using this anymore. The check MAY NOT BE safe.
|
||||
struct usbi_cond_perthread *pos, *prev_pos = NULL;
|
||||
if(!cond) return ((errno=EINVAL));
|
||||
if(!list_empty(&cond->waiters)) return ((errno=EBUSY )); // (!see above!)
|
||||
list_for_each_entry(pos, &cond->not_waiting, list, struct usbi_cond_perthread) {
|
||||
free(prev_pos);
|
||||
list_del(&pos->list);
|
||||
prev_pos = pos;
|
||||
}
|
||||
free(prev_pos);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int usbi_cond_broadcast(usbi_cond_t *cond) {
|
||||
// Assumes mutex is locked; this is not in keeping with POSIX spec, but
|
||||
// libusb does this anyway, so we simplify by not adding more sync
|
||||
// primitives to the CV definition!
|
||||
int fail = 0;
|
||||
struct usbi_cond_perthread *pos;
|
||||
if(!cond) return ((errno=EINVAL));
|
||||
list_for_each_entry(pos, &cond->waiters, list, struct usbi_cond_perthread) {
|
||||
if(!SetEvent(pos->event))
|
||||
fail = 1;
|
||||
}
|
||||
// The wait function will remove its respective item from the list.
|
||||
return fail ? ((errno=EINVAL)) : 0;
|
||||
}
|
||||
int usbi_cond_signal(usbi_cond_t *cond) {
|
||||
// Assumes mutex is locked; this is not in keeping with POSIX spec, but
|
||||
// libusb does this anyway, so we simplify by not adding more sync
|
||||
// primitives to the CV definition!
|
||||
struct usbi_cond_perthread *pos;
|
||||
if(!cond) return ((errno=EINVAL));
|
||||
if(list_empty(&cond->waiters)) return 0; // no one to wakeup.
|
||||
pos = list_entry(&cond->waiters.next, struct usbi_cond_perthread, list);
|
||||
// The wait function will remove its respective item from the list.
|
||||
return SetEvent(pos->event) ? 0 : ((errno=EINVAL));
|
||||
}
|
||||
static int __inline usbi_cond_intwait(usbi_cond_t *cond,
|
||||
usbi_mutex_t *mutex,
|
||||
DWORD timeout_ms) {
|
||||
struct usbi_cond_perthread *pos;
|
||||
int found = 0, r;
|
||||
DWORD r2,tid = GetCurrentThreadId();
|
||||
if(!cond || !mutex) return ((errno=EINVAL));
|
||||
list_for_each_entry(pos, &cond->not_waiting, list, struct usbi_cond_perthread) {
|
||||
if(tid == pos->tid) {
|
||||
found = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!found) {
|
||||
pos = (struct usbi_cond_perthread*) calloc(1, sizeof(struct usbi_cond_perthread));
|
||||
if(!pos) return ((errno=ENOMEM)); // This errno is not POSIX-allowed.
|
||||
pos->tid = tid;
|
||||
pos->event = CreateEvent(NULL, FALSE, FALSE, NULL); // auto-reset.
|
||||
if(!pos->event) {
|
||||
free(pos);
|
||||
return ((errno=ENOMEM));
|
||||
}
|
||||
list_add(&pos->list, &cond->not_waiting);
|
||||
}
|
||||
|
||||
list_del(&pos->list); // remove from not_waiting list.
|
||||
list_add(&pos->list, &cond->waiters);
|
||||
|
||||
r = usbi_mutex_unlock(mutex);
|
||||
if(r) return r;
|
||||
r2 = WaitForSingleObject(pos->event, timeout_ms);
|
||||
r = usbi_mutex_lock(mutex);
|
||||
if(r) return r;
|
||||
|
||||
list_del(&pos->list);
|
||||
list_add(&pos->list, &cond->not_waiting);
|
||||
|
||||
if(r2 == WAIT_TIMEOUT) return ((errno=ETIMEDOUT));
|
||||
|
||||
return 0;
|
||||
}
|
||||
// N.B.: usbi_cond_*wait() can also return ENOMEM, even though pthread_cond_*wait cannot!
|
||||
int usbi_cond_wait(usbi_cond_t *cond, usbi_mutex_t *mutex) {
|
||||
return usbi_cond_intwait(cond, mutex, INFINITE);
|
||||
}
|
||||
int usbi_cond_timedwait(usbi_cond_t *cond,
|
||||
usbi_mutex_t *mutex,
|
||||
const struct timespec *abstime) {
|
||||
FILETIME filetime;
|
||||
ULARGE_INTEGER rtime;
|
||||
struct timeval targ_time, cur_time, delta_time;
|
||||
struct timespec cur_time_ns;
|
||||
DWORD millis;
|
||||
extern const uint64_t epoch_time;
|
||||
|
||||
GetSystemTimeAsFileTime(&filetime);
|
||||
rtime.LowPart = filetime.dwLowDateTime;
|
||||
rtime.HighPart = filetime.dwHighDateTime;
|
||||
rtime.QuadPart -= epoch_time;
|
||||
cur_time_ns.tv_sec = (long)(rtime.QuadPart / 10000000);
|
||||
cur_time_ns.tv_nsec = (long)((rtime.QuadPart % 10000000)*100);
|
||||
TIMESPEC_TO_TIMEVAL(&cur_time, &cur_time_ns);
|
||||
|
||||
TIMESPEC_TO_TIMEVAL(&targ_time, abstime);
|
||||
timersub(&targ_time, &cur_time, &delta_time);
|
||||
if(delta_time.tv_sec < 0) // abstime already passed?
|
||||
millis = 0;
|
||||
else {
|
||||
millis = delta_time.tv_usec/1000;
|
||||
millis += delta_time.tv_sec *1000;
|
||||
if (delta_time.tv_usec % 1000) // round up to next millisecond
|
||||
millis++;
|
||||
}
|
||||
|
||||
return usbi_cond_intwait(cond, mutex, millis);
|
||||
}
|
||||
|
|
@ -0,0 +1,86 @@
|
|||
/*
|
||||
* libusb synchronization on Microsoft Windows
|
||||
*
|
||||
* Copyright (C) 2010 Michael Plante <michael.plante@gmail.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef LIBUSB_THREADS_WINDOWS_H
|
||||
#define LIBUSB_THREADS_WINDOWS_H
|
||||
|
||||
#define usbi_mutex_static_t volatile LONG
|
||||
#define USBI_MUTEX_INITIALIZER 0
|
||||
|
||||
#define usbi_mutex_t HANDLE
|
||||
|
||||
struct usbi_cond_perthread {
|
||||
struct list_head list;
|
||||
DWORD tid;
|
||||
HANDLE event;
|
||||
};
|
||||
struct usbi_cond_t_ {
|
||||
// Every time a thread touches the CV, it winds up in one of these lists.
|
||||
// It stays there until the CV is destroyed, even if the thread
|
||||
// terminates.
|
||||
struct list_head waiters;
|
||||
struct list_head not_waiting;
|
||||
};
|
||||
typedef struct usbi_cond_t_ usbi_cond_t;
|
||||
|
||||
// We *were* getting timespec from pthread.h:
|
||||
#if (!defined(HAVE_STRUCT_TIMESPEC) && !defined(_TIMESPEC_DEFINED))
|
||||
#define HAVE_STRUCT_TIMESPEC 1
|
||||
#define _TIMESPEC_DEFINED 1
|
||||
struct timespec {
|
||||
long tv_sec;
|
||||
long tv_nsec;
|
||||
};
|
||||
#endif /* HAVE_STRUCT_TIMESPEC | _TIMESPEC_DEFINED */
|
||||
|
||||
// We *were* getting ETIMEDOUT from pthread.h:
|
||||
#ifndef ETIMEDOUT
|
||||
# define ETIMEDOUT 10060 /* This is the value in winsock.h. */
|
||||
#endif
|
||||
|
||||
#define usbi_mutexattr_t void
|
||||
#define usbi_condattr_t void
|
||||
|
||||
// all Windows mutexes are recursive
|
||||
#define usbi_mutex_init_recursive(mutex, attr) usbi_mutex_init((mutex), (attr))
|
||||
|
||||
int usbi_mutex_static_lock(usbi_mutex_static_t *mutex);
|
||||
int usbi_mutex_static_unlock(usbi_mutex_static_t *mutex);
|
||||
|
||||
|
||||
int usbi_mutex_init(usbi_mutex_t *mutex,
|
||||
const usbi_mutexattr_t *attr);
|
||||
int usbi_mutex_lock(usbi_mutex_t *mutex);
|
||||
int usbi_mutex_unlock(usbi_mutex_t *mutex);
|
||||
int usbi_mutex_trylock(usbi_mutex_t *mutex);
|
||||
int usbi_mutex_destroy(usbi_mutex_t *mutex);
|
||||
|
||||
int usbi_cond_init(usbi_cond_t *cond,
|
||||
const usbi_condattr_t *attr);
|
||||
int usbi_cond_destroy(usbi_cond_t *cond);
|
||||
int usbi_cond_wait(usbi_cond_t *cond, usbi_mutex_t *mutex);
|
||||
int usbi_cond_timedwait(usbi_cond_t *cond,
|
||||
usbi_mutex_t *mutex,
|
||||
const struct timespec *abstime);
|
||||
int usbi_cond_broadcast(usbi_cond_t *cond);
|
||||
int usbi_cond_signal(usbi_cond_t *cond);
|
||||
|
||||
#endif /* LIBUSB_THREADS_WINDOWS_H */
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,608 @@
|
|||
/*
|
||||
* Windows backend for libusb 1.0
|
||||
* Copyright (C) 2009-2010 Pete Batard <pbatard@gmail.com>
|
||||
* With contributions from Michael Plante, Orin Eman et al.
|
||||
* Parts of this code adapted from libusb-win32-v1 by Stephan Meyer
|
||||
* Major code testing contribution by Xiaofan Chen
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
// disable /W4 MSVC warnings that are benign
|
||||
#pragma warning(disable:4127) // conditional expression is constant
|
||||
#pragma warning(disable:4100) // unreferenced formal parameter
|
||||
#pragma warning(disable:4214) // bit field types other than int
|
||||
#pragma warning(disable:4201) // nameless struct/union
|
||||
#endif
|
||||
|
||||
// Windows API default is uppercase - ugh!
|
||||
#if !defined(bool)
|
||||
#define bool BOOL
|
||||
#endif
|
||||
#if !defined(true)
|
||||
#define true TRUE
|
||||
#endif
|
||||
#if !defined(false)
|
||||
#define false FALSE
|
||||
#endif
|
||||
|
||||
// Missing from MSVC6 setupapi.h
|
||||
#if !defined(SPDRP_ADDRESS)
|
||||
#define SPDRP_ADDRESS 28
|
||||
#endif
|
||||
#if !defined(SPDRP_INSTALL_STATE)
|
||||
#define SPDRP_INSTALL_STATE 34
|
||||
#endif
|
||||
|
||||
#if defined(__CYGWIN__ )
|
||||
// cygwin produces a warning unless these prototypes are defined
|
||||
extern int _snprintf(char *buffer, size_t count, const char *format, ...);
|
||||
extern char *_strdup(const char *strSource);
|
||||
// _beginthreadex is MSVCRT => unavailable for cygwin. Fallback to using CreateThread
|
||||
#define _beginthreadex(a, b, c, d, e, f) CreateThread(a, b, (LPTHREAD_START_ROUTINE)c, d, e, f)
|
||||
#endif
|
||||
#define safe_free(p) do {if (p != NULL) {free((void*)p); p = NULL;}} while(0)
|
||||
#define safe_closehandle(h) do {if (h != INVALID_HANDLE_VALUE) {CloseHandle(h); h = INVALID_HANDLE_VALUE;}} while(0)
|
||||
#define safe_min(a, b) min((size_t)(a), (size_t)(b))
|
||||
#define safe_strcp(dst, dst_max, src, count) do {memcpy(dst, src, safe_min(count, dst_max)); \
|
||||
((char*)dst)[safe_min(count, dst_max)-1] = 0;} while(0)
|
||||
#define safe_strcpy(dst, dst_max, src) safe_strcp(dst, dst_max, src, safe_strlen(src)+1)
|
||||
#define safe_strncat(dst, dst_max, src, count) strncat(dst, src, safe_min(count, dst_max - safe_strlen(dst) - 1))
|
||||
#define safe_strcat(dst, dst_max, src) safe_strncat(dst, dst_max, src, safe_strlen(src)+1)
|
||||
#define safe_strcmp(str1, str2) strcmp(((str1==NULL)?"<NULL>":str1), ((str2==NULL)?"<NULL>":str2))
|
||||
#define safe_strncmp(str1, str2, count) strncmp(((str1==NULL)?"<NULL>":str1), ((str2==NULL)?"<NULL>":str2), count)
|
||||
#define safe_strlen(str) ((str==NULL)?0:strlen(str))
|
||||
#define safe_sprintf _snprintf
|
||||
#define safe_unref_device(dev) do {if (dev != NULL) {libusb_unref_device(dev); dev = NULL;}} while(0)
|
||||
#define wchar_to_utf8_ms(wstr, str, strlen) WideCharToMultiByte(CP_UTF8, 0, wstr, -1, str, strlen, NULL, NULL)
|
||||
static inline void upperize(char* str) {
|
||||
size_t i;
|
||||
if (str == NULL) return;
|
||||
for (i=0; i<safe_strlen(str); i++)
|
||||
str[i] = (char)toupper((int)str[i]);
|
||||
}
|
||||
|
||||
#define MAX_CTRL_BUFFER_LENGTH 4096
|
||||
#define MAX_USB_DEVICES 256
|
||||
#define MAX_USB_STRING_LENGTH 128
|
||||
#define MAX_GUID_STRING_LENGTH 40
|
||||
#define MAX_PATH_LENGTH 128
|
||||
#define MAX_KEY_LENGTH 256
|
||||
#define MAX_TIMER_SEMAPHORES 128
|
||||
#define TIMER_REQUEST_RETRY_MS 100
|
||||
#define ERR_BUFFER_SIZE 256
|
||||
#define LIST_SEPARATOR ';'
|
||||
#define HTAB_SIZE 1021
|
||||
|
||||
// http://msdn.microsoft.com/en-us/library/ff545978.aspx
|
||||
// http://msdn.microsoft.com/en-us/library/ff545972.aspx
|
||||
// http://msdn.microsoft.com/en-us/library/ff545982.aspx
|
||||
#if !defined(GUID_DEVINTERFACE_USB_HOST_CONTROLLER)
|
||||
const GUID GUID_DEVINTERFACE_USB_HOST_CONTROLLER = { 0x3ABF6F2D, 0x71C4, 0x462A, {0x8A, 0x92, 0x1E, 0x68, 0x61, 0xE6, 0xAF, 0x27} };
|
||||
#endif
|
||||
#if !defined(GUID_DEVINTERFACE_USB_DEVICE)
|
||||
const GUID GUID_DEVINTERFACE_USB_DEVICE = { 0xA5DCBF10, 0x6530, 0x11D2, {0x90, 0x1F, 0x00, 0xC0, 0x4F, 0xB9, 0x51, 0xED} };
|
||||
#endif
|
||||
#if !defined(GUID_DEVINTERFACE_USB_HUB)
|
||||
const GUID GUID_DEVINTERFACE_USB_HUB = { 0xF18A0E88, 0xC30C, 0x11D0, {0x88, 0x15, 0x00, 0xA0, 0xC9, 0x06, 0xBE, 0xD8} };
|
||||
#endif
|
||||
const GUID GUID_NULL = { 0x00000000, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} };
|
||||
|
||||
|
||||
/*
|
||||
* Multiple USB API backend support
|
||||
*/
|
||||
#define USB_API_UNSUPPORTED 0
|
||||
#define USB_API_HUB 1
|
||||
#define USB_API_COMPOSITE 2
|
||||
#define USB_API_WINUSB 3
|
||||
#define USB_API_MAX 4
|
||||
|
||||
#define CLASS_GUID_UNSUPPORTED GUID_NULL
|
||||
const GUID CLASS_GUID_LIBUSB_WINUSB = { 0x78A1C341, 0x4539, 0x11D3, {0xB8, 0x8D, 0x00, 0xC0, 0x4F, 0xAD, 0x51, 0x71} };
|
||||
const GUID CLASS_GUID_COMPOSITE = { 0x36FC9E60, 0xC465, 0x11cF, {0x80, 0x56, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00} };
|
||||
|
||||
struct windows_usb_api_backend {
|
||||
const uint8_t id;
|
||||
const char* designation;
|
||||
const GUID *class_guid; // The Class GUID (for fallback in case the driver name cannot be read)
|
||||
const char **driver_name_list; // Driver name, without .sys, e.g. "usbccgp"
|
||||
const uint8_t nb_driver_names;
|
||||
int (*init)(struct libusb_context *ctx);
|
||||
int (*exit)(void);
|
||||
int (*open)(struct libusb_device_handle *dev_handle);
|
||||
void (*close)(struct libusb_device_handle *dev_handle);
|
||||
int (*claim_interface)(struct libusb_device_handle *dev_handle, int iface);
|
||||
int (*set_interface_altsetting)(struct libusb_device_handle *dev_handle, int iface, int altsetting);
|
||||
int (*release_interface)(struct libusb_device_handle *dev_handle, int iface);
|
||||
int (*clear_halt)(struct libusb_device_handle *dev_handle, unsigned char endpoint);
|
||||
int (*reset_device)(struct libusb_device_handle *dev_handle);
|
||||
int (*submit_bulk_transfer)(struct usbi_transfer *itransfer);
|
||||
int (*submit_iso_transfer)(struct usbi_transfer *itransfer);
|
||||
int (*submit_control_transfer)(struct usbi_transfer *itransfer);
|
||||
int (*abort_control)(struct usbi_transfer *itransfer);
|
||||
int (*abort_transfers)(struct usbi_transfer *itransfer);
|
||||
int (*copy_transfer_data)(struct usbi_transfer *itransfer, uint32_t io_size);
|
||||
};
|
||||
|
||||
extern const struct windows_usb_api_backend usb_api_backend[USB_API_MAX];
|
||||
|
||||
#define PRINT_UNSUPPORTED_API(fname) \
|
||||
usbi_dbg("unsupported API call for '" \
|
||||
#fname "' (unrecognized device driver)"); \
|
||||
return LIBUSB_ERROR_NOT_SUPPORTED;
|
||||
|
||||
/*
|
||||
* private structures definition
|
||||
* with inline pseudo constructors/destructors
|
||||
*/
|
||||
typedef struct libusb_device_descriptor USB_DEVICE_DESCRIPTOR, *PUSB_DEVICE_DESCRIPTOR;
|
||||
struct windows_device_priv {
|
||||
uint8_t depth; // distance to HCD
|
||||
uint8_t port; // port number on the hub
|
||||
struct libusb_device *parent_dev; // access to parent is required for usermode ops
|
||||
char *path; // device interface path
|
||||
struct windows_usb_api_backend const *apib;
|
||||
struct {
|
||||
char *path; // each interface needs a device interface path,
|
||||
struct windows_usb_api_backend const *apib; // an API backend (multiple drivers support),
|
||||
int8_t nb_endpoints; // and a set of endpoint addresses (USB_MAXENDPOINTS)
|
||||
uint8_t *endpoint;
|
||||
} usb_interface[USB_MAXINTERFACES];
|
||||
uint8_t composite_api_flags; // composite devices require additional data
|
||||
uint8_t active_config;
|
||||
USB_DEVICE_DESCRIPTOR dev_descriptor;
|
||||
unsigned char **config_descriptor; // list of pointers to the cached config descriptors
|
||||
};
|
||||
|
||||
static inline struct windows_device_priv *_device_priv(struct libusb_device *dev) {
|
||||
return (struct windows_device_priv *)dev->os_priv;
|
||||
}
|
||||
|
||||
static inline void windows_device_priv_init(libusb_device* dev) {
|
||||
struct windows_device_priv* p = _device_priv(dev);
|
||||
int i;
|
||||
p->depth = 0;
|
||||
p->port = 0;
|
||||
p->parent_dev = NULL;
|
||||
p->path = NULL;
|
||||
p->apib = &usb_api_backend[USB_API_UNSUPPORTED];
|
||||
p->composite_api_flags = 0;
|
||||
p->active_config = 0;
|
||||
p->config_descriptor = NULL;
|
||||
memset(&(p->dev_descriptor), 0, sizeof(USB_DEVICE_DESCRIPTOR));
|
||||
for (i=0; i<USB_MAXINTERFACES; i++) {
|
||||
p->usb_interface[i].path = NULL;
|
||||
p->usb_interface[i].apib = &usb_api_backend[USB_API_UNSUPPORTED];
|
||||
p->usb_interface[i].nb_endpoints = 0;
|
||||
p->usb_interface[i].endpoint = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static inline void windows_device_priv_release(libusb_device* dev) {
|
||||
struct windows_device_priv* p = _device_priv(dev);
|
||||
int i;
|
||||
safe_free(p->path);
|
||||
if ((dev->num_configurations > 0) && (p->config_descriptor != NULL)) {
|
||||
for (i=0; i < dev->num_configurations; i++)
|
||||
safe_free(p->config_descriptor[i]);
|
||||
}
|
||||
safe_free(p->config_descriptor);
|
||||
for (i=0; i<USB_MAXINTERFACES; i++) {
|
||||
safe_free(p->usb_interface[i].path);
|
||||
safe_free(p->usb_interface[i].endpoint);
|
||||
}
|
||||
}
|
||||
|
||||
struct interface_handle_t {
|
||||
HANDLE dev_handle; // WinUSB needs an extra handle for the file
|
||||
HANDLE api_handle; // used by the API to communicate with the device
|
||||
};
|
||||
|
||||
struct windows_device_handle_priv {
|
||||
int active_interface;
|
||||
struct interface_handle_t interface_handle[USB_MAXINTERFACES];
|
||||
int autoclaim_count[USB_MAXINTERFACES]; // For auto-release
|
||||
};
|
||||
|
||||
static inline struct windows_device_handle_priv *_device_handle_priv(
|
||||
struct libusb_device_handle *handle)
|
||||
{
|
||||
return (struct windows_device_handle_priv *) handle->os_priv;
|
||||
}
|
||||
|
||||
// used for async polling functions
|
||||
struct windows_transfer_priv {
|
||||
struct winfd pollable_fd;
|
||||
uint8_t interface_number;
|
||||
};
|
||||
|
||||
// used to match a device driver (including filter drivers) against a supported API
|
||||
struct driver_lookup {
|
||||
char list[MAX_KEY_LENGTH+1];// REG_MULTI_SZ list of services (driver) names
|
||||
const DWORD reg_prop; // SPDRP registry key to use to retreive list
|
||||
const char* designation; // internal designation (for debug output)
|
||||
};
|
||||
|
||||
/*
|
||||
* API macros - from libusb-win32 1.x
|
||||
*/
|
||||
#define DLL_DECLARE_PREFIXNAME(api, ret, prefixname, name, args) \
|
||||
typedef ret (api * __dll_##name##_t)args; \
|
||||
static __dll_##name##_t prefixname = NULL
|
||||
|
||||
#define DLL_LOAD_PREFIXNAME(dll, prefixname, name, ret_on_failure) \
|
||||
do { \
|
||||
HMODULE h = GetModuleHandleA(#dll); \
|
||||
if (!h) \
|
||||
h = LoadLibraryA(#dll); \
|
||||
if (!h) { \
|
||||
if (ret_on_failure) { return LIBUSB_ERROR_NOT_FOUND; }\
|
||||
else { break; } \
|
||||
} \
|
||||
prefixname = (__dll_##name##_t)GetProcAddress(h, #name); \
|
||||
if (prefixname) break; \
|
||||
prefixname = (__dll_##name##_t)GetProcAddress(h, #name "A"); \
|
||||
if (prefixname) break; \
|
||||
prefixname = (__dll_##name##_t)GetProcAddress(h, #name "W"); \
|
||||
if (prefixname) break; \
|
||||
if(ret_on_failure) \
|
||||
return LIBUSB_ERROR_NOT_FOUND; \
|
||||
} while(0)
|
||||
|
||||
#define DLL_DECLARE(api, ret, name, args) DLL_DECLARE_PREFIXNAME(api, ret, name, name, args)
|
||||
#define DLL_LOAD(dll, name, ret_on_failure) DLL_LOAD_PREFIXNAME(dll, name, name, ret_on_failure)
|
||||
#define DLL_DECLARE_PREFIXED(api, ret, prefix, name, args) DLL_DECLARE_PREFIXNAME(api, ret, prefix##name, name, args)
|
||||
#define DLL_LOAD_PREFIXED(dll, prefix, name, ret_on_failure) DLL_LOAD_PREFIXNAME(dll, prefix##name, name, ret_on_failure)
|
||||
|
||||
/* OLE32 dependency */
|
||||
DLL_DECLARE_PREFIXED(WINAPI, HRESULT, p, CLSIDFromString, (LPCOLESTR, LPCLSID));
|
||||
|
||||
/* SetupAPI dependencies */
|
||||
DLL_DECLARE_PREFIXED(WINAPI, HDEVINFO, p, SetupDiGetClassDevsA, (const GUID*, PCSTR, HWND, DWORD));
|
||||
DLL_DECLARE_PREFIXED(WINAPI, BOOL, p, SetupDiEnumDeviceInfo, (HDEVINFO, DWORD, PSP_DEVINFO_DATA));
|
||||
DLL_DECLARE_PREFIXED(WINAPI, BOOL, p, SetupDiEnumDeviceInterfaces, (HDEVINFO, PSP_DEVINFO_DATA,
|
||||
const GUID*, DWORD, PSP_DEVICE_INTERFACE_DATA));
|
||||
DLL_DECLARE_PREFIXED(WINAPI, BOOL, p, SetupDiGetDeviceInterfaceDetailA, (HDEVINFO, PSP_DEVICE_INTERFACE_DATA,
|
||||
PSP_DEVICE_INTERFACE_DETAIL_DATA_A, DWORD, PDWORD, PSP_DEVINFO_DATA));
|
||||
DLL_DECLARE_PREFIXED(WINAPI, BOOL, p, SetupDiDestroyDeviceInfoList, (HDEVINFO));
|
||||
DLL_DECLARE_PREFIXED(WINAPI, HKEY, p, SetupDiOpenDevRegKey, (HDEVINFO, PSP_DEVINFO_DATA, DWORD, DWORD, DWORD, REGSAM));
|
||||
DLL_DECLARE_PREFIXED(WINAPI, BOOL, p, SetupDiGetDeviceRegistryPropertyA, (HDEVINFO,
|
||||
PSP_DEVINFO_DATA, DWORD, PDWORD, PBYTE, DWORD, PDWORD));
|
||||
DLL_DECLARE_PREFIXED(WINAPI, LONG, p, RegQueryValueExW, (HKEY, LPCWSTR, LPDWORD, LPDWORD, LPBYTE, LPDWORD));
|
||||
DLL_DECLARE_PREFIXED(WINAPI, LONG, p, RegCloseKey, (HKEY));
|
||||
|
||||
/*
|
||||
* Windows DDK API definitions. Most of it copied from MinGW's includes
|
||||
*/
|
||||
typedef DWORD DEVNODE, DEVINST;
|
||||
typedef DEVNODE *PDEVNODE, *PDEVINST;
|
||||
typedef DWORD RETURN_TYPE;
|
||||
typedef RETURN_TYPE CONFIGRET;
|
||||
|
||||
#define CR_SUCCESS 0x00000000
|
||||
#define CR_NO_SUCH_DEVNODE 0x0000000D
|
||||
|
||||
#define USB_DEVICE_DESCRIPTOR_TYPE LIBUSB_DT_DEVICE
|
||||
#define USB_CONFIGURATION_DESCRIPTOR_TYPE LIBUSB_DT_CONFIG
|
||||
#define USB_STRING_DESCRIPTOR_TYPE LIBUSB_DT_STRING
|
||||
#define USB_INTERFACE_DESCRIPTOR_TYPE LIBUSB_DT_INTERFACE
|
||||
#define USB_ENDPOINT_DESCRIPTOR_TYPE LIBUSB_DT_ENDPOINT
|
||||
|
||||
#define USB_REQUEST_GET_STATUS LIBUSB_REQUEST_GET_STATUS
|
||||
#define USB_REQUEST_CLEAR_FEATURE LIBUSB_REQUEST_CLEAR_FEATURE
|
||||
#define USB_REQUEST_SET_FEATURE LIBUSB_REQUEST_SET_FEATURE
|
||||
#define USB_REQUEST_SET_ADDRESS LIBUSB_REQUEST_SET_ADDRESS
|
||||
#define USB_REQUEST_GET_DESCRIPTOR LIBUSB_REQUEST_GET_DESCRIPTOR
|
||||
#define USB_REQUEST_SET_DESCRIPTOR LIBUSB_REQUEST_SET_DESCRIPTOR
|
||||
#define USB_REQUEST_GET_CONFIGURATION LIBUSB_REQUEST_GET_CONFIGURATION
|
||||
#define USB_REQUEST_SET_CONFIGURATION LIBUSB_REQUEST_SET_CONFIGURATION
|
||||
#define USB_REQUEST_GET_INTERFACE LIBUSB_REQUEST_GET_INTERFACE
|
||||
#define USB_REQUEST_SET_INTERFACE LIBUSB_REQUEST_SET_INTERFACE
|
||||
#define USB_REQUEST_SYNC_FRAME LIBUSB_REQUEST_SYNCH_FRAME
|
||||
|
||||
#define USB_GET_NODE_INFORMATION 258
|
||||
#define USB_GET_DESCRIPTOR_FROM_NODE_CONNECTION 260
|
||||
#define USB_GET_NODE_CONNECTION_NAME 261
|
||||
#define USB_GET_HUB_CAPABILITIES 271
|
||||
#if !defined(USB_GET_NODE_CONNECTION_INFORMATION_EX)
|
||||
#define USB_GET_NODE_CONNECTION_INFORMATION_EX 274
|
||||
#endif
|
||||
#if !defined(USB_GET_HUB_CAPABILITIES_EX)
|
||||
#define USB_GET_HUB_CAPABILITIES_EX 276
|
||||
#endif
|
||||
|
||||
#ifndef METHOD_BUFFERED
|
||||
#define METHOD_BUFFERED 0
|
||||
#endif
|
||||
#ifndef FILE_ANY_ACCESS
|
||||
#define FILE_ANY_ACCESS 0x00000000
|
||||
#endif
|
||||
#ifndef FILE_DEVICE_UNKNOWN
|
||||
#define FILE_DEVICE_UNKNOWN 0x00000022
|
||||
#endif
|
||||
#ifndef FILE_DEVICE_USB
|
||||
#define FILE_DEVICE_USB FILE_DEVICE_UNKNOWN
|
||||
#endif
|
||||
|
||||
#ifndef CTL_CODE
|
||||
#define CTL_CODE(DeviceType, Function, Method, Access)( \
|
||||
((DeviceType) << 16) | ((Access) << 14) | ((Function) << 2) | (Method))
|
||||
#endif
|
||||
|
||||
typedef enum USB_CONNECTION_STATUS {
|
||||
NoDeviceConnected,
|
||||
DeviceConnected,
|
||||
DeviceFailedEnumeration,
|
||||
DeviceGeneralFailure,
|
||||
DeviceCausedOvercurrent,
|
||||
DeviceNotEnoughPower,
|
||||
DeviceNotEnoughBandwidth,
|
||||
DeviceHubNestedTooDeeply,
|
||||
DeviceInLegacyHub
|
||||
} USB_CONNECTION_STATUS, *PUSB_CONNECTION_STATUS;
|
||||
|
||||
typedef enum USB_HUB_NODE {
|
||||
UsbHub,
|
||||
UsbMIParent
|
||||
} USB_HUB_NODE;
|
||||
|
||||
/* Cfgmgr32.dll interface */
|
||||
DLL_DECLARE(WINAPI, CONFIGRET, CM_Get_Parent, (PDEVINST, DEVINST, ULONG));
|
||||
DLL_DECLARE(WINAPI, CONFIGRET, CM_Get_Child, (PDEVINST, DEVINST, ULONG));
|
||||
DLL_DECLARE(WINAPI, CONFIGRET, CM_Get_Sibling, (PDEVINST, DEVINST, ULONG));
|
||||
DLL_DECLARE(WINAPI, CONFIGRET, CM_Get_Device_IDA, (DEVINST, PCHAR, ULONG, ULONG));
|
||||
|
||||
#define IOCTL_USB_GET_HUB_CAPABILITIES_EX \
|
||||
CTL_CODE( FILE_DEVICE_USB, USB_GET_HUB_CAPABILITIES_EX, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_USB_GET_HUB_CAPABILITIES \
|
||||
CTL_CODE(FILE_DEVICE_USB, USB_GET_HUB_CAPABILITIES, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_USB_GET_DESCRIPTOR_FROM_NODE_CONNECTION \
|
||||
CTL_CODE(FILE_DEVICE_USB, USB_GET_DESCRIPTOR_FROM_NODE_CONNECTION, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_USB_GET_ROOT_HUB_NAME \
|
||||
CTL_CODE(FILE_DEVICE_USB, HCD_GET_ROOT_HUB_NAME, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_USB_GET_NODE_INFORMATION \
|
||||
CTL_CODE(FILE_DEVICE_USB, USB_GET_NODE_INFORMATION, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_USB_GET_NODE_CONNECTION_INFORMATION_EX \
|
||||
CTL_CODE(FILE_DEVICE_USB, USB_GET_NODE_CONNECTION_INFORMATION_EX, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_USB_GET_NODE_CONNECTION_ATTRIBUTES \
|
||||
CTL_CODE(FILE_DEVICE_USB, USB_GET_NODE_CONNECTION_ATTRIBUTES, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_USB_GET_NODE_CONNECTION_NAME \
|
||||
CTL_CODE(FILE_DEVICE_USB, USB_GET_NODE_CONNECTION_NAME, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
// Most of the structures below need to be packed
|
||||
#pragma pack(push, 1)
|
||||
|
||||
typedef struct USB_INTERFACE_DESCRIPTOR {
|
||||
UCHAR bLength;
|
||||
UCHAR bDescriptorType;
|
||||
UCHAR bInterfaceNumber;
|
||||
UCHAR bAlternateSetting;
|
||||
UCHAR bNumEndpoints;
|
||||
UCHAR bInterfaceClass;
|
||||
UCHAR bInterfaceSubClass;
|
||||
UCHAR bInterfaceProtocol;
|
||||
UCHAR iInterface;
|
||||
} USB_INTERFACE_DESCRIPTOR, *PUSB_INTERFACE_DESCRIPTOR;
|
||||
|
||||
typedef struct USB_CONFIGURATION_DESCRIPTOR {
|
||||
UCHAR bLength;
|
||||
UCHAR bDescriptorType;
|
||||
USHORT wTotalLength;
|
||||
UCHAR bNumInterfaces;
|
||||
UCHAR bConfigurationValue;
|
||||
UCHAR iConfiguration;
|
||||
UCHAR bmAttributes;
|
||||
UCHAR MaxPower;
|
||||
} USB_CONFIGURATION_DESCRIPTOR, *PUSB_CONFIGURATION_DESCRIPTOR;
|
||||
|
||||
typedef struct USB_CONFIGURATION_DESCRIPTOR_SHORT {
|
||||
struct {
|
||||
ULONG ConnectionIndex;
|
||||
struct {
|
||||
UCHAR bmRequest;
|
||||
UCHAR bRequest;
|
||||
USHORT wValue;
|
||||
USHORT wIndex;
|
||||
USHORT wLength;
|
||||
} SetupPacket;
|
||||
} req;
|
||||
USB_CONFIGURATION_DESCRIPTOR data;
|
||||
} USB_CONFIGURATION_DESCRIPTOR_SHORT;
|
||||
|
||||
typedef struct USB_ENDPOINT_DESCRIPTOR {
|
||||
UCHAR bLength;
|
||||
UCHAR bDescriptorType;
|
||||
UCHAR bEndpointAddress;
|
||||
UCHAR bmAttributes;
|
||||
USHORT wMaxPacketSize;
|
||||
UCHAR bInterval;
|
||||
} USB_ENDPOINT_DESCRIPTOR, *PUSB_ENDPOINT_DESCRIPTOR;
|
||||
|
||||
typedef struct USB_DESCRIPTOR_REQUEST {
|
||||
ULONG ConnectionIndex;
|
||||
struct {
|
||||
UCHAR bmRequest;
|
||||
UCHAR bRequest;
|
||||
USHORT wValue;
|
||||
USHORT wIndex;
|
||||
USHORT wLength;
|
||||
} SetupPacket;
|
||||
// UCHAR Data[0];
|
||||
} USB_DESCRIPTOR_REQUEST, *PUSB_DESCRIPTOR_REQUEST;
|
||||
|
||||
typedef struct USB_HUB_DESCRIPTOR {
|
||||
UCHAR bDescriptorLength;
|
||||
UCHAR bDescriptorType;
|
||||
UCHAR bNumberOfPorts;
|
||||
USHORT wHubCharacteristics;
|
||||
UCHAR bPowerOnToPowerGood;
|
||||
UCHAR bHubControlCurrent;
|
||||
UCHAR bRemoveAndPowerMask[64];
|
||||
} USB_HUB_DESCRIPTOR, *PUSB_HUB_DESCRIPTOR;
|
||||
|
||||
typedef struct USB_ROOT_HUB_NAME {
|
||||
ULONG ActualLength;
|
||||
WCHAR RootHubName[1];
|
||||
} USB_ROOT_HUB_NAME, *PUSB_ROOT_HUB_NAME;
|
||||
|
||||
typedef struct USB_ROOT_HUB_NAME_FIXED {
|
||||
ULONG ActualLength;
|
||||
WCHAR RootHubName[MAX_PATH_LENGTH];
|
||||
} USB_ROOT_HUB_NAME_FIXED;
|
||||
|
||||
typedef struct USB_NODE_CONNECTION_NAME {
|
||||
ULONG ConnectionIndex;
|
||||
ULONG ActualLength;
|
||||
WCHAR NodeName[1];
|
||||
} USB_NODE_CONNECTION_NAME, *PUSB_NODE_CONNECTION_NAME;
|
||||
|
||||
typedef struct USB_NODE_CONNECTION_NAME_FIXED {
|
||||
ULONG ConnectionIndex;
|
||||
ULONG ActualLength;
|
||||
WCHAR NodeName[MAX_PATH_LENGTH];
|
||||
} USB_NODE_CONNECTION_NAME_FIXED;
|
||||
|
||||
typedef struct USB_HUB_NAME_FIXED {
|
||||
union {
|
||||
USB_ROOT_HUB_NAME_FIXED root;
|
||||
USB_NODE_CONNECTION_NAME_FIXED node;
|
||||
} u;
|
||||
} USB_HUB_NAME_FIXED;
|
||||
|
||||
typedef struct USB_HUB_INFORMATION {
|
||||
USB_HUB_DESCRIPTOR HubDescriptor;
|
||||
BOOLEAN HubIsBusPowered;
|
||||
} USB_HUB_INFORMATION, *PUSB_HUB_INFORMATION;
|
||||
|
||||
typedef struct USB_MI_PARENT_INFORMATION {
|
||||
ULONG NumberOfInterfaces;
|
||||
} USB_MI_PARENT_INFORMATION, *PUSB_MI_PARENT_INFORMATION;
|
||||
|
||||
typedef struct USB_NODE_INFORMATION {
|
||||
USB_HUB_NODE NodeType;
|
||||
union {
|
||||
USB_HUB_INFORMATION HubInformation;
|
||||
USB_MI_PARENT_INFORMATION MiParentInformation;
|
||||
} u;
|
||||
} USB_NODE_INFORMATION, *PUSB_NODE_INFORMATION;
|
||||
|
||||
typedef struct USB_PIPE_INFO {
|
||||
USB_ENDPOINT_DESCRIPTOR EndpointDescriptor;
|
||||
ULONG ScheduleOffset;
|
||||
} USB_PIPE_INFO, *PUSB_PIPE_INFO;
|
||||
|
||||
typedef struct USB_NODE_CONNECTION_INFORMATION_EX {
|
||||
ULONG ConnectionIndex;
|
||||
USB_DEVICE_DESCRIPTOR DeviceDescriptor;
|
||||
UCHAR CurrentConfigurationValue;
|
||||
UCHAR Speed;
|
||||
BOOLEAN DeviceIsHub;
|
||||
USHORT DeviceAddress;
|
||||
ULONG NumberOfOpenPipes;
|
||||
USB_CONNECTION_STATUS ConnectionStatus;
|
||||
// USB_PIPE_INFO PipeList[0];
|
||||
} USB_NODE_CONNECTION_INFORMATION_EX, *PUSB_NODE_CONNECTION_INFORMATION_EX;
|
||||
|
||||
typedef struct USB_HUB_CAP_FLAGS {
|
||||
ULONG HubIsHighSpeedCapable:1;
|
||||
ULONG HubIsHighSpeed:1;
|
||||
ULONG HubIsMultiTtCapable:1;
|
||||
ULONG HubIsMultiTt:1;
|
||||
ULONG HubIsRoot:1;
|
||||
ULONG HubIsArmedWakeOnConnect:1;
|
||||
ULONG ReservedMBZ:26;
|
||||
} USB_HUB_CAP_FLAGS, *PUSB_HUB_CAP_FLAGS;
|
||||
|
||||
typedef struct USB_HUB_CAPABILITIES {
|
||||
ULONG HubIs2xCapable : 1;
|
||||
} USB_HUB_CAPABILITIES, *PUSB_HUB_CAPABILITIES;
|
||||
|
||||
typedef struct USB_HUB_CAPABILITIES_EX {
|
||||
USB_HUB_CAP_FLAGS CapabilityFlags;
|
||||
} USB_HUB_CAPABILITIES_EX, *PUSB_HUB_CAPABILITIES_EX;
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
/* winusb.dll interface */
|
||||
|
||||
#define SHORT_PACKET_TERMINATE 0x01
|
||||
#define AUTO_CLEAR_STALL 0x02
|
||||
#define PIPE_TRANSFER_TIMEOUT 0x03
|
||||
#define IGNORE_SHORT_PACKETS 0x04
|
||||
#define ALLOW_PARTIAL_READS 0x05
|
||||
#define AUTO_FLUSH 0x06
|
||||
#define RAW_IO 0x07
|
||||
#define MAXIMUM_TRANSFER_SIZE 0x08
|
||||
#define AUTO_SUSPEND 0x81
|
||||
#define SUSPEND_DELAY 0x83
|
||||
#define DEVICE_SPEED 0x01
|
||||
#define LowSpeed 0x01
|
||||
#define FullSpeed 0x02
|
||||
#define HighSpeed 0x03
|
||||
|
||||
typedef enum USBD_PIPE_TYPE {
|
||||
UsbdPipeTypeControl,
|
||||
UsbdPipeTypeIsochronous,
|
||||
UsbdPipeTypeBulk,
|
||||
UsbdPipeTypeInterrupt
|
||||
} USBD_PIPE_TYPE;
|
||||
|
||||
typedef struct {
|
||||
USBD_PIPE_TYPE PipeType;
|
||||
UCHAR PipeId;
|
||||
USHORT MaximumPacketSize;
|
||||
UCHAR Interval;
|
||||
} WINUSB_PIPE_INFORMATION, *PWINUSB_PIPE_INFORMATION;
|
||||
|
||||
#pragma pack(1)
|
||||
typedef struct {
|
||||
UCHAR request_type;
|
||||
UCHAR request;
|
||||
USHORT value;
|
||||
USHORT index;
|
||||
USHORT length;
|
||||
} WINUSB_SETUP_PACKET, *PWINUSB_SETUP_PACKET;
|
||||
#pragma pack()
|
||||
|
||||
typedef void *WINUSB_INTERFACE_HANDLE, *PWINUSB_INTERFACE_HANDLE;
|
||||
|
||||
DLL_DECLARE(WINAPI, BOOL, WinUsb_Initialize, (HANDLE, PWINUSB_INTERFACE_HANDLE));
|
||||
DLL_DECLARE(WINAPI, BOOL, WinUsb_Free, (WINUSB_INTERFACE_HANDLE));
|
||||
DLL_DECLARE(WINAPI, BOOL, WinUsb_GetAssociatedInterface, (WINUSB_INTERFACE_HANDLE, UCHAR, PWINUSB_INTERFACE_HANDLE));
|
||||
DLL_DECLARE(WINAPI, BOOL, WinUsb_GetDescriptor, (WINUSB_INTERFACE_HANDLE, UCHAR, UCHAR, USHORT, PUCHAR, ULONG, PULONG));
|
||||
DLL_DECLARE(WINAPI, BOOL, WinUsb_QueryInterfaceSettings, (WINUSB_INTERFACE_HANDLE, UCHAR, PUSB_INTERFACE_DESCRIPTOR));
|
||||
DLL_DECLARE(WINAPI, BOOL, WinUsb_QueryDeviceInformation, (WINUSB_INTERFACE_HANDLE, ULONG, PULONG, PVOID));
|
||||
DLL_DECLARE(WINAPI, BOOL, WinUsb_SetCurrentAlternateSetting, (WINUSB_INTERFACE_HANDLE, UCHAR));
|
||||
DLL_DECLARE(WINAPI, BOOL, WinUsb_GetCurrentAlternateSetting, (WINUSB_INTERFACE_HANDLE, PUCHAR));
|
||||
DLL_DECLARE(WINAPI, BOOL, WinUsb_QueryPipe, (WINUSB_INTERFACE_HANDLE, UCHAR, UCHAR, PWINUSB_PIPE_INFORMATION));
|
||||
DLL_DECLARE(WINAPI, BOOL, WinUsb_SetPipePolicy, (WINUSB_INTERFACE_HANDLE, UCHAR, ULONG, ULONG, PVOID));
|
||||
DLL_DECLARE(WINAPI, BOOL, WinUsb_GetPipePolicy, (WINUSB_INTERFACE_HANDLE, UCHAR, ULONG, PULONG, PVOID));
|
||||
DLL_DECLARE(WINAPI, BOOL, WinUsb_ReadPipe, (WINUSB_INTERFACE_HANDLE, UCHAR, PUCHAR, ULONG, PULONG, LPOVERLAPPED));
|
||||
DLL_DECLARE(WINAPI, BOOL, WinUsb_WritePipe, (WINUSB_INTERFACE_HANDLE, UCHAR, PUCHAR, ULONG, PULONG, LPOVERLAPPED));
|
||||
DLL_DECLARE(WINAPI, BOOL, WinUsb_ControlTransfer, (WINUSB_INTERFACE_HANDLE, WINUSB_SETUP_PACKET, PUCHAR, ULONG, PULONG, LPOVERLAPPED));
|
||||
DLL_DECLARE(WINAPI, BOOL, WinUsb_ResetPipe, (WINUSB_INTERFACE_HANDLE, UCHAR));
|
||||
DLL_DECLARE(WINAPI, BOOL, WinUsb_AbortPipe, (WINUSB_INTERFACE_HANDLE, UCHAR));
|
||||
DLL_DECLARE(WINAPI, BOOL, WinUsb_FlushPipe, (WINUSB_INTERFACE_HANDLE, UCHAR));
|
|
@ -0,0 +1,314 @@
|
|||
/*
|
||||
* Synchronous I/O functions for libusb
|
||||
* Copyright (C) 2007-2008 Daniel Drake <dsd@gentoo.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <errno.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "libusbi.h"
|
||||
|
||||
/**
|
||||
* @defgroup syncio Synchronous device I/O
|
||||
*
|
||||
* This page documents libusb's synchronous (blocking) API for USB device I/O.
|
||||
* This interface is easy to use but has some limitations. More advanced users
|
||||
* may wish to consider using the \ref asyncio "asynchronous I/O API" instead.
|
||||
*/
|
||||
|
||||
static void LIBUSB_CALL ctrl_transfer_cb(struct libusb_transfer *transfer)
|
||||
{
|
||||
int *completed = transfer->user_data;
|
||||
*completed = 1;
|
||||
usbi_dbg("actual_length=%d", transfer->actual_length);
|
||||
/* caller interprets result and frees transfer */
|
||||
}
|
||||
|
||||
/** \ingroup syncio
|
||||
* Perform a USB control transfer.
|
||||
*
|
||||
* The direction of the transfer is inferred from the bmRequestType field of
|
||||
* the setup packet.
|
||||
*
|
||||
* The wValue, wIndex and wLength fields values should be given in host-endian
|
||||
* byte order.
|
||||
*
|
||||
* \param dev_handle a handle for the device to communicate with
|
||||
* \param bmRequestType the request type field for the setup packet
|
||||
* \param bRequest the request field for the setup packet
|
||||
* \param wValue the value field for the setup packet
|
||||
* \param wIndex the index field for the setup packet
|
||||
* \param data a suitably-sized data buffer for either input or output
|
||||
* (depending on direction bits within bmRequestType)
|
||||
* \param wLength the length field for the setup packet. The data buffer should
|
||||
* be at least this size.
|
||||
* \param timeout timeout (in millseconds) that this function should wait
|
||||
* before giving up due to no response being received. For an unlimited
|
||||
* timeout, use value 0.
|
||||
* \returns on success, the number of bytes actually transferred
|
||||
* \returns LIBUSB_ERROR_TIMEOUT if the transfer timed out
|
||||
* \returns LIBUSB_ERROR_PIPE if the control request was not supported by the
|
||||
* device
|
||||
* \returns LIBUSB_ERROR_NO_DEVICE if the device has been disconnected
|
||||
* \returns another LIBUSB_ERROR code on other failures
|
||||
*/
|
||||
int API_EXPORTED libusb_control_transfer(libusb_device_handle *dev_handle,
|
||||
uint8_t bmRequestType, uint8_t bRequest, uint16_t wValue, uint16_t wIndex,
|
||||
unsigned char *data, uint16_t wLength, unsigned int timeout)
|
||||
{
|
||||
struct libusb_transfer *transfer = libusb_alloc_transfer(0);
|
||||
unsigned char *buffer;
|
||||
int completed = 0;
|
||||
int r;
|
||||
|
||||
if (!transfer)
|
||||
return LIBUSB_ERROR_NO_MEM;
|
||||
|
||||
buffer = malloc(LIBUSB_CONTROL_SETUP_SIZE + wLength);
|
||||
if (!buffer) {
|
||||
libusb_free_transfer(transfer);
|
||||
return LIBUSB_ERROR_NO_MEM;
|
||||
}
|
||||
|
||||
libusb_fill_control_setup(buffer, bmRequestType, bRequest, wValue, wIndex,
|
||||
wLength);
|
||||
if ((bmRequestType & LIBUSB_ENDPOINT_DIR_MASK) == LIBUSB_ENDPOINT_OUT)
|
||||
memcpy(buffer + LIBUSB_CONTROL_SETUP_SIZE, data, wLength);
|
||||
|
||||
libusb_fill_control_transfer(transfer, dev_handle, buffer,
|
||||
ctrl_transfer_cb, &completed, timeout);
|
||||
transfer->flags = LIBUSB_TRANSFER_FREE_BUFFER;
|
||||
r = libusb_submit_transfer(transfer);
|
||||
if (r < 0) {
|
||||
libusb_free_transfer(transfer);
|
||||
return r;
|
||||
}
|
||||
|
||||
while (!completed) {
|
||||
r = libusb_handle_events_completed(HANDLE_CTX(dev_handle), &completed);
|
||||
if (r < 0) {
|
||||
if (r == LIBUSB_ERROR_INTERRUPTED)
|
||||
continue;
|
||||
libusb_cancel_transfer(transfer);
|
||||
while (!completed)
|
||||
if (libusb_handle_events_completed(HANDLE_CTX(dev_handle), &completed) < 0)
|
||||
break;
|
||||
libusb_free_transfer(transfer);
|
||||
return r;
|
||||
}
|
||||
}
|
||||
|
||||
if ((bmRequestType & LIBUSB_ENDPOINT_DIR_MASK) == LIBUSB_ENDPOINT_IN)
|
||||
memcpy(data, libusb_control_transfer_get_data(transfer),
|
||||
transfer->actual_length);
|
||||
|
||||
switch (transfer->status) {
|
||||
case LIBUSB_TRANSFER_COMPLETED:
|
||||
r = transfer->actual_length;
|
||||
break;
|
||||
case LIBUSB_TRANSFER_TIMED_OUT:
|
||||
r = LIBUSB_ERROR_TIMEOUT;
|
||||
break;
|
||||
case LIBUSB_TRANSFER_STALL:
|
||||
r = LIBUSB_ERROR_PIPE;
|
||||
break;
|
||||
case LIBUSB_TRANSFER_NO_DEVICE:
|
||||
r = LIBUSB_ERROR_NO_DEVICE;
|
||||
break;
|
||||
case LIBUSB_TRANSFER_OVERFLOW:
|
||||
r = LIBUSB_ERROR_OVERFLOW;
|
||||
break;
|
||||
default:
|
||||
usbi_warn(HANDLE_CTX(dev_handle),
|
||||
"unrecognised status code %d", transfer->status);
|
||||
r = LIBUSB_ERROR_OTHER;
|
||||
}
|
||||
|
||||
libusb_free_transfer(transfer);
|
||||
return r;
|
||||
}
|
||||
|
||||
static void LIBUSB_CALL bulk_transfer_cb(struct libusb_transfer *transfer)
|
||||
{
|
||||
int *completed = transfer->user_data;
|
||||
*completed = 1;
|
||||
usbi_dbg("actual_length=%d", transfer->actual_length);
|
||||
/* caller interprets results and frees transfer */
|
||||
}
|
||||
|
||||
static int do_sync_bulk_transfer(struct libusb_device_handle *dev_handle,
|
||||
unsigned char endpoint, unsigned char *buffer, int length,
|
||||
int *transferred, unsigned int timeout, unsigned char type)
|
||||
{
|
||||
struct libusb_transfer *transfer = libusb_alloc_transfer(0);
|
||||
int completed = 0;
|
||||
int r;
|
||||
|
||||
if (!transfer)
|
||||
return LIBUSB_ERROR_NO_MEM;
|
||||
|
||||
libusb_fill_bulk_transfer(transfer, dev_handle, endpoint, buffer, length,
|
||||
bulk_transfer_cb, &completed, timeout);
|
||||
transfer->type = type;
|
||||
|
||||
r = libusb_submit_transfer(transfer);
|
||||
if (r < 0) {
|
||||
libusb_free_transfer(transfer);
|
||||
return r;
|
||||
}
|
||||
|
||||
while (!completed) {
|
||||
r = libusb_handle_events_completed(HANDLE_CTX(dev_handle), &completed);
|
||||
if (r < 0) {
|
||||
if (r == LIBUSB_ERROR_INTERRUPTED)
|
||||
continue;
|
||||
libusb_cancel_transfer(transfer);
|
||||
while (!completed)
|
||||
if (libusb_handle_events_completed(HANDLE_CTX(dev_handle), &completed) < 0)
|
||||
break;
|
||||
libusb_free_transfer(transfer);
|
||||
return r;
|
||||
}
|
||||
}
|
||||
|
||||
*transferred = transfer->actual_length;
|
||||
switch (transfer->status) {
|
||||
case LIBUSB_TRANSFER_COMPLETED:
|
||||
r = 0;
|
||||
break;
|
||||
case LIBUSB_TRANSFER_TIMED_OUT:
|
||||
r = LIBUSB_ERROR_TIMEOUT;
|
||||
break;
|
||||
case LIBUSB_TRANSFER_STALL:
|
||||
r = LIBUSB_ERROR_PIPE;
|
||||
break;
|
||||
case LIBUSB_TRANSFER_OVERFLOW:
|
||||
r = LIBUSB_ERROR_OVERFLOW;
|
||||
break;
|
||||
case LIBUSB_TRANSFER_NO_DEVICE:
|
||||
r = LIBUSB_ERROR_NO_DEVICE;
|
||||
break;
|
||||
default:
|
||||
usbi_warn(HANDLE_CTX(dev_handle),
|
||||
"unrecognised status code %d", transfer->status);
|
||||
r = LIBUSB_ERROR_OTHER;
|
||||
}
|
||||
|
||||
libusb_free_transfer(transfer);
|
||||
return r;
|
||||
}
|
||||
|
||||
/** \ingroup syncio
|
||||
* Perform a USB bulk transfer. The direction of the transfer is inferred from
|
||||
* the direction bits of the endpoint address.
|
||||
*
|
||||
* For bulk reads, the <tt>length</tt> field indicates the maximum length of
|
||||
* data you are expecting to receive. If less data arrives than expected,
|
||||
* this function will return that data, so be sure to check the
|
||||
* <tt>transferred</tt> output parameter.
|
||||
*
|
||||
* You should also check the <tt>transferred</tt> parameter for bulk writes.
|
||||
* Not all of the data may have been written.
|
||||
*
|
||||
* Also check <tt>transferred</tt> when dealing with a timeout error code.
|
||||
* libusb may have to split your transfer into a number of chunks to satisfy
|
||||
* underlying O/S requirements, meaning that the timeout may expire after
|
||||
* the first few chunks have completed. libusb is careful not to lose any data
|
||||
* that may have been transferred; do not assume that timeout conditions
|
||||
* indicate a complete lack of I/O.
|
||||
*
|
||||
* \param dev_handle a handle for the device to communicate with
|
||||
* \param endpoint the address of a valid endpoint to communicate with
|
||||
* \param data a suitably-sized data buffer for either input or output
|
||||
* (depending on endpoint)
|
||||
* \param length for bulk writes, the number of bytes from data to be sent. for
|
||||
* bulk reads, the maximum number of bytes to receive into the data buffer.
|
||||
* \param transferred output location for the number of bytes actually
|
||||
* transferred.
|
||||
* \param timeout timeout (in millseconds) that this function should wait
|
||||
* before giving up due to no response being received. For an unlimited
|
||||
* timeout, use value 0.
|
||||
*
|
||||
* \returns 0 on success (and populates <tt>transferred</tt>)
|
||||
* \returns LIBUSB_ERROR_TIMEOUT if the transfer timed out (and populates
|
||||
* <tt>transferred</tt>)
|
||||
* \returns LIBUSB_ERROR_PIPE if the endpoint halted
|
||||
* \returns LIBUSB_ERROR_OVERFLOW if the device offered more data, see
|
||||
* \ref packetoverflow
|
||||
* \returns LIBUSB_ERROR_NO_DEVICE if the device has been disconnected
|
||||
* \returns another LIBUSB_ERROR code on other failures
|
||||
*/
|
||||
int API_EXPORTED libusb_bulk_transfer(struct libusb_device_handle *dev_handle,
|
||||
unsigned char endpoint, unsigned char *data, int length, int *transferred,
|
||||
unsigned int timeout)
|
||||
{
|
||||
return do_sync_bulk_transfer(dev_handle, endpoint, data, length,
|
||||
transferred, timeout, LIBUSB_TRANSFER_TYPE_BULK);
|
||||
}
|
||||
|
||||
/** \ingroup syncio
|
||||
* Perform a USB interrupt transfer. The direction of the transfer is inferred
|
||||
* from the direction bits of the endpoint address.
|
||||
*
|
||||
* For interrupt reads, the <tt>length</tt> field indicates the maximum length
|
||||
* of data you are expecting to receive. If less data arrives than expected,
|
||||
* this function will return that data, so be sure to check the
|
||||
* <tt>transferred</tt> output parameter.
|
||||
*
|
||||
* You should also check the <tt>transferred</tt> parameter for interrupt
|
||||
* writes. Not all of the data may have been written.
|
||||
*
|
||||
* Also check <tt>transferred</tt> when dealing with a timeout error code.
|
||||
* libusb may have to split your transfer into a number of chunks to satisfy
|
||||
* underlying O/S requirements, meaning that the timeout may expire after
|
||||
* the first few chunks have completed. libusb is careful not to lose any data
|
||||
* that may have been transferred; do not assume that timeout conditions
|
||||
* indicate a complete lack of I/O.
|
||||
*
|
||||
* The default endpoint bInterval value is used as the polling interval.
|
||||
*
|
||||
* \param dev_handle a handle for the device to communicate with
|
||||
* \param endpoint the address of a valid endpoint to communicate with
|
||||
* \param data a suitably-sized data buffer for either input or output
|
||||
* (depending on endpoint)
|
||||
* \param length for bulk writes, the number of bytes from data to be sent. for
|
||||
* bulk reads, the maximum number of bytes to receive into the data buffer.
|
||||
* \param transferred output location for the number of bytes actually
|
||||
* transferred.
|
||||
* \param timeout timeout (in millseconds) that this function should wait
|
||||
* before giving up due to no response being received. For an unlimited
|
||||
* timeout, use value 0.
|
||||
*
|
||||
* \returns 0 on success (and populates <tt>transferred</tt>)
|
||||
* \returns LIBUSB_ERROR_TIMEOUT if the transfer timed out
|
||||
* \returns LIBUSB_ERROR_PIPE if the endpoint halted
|
||||
* \returns LIBUSB_ERROR_OVERFLOW if the device offered more data, see
|
||||
* \ref packetoverflow
|
||||
* \returns LIBUSB_ERROR_NO_DEVICE if the device has been disconnected
|
||||
* \returns another LIBUSB_ERROR code on other error
|
||||
*/
|
||||
int API_EXPORTED libusb_interrupt_transfer(
|
||||
struct libusb_device_handle *dev_handle, unsigned char endpoint,
|
||||
unsigned char *data, int length, int *transferred, unsigned int timeout)
|
||||
{
|
||||
return do_sync_bulk_transfer(dev_handle, endpoint, data, length,
|
||||
transferred, timeout, LIBUSB_TRANSFER_TYPE_INTERRUPT);
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
/* This file is parsed by m4 and windres and RC.EXE so please keep it simple. */
|
||||
#ifndef LIBUSB_MAJOR
|
||||
#define LIBUSB_MAJOR 1
|
||||
#endif
|
||||
#ifndef LIBUSB_MINOR
|
||||
#define LIBUSB_MINOR 0
|
||||
#endif
|
||||
#ifndef LIBUSB_MICRO
|
||||
#define LIBUSB_MICRO 9
|
||||
#endif
|
||||
/* LIBUSB_NANO may be used for Windows internal versioning. 0 means unused. */
|
||||
#ifndef LIBUSB_NANO
|
||||
#define LIBUSB_NANO 0
|
||||
#endif
|
||||
/* LIBUSB_RC is the release candidate suffix. Should normally be empty. */
|
||||
#ifndef LIBUSB_RC
|
||||
#define LIBUSB_RC ""
|
||||
#endif
|
|
@ -3,5 +3,6 @@
|
|||
|
||||
#include "winusbdriver.h"
|
||||
#define _PLATFORM_DEPENDENT_USB_OBJECT winUsbDriver
|
||||
#define PLATFORM_WINDOWS
|
||||
|
||||
#endif // PLATFORMSPECIFIC_H
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,6 +1,84 @@
|
|||
#include "gahnooslashlinuxusbdriver.h"
|
||||
|
||||
gahnooSlashLinuxUsbDriver::gahnooSlashLinuxUsbDriver(QWidget *parent) : QWidget(parent)
|
||||
gahnooSlashLinuxUsbDriver::gahnooSlashLinuxUsbDriver(QWidget *parent) : genericUsbDriver(parent)
|
||||
{
|
||||
qDebug() << "Making USB Driver invisible!!";
|
||||
this->hide();
|
||||
|
||||
outBuffers[0] = (unsigned char *) calloc(ISO_PACKET_SIZE*ISO_PACKETS_PER_CTX + 8, 1);
|
||||
outBuffers[1] = (unsigned char *) calloc(ISO_PACKET_SIZE*ISO_PACKETS_PER_CTX + 8, 1);
|
||||
|
||||
bufferLengths[0] = 0;
|
||||
bufferLengths[1] = 0;
|
||||
|
||||
unsigned char error = 1;
|
||||
while(error){
|
||||
QThread::msleep(32);
|
||||
error = usbInit(0x03eb, 0xa000);
|
||||
}
|
||||
}
|
||||
|
||||
gahnooSlashLinuxUsbDriver::~gahnooSlashLinuxUsbDriver(void){
|
||||
qDebug() << "\n\ngahnooSlashLinuxUsbDriver destructor ran!";
|
||||
libusb_exit(ctx);
|
||||
}
|
||||
|
||||
unsigned char gahnooSlashLinuxUsbDriver::usbInit(unsigned long VIDin, unsigned long PIDin){
|
||||
qDebug() << "Entering gahnooSlashLinuxUsbDriver::usbInit";
|
||||
|
||||
int error = libusb_init(&ctx);
|
||||
|
||||
if(error){
|
||||
qDebug() << "libusb_init FAILED";
|
||||
return error;
|
||||
}
|
||||
libusb_set_debug(ctx, 3);
|
||||
|
||||
handle = libusb_open_device_with_vid_pid(ctx, VIDin, PIDin);
|
||||
if(handle==NULL){
|
||||
qDebug() << "DEVICE NOT FOUND";
|
||||
return -1;
|
||||
}
|
||||
qDebug() << "Device found!!";
|
||||
return 0;
|
||||
}
|
||||
|
||||
void gahnooSlashLinuxUsbDriver::usbSendControl(uint8_t RequestType, uint8_t Request, uint16_t Value, uint16_t Index, uint16_t Length, unsigned char *LDATA){
|
||||
qDebug("Sending Control packet! 0x%x,\t0x%x,\t%u,\t%u,\t%d,\t%u", RequestType, Request, Value, Index, LDATA, Length);
|
||||
int error = libusb_control_transfer(handle, RequestType, Request, Value, Index, LDATA, Length, 4000);
|
||||
if(error){
|
||||
qDebug("gahnooSlashLinuxUsbDriver::usbSendControl FAILED with error %s", libusb_error_name(error));
|
||||
} else qDebug() << "gahnooSlashLinuxUsbDriver::usbSendControl SUCCESS";
|
||||
return;
|
||||
}
|
||||
|
||||
unsigned char gahnooSlashLinuxUsbDriver::usbIsoInit(void){
|
||||
int error;
|
||||
|
||||
for(int n=0;n<NUM_FUTURE_CTX;n++){
|
||||
isoCtx[n] = libusb_alloc_transfer(ISO_PACKETS_PER_CTX);
|
||||
libusb_fill_iso_transfer(isoCtx[n], handle, pipeID, dataBuffer[n], ISO_PACKET_SIZE*ISO_PACKETS_PER_CTX, ISO_PACKETS_PER_CTX, NULL, NULL, 0);
|
||||
error = libusb_submit_transfer(isoCtx[n]);
|
||||
if(error){
|
||||
qDebug() << "libusb_submit_transfer FAILED";
|
||||
qDebug() << "ERROR" << libusb_error_name(error);
|
||||
}
|
||||
}
|
||||
isoTimer = new QTimer();
|
||||
isoTimer->setTimerType(Qt::PreciseTimer);
|
||||
isoTimer->start(ISO_TIMER_PERIOD);
|
||||
connect(isoTimer, SIGNAL(timeout()), this, SLOT(isoTimerTick()));
|
||||
|
||||
qDebug() << "Setup successful!";
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
void gahnooSlashLinuxUsbDriver::isoTimerTick(void){
|
||||
return;
|
||||
}
|
||||
|
||||
char *gahnooSlashLinuxUsbDriver::isoRead(unsigned int *newLength){
|
||||
*(newLength) = 0;
|
||||
return (char*) NULL;
|
||||
}
|
||||
|
|
|
@ -3,15 +3,34 @@
|
|||
|
||||
#include <QWidget>
|
||||
|
||||
class gahnooSlashLinuxUsbDriver : public QWidget
|
||||
#include "genericusbdriver.h"
|
||||
#include "libusb.h"
|
||||
|
||||
|
||||
class gahnooSlashLinuxUsbDriver : public genericUsbDriver
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit gahnooSlashLinuxUsbDriver(QWidget *parent = 0);
|
||||
|
||||
signals:
|
||||
|
||||
~gahnooSlashLinuxUsbDriver();
|
||||
void usbSendControl(uint8_t RequestType, uint8_t Request, uint16_t Value, uint16_t Index, uint16_t Length, unsigned char *LDATA);
|
||||
char *isoRead(unsigned int *newLength);
|
||||
private:
|
||||
//USB Vars
|
||||
libusb_context *ctx;
|
||||
libusb_device_handle *handle;
|
||||
unsigned char pipeID = 0x83;
|
||||
//USBIso Vars
|
||||
libusb_transfer *isoCtx[NUM_FUTURE_CTX];
|
||||
unsigned char dataBuffer[NUM_FUTURE_CTX][ISO_PACKET_SIZE*ISO_PACKETS_PER_CTX];
|
||||
QTimer *isoTimer;
|
||||
unsigned char currentWriteBuffer = 0;
|
||||
unsigned long timerCount = 0;
|
||||
//Generic Functions
|
||||
unsigned char usbInit(unsigned long VIDin, unsigned long PIDin);
|
||||
unsigned char usbIsoInit(void);
|
||||
public slots:
|
||||
void isoTimerTick(void);
|
||||
};
|
||||
|
||||
#endif // GAHNOOSLASHLINUXUSBDRIVER_H
|
||||
#endif // GAHNOOSLASHLINUXUSBDRIVER_H
|
||||
|
|
Binary file not shown.
|
@ -35,7 +35,7 @@ public:
|
|||
virtual char *isoRead(unsigned int *newLength) = 0;
|
||||
void setBufferPtr(bufferControl *newPtr);
|
||||
void saveState(int *_out_deviceMode, double *_out_scopeGain, double *_out_currentPsuVoltage, int *_out_digitalPinState);
|
||||
virtual void usbSendControl(int RequestType, int Request, int Value, int Index, int Length, unsigned char *LDATA) = 0;
|
||||
virtual void usbSendControl(uint8_t RequestType, uint8_t Request, uint16_t Value, uint16_t Index, uint16_t Length, unsigned char *LDATA) = 0;
|
||||
protected:
|
||||
//State Vars
|
||||
unsigned char fGenTriple=0;
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -47,27 +47,12 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||
ui->filterLabel_CH1->setVisible(0);
|
||||
ui->filterLabel_CH2->setVisible(0);
|
||||
|
||||
/*
|
||||
ui->multimeterModeLabel->setVisible(0);
|
||||
ui->multimeterModeSelect->setVisible(0);
|
||||
ui->multimeterResistanceLabel->setVisible(0);
|
||||
ui->multimeterResistanceSelect->setVisible(0);
|
||||
*/
|
||||
|
||||
/*
|
||||
ui->multimeterMaxLabel->setVisible(0);
|
||||
ui->multimeterMinLabel->setVisible(0);
|
||||
ui->multimeterMeanLabel->setVisible(0);
|
||||
ui->multimeterRmsLabel->setVisible(0);
|
||||
|
||||
ui->multimeterMaxDisplay->setVisible(0);
|
||||
ui->multimeterMinDisplay->setVisible(0);
|
||||
ui->multimeterMeanDisplay->setVisible(0);
|
||||
ui->multimeterRmsDisplay->setVisible(0);
|
||||
*/
|
||||
|
||||
//Reset the device to ensure Labrador_libusbk gets handle!!
|
||||
ui->controller_iso->driver->usbSendControl(0x40, 0xa7, 0, 0, 0, NULL);
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
ui->controller_iso->driver->usbSendControl(0x40, 0xa7, 0, 0, 0, NULL);
|
||||
#else
|
||||
reinitUsb();
|
||||
#endif
|
||||
connect(ui->controller_iso->driver, SIGNAL(killMe()), this, SLOT(reinitUsb()));
|
||||
}
|
||||
|
||||
|
|
Binary file not shown.
|
@ -0,0 +1,362 @@
|
|||
/****************************************************************************
|
||||
** Meta object code from reading C++ file 'buffercontrol.h'
|
||||
**
|
||||
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.7.0)
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
*****************************************************************************/
|
||||
|
||||
#include "buffercontrol.h"
|
||||
#include <QtCore/qbytearray.h>
|
||||
#include <QtCore/qmetatype.h>
|
||||
#if !defined(Q_MOC_OUTPUT_REVISION)
|
||||
#error "The header file 'buffercontrol.h' doesn't include <QObject>."
|
||||
#elif Q_MOC_OUTPUT_REVISION != 67
|
||||
#error "This file was generated using the moc from 5.7.0. It"
|
||||
#error "cannot be used with the include files from this version of Qt."
|
||||
#error "(The moc has changed too much.)"
|
||||
#endif
|
||||
|
||||
QT_BEGIN_MOC_NAMESPACE
|
||||
struct qt_meta_stringdata_bufferControl_t {
|
||||
QByteArrayData data[26];
|
||||
char stringdata0[315];
|
||||
};
|
||||
#define QT_MOC_LITERAL(idx, ofs, len) \
|
||||
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
|
||||
qptrdiff(offsetof(qt_meta_stringdata_bufferControl_t, stringdata0) + ofs \
|
||||
- idx * sizeof(QByteArrayData)) \
|
||||
)
|
||||
static const qt_meta_stringdata_bufferControl_t qt_meta_stringdata_bufferControl = {
|
||||
{
|
||||
QT_MOC_LITERAL(0, 0, 13), // "bufferControl"
|
||||
QT_MOC_LITERAL(1, 14, 12), // "scopeOut_CH1"
|
||||
QT_MOC_LITERAL(2, 27, 0), // ""
|
||||
QT_MOC_LITERAL(3, 28, 5), // "state"
|
||||
QT_MOC_LITERAL(4, 34, 12), // "scopeOut_CH2"
|
||||
QT_MOC_LITERAL(5, 47, 12), // "scopeUncheck"
|
||||
QT_MOC_LITERAL(6, 60, 11), // "scopeDsrOut"
|
||||
QT_MOC_LITERAL(7, 72, 15), // "scopeDsrUncheck"
|
||||
QT_MOC_LITERAL(8, 88, 17), // "busSnifferOut_CH1"
|
||||
QT_MOC_LITERAL(9, 106, 17), // "busSnifferOut_CH2"
|
||||
QT_MOC_LITERAL(10, 124, 17), // "busSnifferUncheck"
|
||||
QT_MOC_LITERAL(11, 142, 13), // "multimeterOut"
|
||||
QT_MOC_LITERAL(12, 156, 9), // "updateDig"
|
||||
QT_MOC_LITERAL(13, 166, 7), // "digMask"
|
||||
QT_MOC_LITERAL(14, 174, 10), // "modeChange"
|
||||
QT_MOC_LITERAL(15, 185, 7), // "newMode"
|
||||
QT_MOC_LITERAL(16, 193, 11), // "scopeIn_CH1"
|
||||
QT_MOC_LITERAL(17, 205, 11), // "scopeIn_CH2"
|
||||
QT_MOC_LITERAL(18, 217, 10), // "scopeDsrIn"
|
||||
QT_MOC_LITERAL(19, 228, 16), // "busSnifferIn_CH1"
|
||||
QT_MOC_LITERAL(20, 245, 16), // "busSnifferIn_CH2"
|
||||
QT_MOC_LITERAL(21, 262, 12), // "multimeterIn"
|
||||
QT_MOC_LITERAL(22, 275, 9), // "digIn_CH1"
|
||||
QT_MOC_LITERAL(23, 285, 9), // "digIn_CH2"
|
||||
QT_MOC_LITERAL(24, 295, 9), // "digIn_CH3"
|
||||
QT_MOC_LITERAL(25, 305, 9) // "digIn_CH4"
|
||||
|
||||
},
|
||||
"bufferControl\0scopeOut_CH1\0\0state\0"
|
||||
"scopeOut_CH2\0scopeUncheck\0scopeDsrOut\0"
|
||||
"scopeDsrUncheck\0busSnifferOut_CH1\0"
|
||||
"busSnifferOut_CH2\0busSnifferUncheck\0"
|
||||
"multimeterOut\0updateDig\0digMask\0"
|
||||
"modeChange\0newMode\0scopeIn_CH1\0"
|
||||
"scopeIn_CH2\0scopeDsrIn\0busSnifferIn_CH1\0"
|
||||
"busSnifferIn_CH2\0multimeterIn\0digIn_CH1\0"
|
||||
"digIn_CH2\0digIn_CH3\0digIn_CH4"
|
||||
};
|
||||
#undef QT_MOC_LITERAL
|
||||
|
||||
static const uint qt_meta_data_bufferControl[] = {
|
||||
|
||||
// content:
|
||||
7, // revision
|
||||
0, // classname
|
||||
0, 0, // classinfo
|
||||
21, 14, // methods
|
||||
0, 0, // properties
|
||||
0, 0, // enums/sets
|
||||
0, 0, // constructors
|
||||
0, // flags
|
||||
11, // signalCount
|
||||
|
||||
// signals: name, argc, parameters, tag, flags
|
||||
1, 1, 119, 2, 0x06 /* Public */,
|
||||
4, 1, 122, 2, 0x06 /* Public */,
|
||||
5, 1, 125, 2, 0x06 /* Public */,
|
||||
6, 1, 128, 2, 0x06 /* Public */,
|
||||
7, 1, 131, 2, 0x06 /* Public */,
|
||||
8, 1, 134, 2, 0x06 /* Public */,
|
||||
9, 1, 137, 2, 0x06 /* Public */,
|
||||
10, 1, 140, 2, 0x06 /* Public */,
|
||||
11, 1, 143, 2, 0x06 /* Public */,
|
||||
12, 1, 146, 2, 0x06 /* Public */,
|
||||
14, 1, 149, 2, 0x06 /* Public */,
|
||||
|
||||
// slots: name, argc, parameters, tag, flags
|
||||
16, 1, 152, 2, 0x0a /* Public */,
|
||||
17, 1, 155, 2, 0x0a /* Public */,
|
||||
18, 1, 158, 2, 0x0a /* Public */,
|
||||
19, 1, 161, 2, 0x0a /* Public */,
|
||||
20, 1, 164, 2, 0x0a /* Public */,
|
||||
21, 1, 167, 2, 0x0a /* Public */,
|
||||
22, 1, 170, 2, 0x0a /* Public */,
|
||||
23, 1, 173, 2, 0x0a /* Public */,
|
||||
24, 1, 176, 2, 0x0a /* Public */,
|
||||
25, 1, 179, 2, 0x0a /* Public */,
|
||||
|
||||
// signals: parameters
|
||||
QMetaType::Void, QMetaType::Bool, 3,
|
||||
QMetaType::Void, QMetaType::Bool, 3,
|
||||
QMetaType::Void, QMetaType::Bool, 3,
|
||||
QMetaType::Void, QMetaType::Bool, 3,
|
||||
QMetaType::Void, QMetaType::Bool, 3,
|
||||
QMetaType::Void, QMetaType::Bool, 3,
|
||||
QMetaType::Void, QMetaType::Bool, 3,
|
||||
QMetaType::Void, QMetaType::Bool, 3,
|
||||
QMetaType::Void, QMetaType::Bool, 3,
|
||||
QMetaType::Void, QMetaType::Int, 13,
|
||||
QMetaType::Void, QMetaType::Int, 15,
|
||||
|
||||
// slots: parameters
|
||||
QMetaType::Void, QMetaType::Bool, 3,
|
||||
QMetaType::Void, QMetaType::Bool, 3,
|
||||
QMetaType::Void, QMetaType::Bool, 3,
|
||||
QMetaType::Void, QMetaType::Bool, 3,
|
||||
QMetaType::Void, QMetaType::Bool, 3,
|
||||
QMetaType::Void, QMetaType::Bool, 3,
|
||||
QMetaType::Void, QMetaType::Bool, 3,
|
||||
QMetaType::Void, QMetaType::Bool, 3,
|
||||
QMetaType::Void, QMetaType::Bool, 3,
|
||||
QMetaType::Void, QMetaType::Bool, 3,
|
||||
|
||||
0 // eod
|
||||
};
|
||||
|
||||
void bufferControl::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
|
||||
{
|
||||
if (_c == QMetaObject::InvokeMetaMethod) {
|
||||
bufferControl *_t = static_cast<bufferControl *>(_o);
|
||||
Q_UNUSED(_t)
|
||||
switch (_id) {
|
||||
case 0: _t->scopeOut_CH1((*reinterpret_cast< bool(*)>(_a[1]))); break;
|
||||
case 1: _t->scopeOut_CH2((*reinterpret_cast< bool(*)>(_a[1]))); break;
|
||||
case 2: _t->scopeUncheck((*reinterpret_cast< bool(*)>(_a[1]))); break;
|
||||
case 3: _t->scopeDsrOut((*reinterpret_cast< bool(*)>(_a[1]))); break;
|
||||
case 4: _t->scopeDsrUncheck((*reinterpret_cast< bool(*)>(_a[1]))); break;
|
||||
case 5: _t->busSnifferOut_CH1((*reinterpret_cast< bool(*)>(_a[1]))); break;
|
||||
case 6: _t->busSnifferOut_CH2((*reinterpret_cast< bool(*)>(_a[1]))); break;
|
||||
case 7: _t->busSnifferUncheck((*reinterpret_cast< bool(*)>(_a[1]))); break;
|
||||
case 8: _t->multimeterOut((*reinterpret_cast< bool(*)>(_a[1]))); break;
|
||||
case 9: _t->updateDig((*reinterpret_cast< int(*)>(_a[1]))); break;
|
||||
case 10: _t->modeChange((*reinterpret_cast< int(*)>(_a[1]))); break;
|
||||
case 11: _t->scopeIn_CH1((*reinterpret_cast< bool(*)>(_a[1]))); break;
|
||||
case 12: _t->scopeIn_CH2((*reinterpret_cast< bool(*)>(_a[1]))); break;
|
||||
case 13: _t->scopeDsrIn((*reinterpret_cast< bool(*)>(_a[1]))); break;
|
||||
case 14: _t->busSnifferIn_CH1((*reinterpret_cast< bool(*)>(_a[1]))); break;
|
||||
case 15: _t->busSnifferIn_CH2((*reinterpret_cast< bool(*)>(_a[1]))); break;
|
||||
case 16: _t->multimeterIn((*reinterpret_cast< bool(*)>(_a[1]))); break;
|
||||
case 17: _t->digIn_CH1((*reinterpret_cast< bool(*)>(_a[1]))); break;
|
||||
case 18: _t->digIn_CH2((*reinterpret_cast< bool(*)>(_a[1]))); break;
|
||||
case 19: _t->digIn_CH3((*reinterpret_cast< bool(*)>(_a[1]))); break;
|
||||
case 20: _t->digIn_CH4((*reinterpret_cast< bool(*)>(_a[1]))); break;
|
||||
default: ;
|
||||
}
|
||||
} else if (_c == QMetaObject::IndexOfMethod) {
|
||||
int *result = reinterpret_cast<int *>(_a[0]);
|
||||
void **func = reinterpret_cast<void **>(_a[1]);
|
||||
{
|
||||
typedef void (bufferControl::*_t)(bool );
|
||||
if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&bufferControl::scopeOut_CH1)) {
|
||||
*result = 0;
|
||||
return;
|
||||
}
|
||||
}
|
||||
{
|
||||
typedef void (bufferControl::*_t)(bool );
|
||||
if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&bufferControl::scopeOut_CH2)) {
|
||||
*result = 1;
|
||||
return;
|
||||
}
|
||||
}
|
||||
{
|
||||
typedef void (bufferControl::*_t)(bool );
|
||||
if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&bufferControl::scopeUncheck)) {
|
||||
*result = 2;
|
||||
return;
|
||||
}
|
||||
}
|
||||
{
|
||||
typedef void (bufferControl::*_t)(bool );
|
||||
if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&bufferControl::scopeDsrOut)) {
|
||||
*result = 3;
|
||||
return;
|
||||
}
|
||||
}
|
||||
{
|
||||
typedef void (bufferControl::*_t)(bool );
|
||||
if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&bufferControl::scopeDsrUncheck)) {
|
||||
*result = 4;
|
||||
return;
|
||||
}
|
||||
}
|
||||
{
|
||||
typedef void (bufferControl::*_t)(bool );
|
||||
if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&bufferControl::busSnifferOut_CH1)) {
|
||||
*result = 5;
|
||||
return;
|
||||
}
|
||||
}
|
||||
{
|
||||
typedef void (bufferControl::*_t)(bool );
|
||||
if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&bufferControl::busSnifferOut_CH2)) {
|
||||
*result = 6;
|
||||
return;
|
||||
}
|
||||
}
|
||||
{
|
||||
typedef void (bufferControl::*_t)(bool );
|
||||
if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&bufferControl::busSnifferUncheck)) {
|
||||
*result = 7;
|
||||
return;
|
||||
}
|
||||
}
|
||||
{
|
||||
typedef void (bufferControl::*_t)(bool );
|
||||
if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&bufferControl::multimeterOut)) {
|
||||
*result = 8;
|
||||
return;
|
||||
}
|
||||
}
|
||||
{
|
||||
typedef void (bufferControl::*_t)(int );
|
||||
if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&bufferControl::updateDig)) {
|
||||
*result = 9;
|
||||
return;
|
||||
}
|
||||
}
|
||||
{
|
||||
typedef void (bufferControl::*_t)(int );
|
||||
if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&bufferControl::modeChange)) {
|
||||
*result = 10;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const QMetaObject bufferControl::staticMetaObject = {
|
||||
{ &QLabel::staticMetaObject, qt_meta_stringdata_bufferControl.data,
|
||||
qt_meta_data_bufferControl, qt_static_metacall, Q_NULLPTR, Q_NULLPTR}
|
||||
};
|
||||
|
||||
|
||||
const QMetaObject *bufferControl::metaObject() const
|
||||
{
|
||||
return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
|
||||
}
|
||||
|
||||
void *bufferControl::qt_metacast(const char *_clname)
|
||||
{
|
||||
if (!_clname) return Q_NULLPTR;
|
||||
if (!strcmp(_clname, qt_meta_stringdata_bufferControl.stringdata0))
|
||||
return static_cast<void*>(const_cast< bufferControl*>(this));
|
||||
return QLabel::qt_metacast(_clname);
|
||||
}
|
||||
|
||||
int bufferControl::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
|
||||
{
|
||||
_id = QLabel::qt_metacall(_c, _id, _a);
|
||||
if (_id < 0)
|
||||
return _id;
|
||||
if (_c == QMetaObject::InvokeMetaMethod) {
|
||||
if (_id < 21)
|
||||
qt_static_metacall(this, _c, _id, _a);
|
||||
_id -= 21;
|
||||
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
|
||||
if (_id < 21)
|
||||
*reinterpret_cast<int*>(_a[0]) = -1;
|
||||
_id -= 21;
|
||||
}
|
||||
return _id;
|
||||
}
|
||||
|
||||
// SIGNAL 0
|
||||
void bufferControl::scopeOut_CH1(bool _t1)
|
||||
{
|
||||
void *_a[] = { Q_NULLPTR, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
|
||||
QMetaObject::activate(this, &staticMetaObject, 0, _a);
|
||||
}
|
||||
|
||||
// SIGNAL 1
|
||||
void bufferControl::scopeOut_CH2(bool _t1)
|
||||
{
|
||||
void *_a[] = { Q_NULLPTR, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
|
||||
QMetaObject::activate(this, &staticMetaObject, 1, _a);
|
||||
}
|
||||
|
||||
// SIGNAL 2
|
||||
void bufferControl::scopeUncheck(bool _t1)
|
||||
{
|
||||
void *_a[] = { Q_NULLPTR, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
|
||||
QMetaObject::activate(this, &staticMetaObject, 2, _a);
|
||||
}
|
||||
|
||||
// SIGNAL 3
|
||||
void bufferControl::scopeDsrOut(bool _t1)
|
||||
{
|
||||
void *_a[] = { Q_NULLPTR, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
|
||||
QMetaObject::activate(this, &staticMetaObject, 3, _a);
|
||||
}
|
||||
|
||||
// SIGNAL 4
|
||||
void bufferControl::scopeDsrUncheck(bool _t1)
|
||||
{
|
||||
void *_a[] = { Q_NULLPTR, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
|
||||
QMetaObject::activate(this, &staticMetaObject, 4, _a);
|
||||
}
|
||||
|
||||
// SIGNAL 5
|
||||
void bufferControl::busSnifferOut_CH1(bool _t1)
|
||||
{
|
||||
void *_a[] = { Q_NULLPTR, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
|
||||
QMetaObject::activate(this, &staticMetaObject, 5, _a);
|
||||
}
|
||||
|
||||
// SIGNAL 6
|
||||
void bufferControl::busSnifferOut_CH2(bool _t1)
|
||||
{
|
||||
void *_a[] = { Q_NULLPTR, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
|
||||
QMetaObject::activate(this, &staticMetaObject, 6, _a);
|
||||
}
|
||||
|
||||
// SIGNAL 7
|
||||
void bufferControl::busSnifferUncheck(bool _t1)
|
||||
{
|
||||
void *_a[] = { Q_NULLPTR, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
|
||||
QMetaObject::activate(this, &staticMetaObject, 7, _a);
|
||||
}
|
||||
|
||||
// SIGNAL 8
|
||||
void bufferControl::multimeterOut(bool _t1)
|
||||
{
|
||||
void *_a[] = { Q_NULLPTR, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
|
||||
QMetaObject::activate(this, &staticMetaObject, 8, _a);
|
||||
}
|
||||
|
||||
// SIGNAL 9
|
||||
void bufferControl::updateDig(int _t1)
|
||||
{
|
||||
void *_a[] = { Q_NULLPTR, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
|
||||
QMetaObject::activate(this, &staticMetaObject, 9, _a);
|
||||
}
|
||||
|
||||
// SIGNAL 10
|
||||
void bufferControl::modeChange(int _t1)
|
||||
{
|
||||
void *_a[] = { Q_NULLPTR, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
|
||||
QMetaObject::activate(this, &staticMetaObject, 10, _a);
|
||||
}
|
||||
QT_END_MOC_NAMESPACE
|
Binary file not shown.
|
@ -0,0 +1,180 @@
|
|||
/****************************************************************************
|
||||
** Meta object code from reading C++ file 'cursorenabler.h'
|
||||
**
|
||||
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.7.0)
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
*****************************************************************************/
|
||||
|
||||
#include "cursorenabler.h"
|
||||
#include <QtCore/qbytearray.h>
|
||||
#include <QtCore/qmetatype.h>
|
||||
#if !defined(Q_MOC_OUTPUT_REVISION)
|
||||
#error "The header file 'cursorenabler.h' doesn't include <QObject>."
|
||||
#elif Q_MOC_OUTPUT_REVISION != 67
|
||||
#error "This file was generated using the moc from 5.7.0. It"
|
||||
#error "cannot be used with the include files from this version of Qt."
|
||||
#error "(The moc has changed too much.)"
|
||||
#endif
|
||||
|
||||
QT_BEGIN_MOC_NAMESPACE
|
||||
struct qt_meta_stringdata_cursorEnabler_t {
|
||||
QByteArrayData data[10];
|
||||
char stringdata0[99];
|
||||
};
|
||||
#define QT_MOC_LITERAL(idx, ofs, len) \
|
||||
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
|
||||
qptrdiff(offsetof(qt_meta_stringdata_cursorEnabler_t, stringdata0) + ofs \
|
||||
- idx * sizeof(QByteArrayData)) \
|
||||
)
|
||||
static const qt_meta_stringdata_cursorEnabler_t qt_meta_stringdata_cursorEnabler = {
|
||||
{
|
||||
QT_MOC_LITERAL(0, 0, 13), // "cursorEnabler"
|
||||
QT_MOC_LITERAL(1, 14, 8), // "tickHori"
|
||||
QT_MOC_LITERAL(2, 23, 0), // ""
|
||||
QT_MOC_LITERAL(3, 24, 8), // "tickVert"
|
||||
QT_MOC_LITERAL(4, 33, 12), // "passOnSignal"
|
||||
QT_MOC_LITERAL(5, 46, 12), // "QMouseEvent*"
|
||||
QT_MOC_LITERAL(6, 59, 5), // "event"
|
||||
QT_MOC_LITERAL(7, 65, 11), // "setTurnedOn"
|
||||
QT_MOC_LITERAL(8, 77, 7), // "enabled"
|
||||
QT_MOC_LITERAL(9, 85, 13) // "clickDetected"
|
||||
|
||||
},
|
||||
"cursorEnabler\0tickHori\0\0tickVert\0"
|
||||
"passOnSignal\0QMouseEvent*\0event\0"
|
||||
"setTurnedOn\0enabled\0clickDetected"
|
||||
};
|
||||
#undef QT_MOC_LITERAL
|
||||
|
||||
static const uint qt_meta_data_cursorEnabler[] = {
|
||||
|
||||
// content:
|
||||
7, // revision
|
||||
0, // classname
|
||||
0, 0, // classinfo
|
||||
5, 14, // methods
|
||||
0, 0, // properties
|
||||
0, 0, // enums/sets
|
||||
0, 0, // constructors
|
||||
0, // flags
|
||||
3, // signalCount
|
||||
|
||||
// signals: name, argc, parameters, tag, flags
|
||||
1, 1, 39, 2, 0x06 /* Public */,
|
||||
3, 1, 42, 2, 0x06 /* Public */,
|
||||
4, 1, 45, 2, 0x06 /* Public */,
|
||||
|
||||
// slots: name, argc, parameters, tag, flags
|
||||
7, 1, 48, 2, 0x0a /* Public */,
|
||||
9, 1, 51, 2, 0x0a /* Public */,
|
||||
|
||||
// signals: parameters
|
||||
QMetaType::Void, QMetaType::Bool, 2,
|
||||
QMetaType::Void, QMetaType::Bool, 2,
|
||||
QMetaType::Void, 0x80000000 | 5, 6,
|
||||
|
||||
// slots: parameters
|
||||
QMetaType::Void, QMetaType::Bool, 8,
|
||||
QMetaType::Void, 0x80000000 | 5, 6,
|
||||
|
||||
0 // eod
|
||||
};
|
||||
|
||||
void cursorEnabler::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
|
||||
{
|
||||
if (_c == QMetaObject::InvokeMetaMethod) {
|
||||
cursorEnabler *_t = static_cast<cursorEnabler *>(_o);
|
||||
Q_UNUSED(_t)
|
||||
switch (_id) {
|
||||
case 0: _t->tickHori((*reinterpret_cast< bool(*)>(_a[1]))); break;
|
||||
case 1: _t->tickVert((*reinterpret_cast< bool(*)>(_a[1]))); break;
|
||||
case 2: _t->passOnSignal((*reinterpret_cast< QMouseEvent*(*)>(_a[1]))); break;
|
||||
case 3: _t->setTurnedOn((*reinterpret_cast< bool(*)>(_a[1]))); break;
|
||||
case 4: _t->clickDetected((*reinterpret_cast< QMouseEvent*(*)>(_a[1]))); break;
|
||||
default: ;
|
||||
}
|
||||
} else if (_c == QMetaObject::IndexOfMethod) {
|
||||
int *result = reinterpret_cast<int *>(_a[0]);
|
||||
void **func = reinterpret_cast<void **>(_a[1]);
|
||||
{
|
||||
typedef void (cursorEnabler::*_t)(bool );
|
||||
if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&cursorEnabler::tickHori)) {
|
||||
*result = 0;
|
||||
return;
|
||||
}
|
||||
}
|
||||
{
|
||||
typedef void (cursorEnabler::*_t)(bool );
|
||||
if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&cursorEnabler::tickVert)) {
|
||||
*result = 1;
|
||||
return;
|
||||
}
|
||||
}
|
||||
{
|
||||
typedef void (cursorEnabler::*_t)(QMouseEvent * );
|
||||
if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&cursorEnabler::passOnSignal)) {
|
||||
*result = 2;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const QMetaObject cursorEnabler::staticMetaObject = {
|
||||
{ &QLabel::staticMetaObject, qt_meta_stringdata_cursorEnabler.data,
|
||||
qt_meta_data_cursorEnabler, qt_static_metacall, Q_NULLPTR, Q_NULLPTR}
|
||||
};
|
||||
|
||||
|
||||
const QMetaObject *cursorEnabler::metaObject() const
|
||||
{
|
||||
return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
|
||||
}
|
||||
|
||||
void *cursorEnabler::qt_metacast(const char *_clname)
|
||||
{
|
||||
if (!_clname) return Q_NULLPTR;
|
||||
if (!strcmp(_clname, qt_meta_stringdata_cursorEnabler.stringdata0))
|
||||
return static_cast<void*>(const_cast< cursorEnabler*>(this));
|
||||
return QLabel::qt_metacast(_clname);
|
||||
}
|
||||
|
||||
int cursorEnabler::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
|
||||
{
|
||||
_id = QLabel::qt_metacall(_c, _id, _a);
|
||||
if (_id < 0)
|
||||
return _id;
|
||||
if (_c == QMetaObject::InvokeMetaMethod) {
|
||||
if (_id < 5)
|
||||
qt_static_metacall(this, _c, _id, _a);
|
||||
_id -= 5;
|
||||
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
|
||||
if (_id < 5)
|
||||
*reinterpret_cast<int*>(_a[0]) = -1;
|
||||
_id -= 5;
|
||||
}
|
||||
return _id;
|
||||
}
|
||||
|
||||
// SIGNAL 0
|
||||
void cursorEnabler::tickHori(bool _t1)
|
||||
{
|
||||
void *_a[] = { Q_NULLPTR, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
|
||||
QMetaObject::activate(this, &staticMetaObject, 0, _a);
|
||||
}
|
||||
|
||||
// SIGNAL 1
|
||||
void cursorEnabler::tickVert(bool _t1)
|
||||
{
|
||||
void *_a[] = { Q_NULLPTR, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
|
||||
QMetaObject::activate(this, &staticMetaObject, 1, _a);
|
||||
}
|
||||
|
||||
// SIGNAL 2
|
||||
void cursorEnabler::passOnSignal(QMouseEvent * _t1)
|
||||
{
|
||||
void *_a[] = { Q_NULLPTR, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
|
||||
QMetaObject::activate(this, &staticMetaObject, 2, _a);
|
||||
}
|
||||
QT_END_MOC_NAMESPACE
|
Binary file not shown.
|
@ -0,0 +1,112 @@
|
|||
/****************************************************************************
|
||||
** Meta object code from reading C++ file 'deviceconnecteddisplay.h'
|
||||
**
|
||||
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.7.0)
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
*****************************************************************************/
|
||||
|
||||
#include "deviceconnecteddisplay.h"
|
||||
#include <QtCore/qbytearray.h>
|
||||
#include <QtCore/qmetatype.h>
|
||||
#if !defined(Q_MOC_OUTPUT_REVISION)
|
||||
#error "The header file 'deviceconnecteddisplay.h' doesn't include <QObject>."
|
||||
#elif Q_MOC_OUTPUT_REVISION != 67
|
||||
#error "This file was generated using the moc from 5.7.0. It"
|
||||
#error "cannot be used with the include files from this version of Qt."
|
||||
#error "(The moc has changed too much.)"
|
||||
#endif
|
||||
|
||||
QT_BEGIN_MOC_NAMESPACE
|
||||
struct qt_meta_stringdata_deviceConnectedDisplay_t {
|
||||
QByteArrayData data[4];
|
||||
char stringdata0[54];
|
||||
};
|
||||
#define QT_MOC_LITERAL(idx, ofs, len) \
|
||||
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
|
||||
qptrdiff(offsetof(qt_meta_stringdata_deviceConnectedDisplay_t, stringdata0) + ofs \
|
||||
- idx * sizeof(QByteArrayData)) \
|
||||
)
|
||||
static const qt_meta_stringdata_deviceConnectedDisplay_t qt_meta_stringdata_deviceConnectedDisplay = {
|
||||
{
|
||||
QT_MOC_LITERAL(0, 0, 22), // "deviceConnectedDisplay"
|
||||
QT_MOC_LITERAL(1, 23, 22), // "connectedStatusChanged"
|
||||
QT_MOC_LITERAL(2, 46, 0), // ""
|
||||
QT_MOC_LITERAL(3, 47, 6) // "status"
|
||||
|
||||
},
|
||||
"deviceConnectedDisplay\0connectedStatusChanged\0"
|
||||
"\0status"
|
||||
};
|
||||
#undef QT_MOC_LITERAL
|
||||
|
||||
static const uint qt_meta_data_deviceConnectedDisplay[] = {
|
||||
|
||||
// content:
|
||||
7, // revision
|
||||
0, // classname
|
||||
0, 0, // classinfo
|
||||
1, 14, // methods
|
||||
0, 0, // properties
|
||||
0, 0, // enums/sets
|
||||
0, 0, // constructors
|
||||
0, // flags
|
||||
0, // signalCount
|
||||
|
||||
// slots: name, argc, parameters, tag, flags
|
||||
1, 1, 19, 2, 0x0a /* Public */,
|
||||
|
||||
// slots: parameters
|
||||
QMetaType::Void, QMetaType::Bool, 3,
|
||||
|
||||
0 // eod
|
||||
};
|
||||
|
||||
void deviceConnectedDisplay::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
|
||||
{
|
||||
if (_c == QMetaObject::InvokeMetaMethod) {
|
||||
deviceConnectedDisplay *_t = static_cast<deviceConnectedDisplay *>(_o);
|
||||
Q_UNUSED(_t)
|
||||
switch (_id) {
|
||||
case 0: _t->connectedStatusChanged((*reinterpret_cast< bool(*)>(_a[1]))); break;
|
||||
default: ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const QMetaObject deviceConnectedDisplay::staticMetaObject = {
|
||||
{ &QLabel::staticMetaObject, qt_meta_stringdata_deviceConnectedDisplay.data,
|
||||
qt_meta_data_deviceConnectedDisplay, qt_static_metacall, Q_NULLPTR, Q_NULLPTR}
|
||||
};
|
||||
|
||||
|
||||
const QMetaObject *deviceConnectedDisplay::metaObject() const
|
||||
{
|
||||
return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
|
||||
}
|
||||
|
||||
void *deviceConnectedDisplay::qt_metacast(const char *_clname)
|
||||
{
|
||||
if (!_clname) return Q_NULLPTR;
|
||||
if (!strcmp(_clname, qt_meta_stringdata_deviceConnectedDisplay.stringdata0))
|
||||
return static_cast<void*>(const_cast< deviceConnectedDisplay*>(this));
|
||||
return QLabel::qt_metacast(_clname);
|
||||
}
|
||||
|
||||
int deviceConnectedDisplay::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
|
||||
{
|
||||
_id = QLabel::qt_metacall(_c, _id, _a);
|
||||
if (_id < 0)
|
||||
return _id;
|
||||
if (_c == QMetaObject::InvokeMetaMethod) {
|
||||
if (_id < 1)
|
||||
qt_static_metacall(this, _c, _id, _a);
|
||||
_id -= 1;
|
||||
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
|
||||
if (_id < 1)
|
||||
*reinterpret_cast<int*>(_a[0]) = -1;
|
||||
_id -= 1;
|
||||
}
|
||||
return _id;
|
||||
}
|
||||
QT_END_MOC_NAMESPACE
|
Binary file not shown.
|
@ -0,0 +1,89 @@
|
|||
/****************************************************************************
|
||||
** Meta object code from reading C++ file 'espocombobox.h'
|
||||
**
|
||||
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.7.0)
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
*****************************************************************************/
|
||||
|
||||
#include "espocombobox.h"
|
||||
#include <QtCore/qbytearray.h>
|
||||
#include <QtCore/qmetatype.h>
|
||||
#if !defined(Q_MOC_OUTPUT_REVISION)
|
||||
#error "The header file 'espocombobox.h' doesn't include <QObject>."
|
||||
#elif Q_MOC_OUTPUT_REVISION != 67
|
||||
#error "This file was generated using the moc from 5.7.0. It"
|
||||
#error "cannot be used with the include files from this version of Qt."
|
||||
#error "(The moc has changed too much.)"
|
||||
#endif
|
||||
|
||||
QT_BEGIN_MOC_NAMESPACE
|
||||
struct qt_meta_stringdata_espoComboBox_t {
|
||||
QByteArrayData data[1];
|
||||
char stringdata0[13];
|
||||
};
|
||||
#define QT_MOC_LITERAL(idx, ofs, len) \
|
||||
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
|
||||
qptrdiff(offsetof(qt_meta_stringdata_espoComboBox_t, stringdata0) + ofs \
|
||||
- idx * sizeof(QByteArrayData)) \
|
||||
)
|
||||
static const qt_meta_stringdata_espoComboBox_t qt_meta_stringdata_espoComboBox = {
|
||||
{
|
||||
QT_MOC_LITERAL(0, 0, 12) // "espoComboBox"
|
||||
|
||||
},
|
||||
"espoComboBox"
|
||||
};
|
||||
#undef QT_MOC_LITERAL
|
||||
|
||||
static const uint qt_meta_data_espoComboBox[] = {
|
||||
|
||||
// content:
|
||||
7, // revision
|
||||
0, // classname
|
||||
0, 0, // classinfo
|
||||
0, 0, // methods
|
||||
0, 0, // properties
|
||||
0, 0, // enums/sets
|
||||
0, 0, // constructors
|
||||
0, // flags
|
||||
0, // signalCount
|
||||
|
||||
0 // eod
|
||||
};
|
||||
|
||||
void espoComboBox::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
|
||||
{
|
||||
Q_UNUSED(_o);
|
||||
Q_UNUSED(_id);
|
||||
Q_UNUSED(_c);
|
||||
Q_UNUSED(_a);
|
||||
}
|
||||
|
||||
const QMetaObject espoComboBox::staticMetaObject = {
|
||||
{ &QComboBox::staticMetaObject, qt_meta_stringdata_espoComboBox.data,
|
||||
qt_meta_data_espoComboBox, qt_static_metacall, Q_NULLPTR, Q_NULLPTR}
|
||||
};
|
||||
|
||||
|
||||
const QMetaObject *espoComboBox::metaObject() const
|
||||
{
|
||||
return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
|
||||
}
|
||||
|
||||
void *espoComboBox::qt_metacast(const char *_clname)
|
||||
{
|
||||
if (!_clname) return Q_NULLPTR;
|
||||
if (!strcmp(_clname, qt_meta_stringdata_espoComboBox.stringdata0))
|
||||
return static_cast<void*>(const_cast< espoComboBox*>(this));
|
||||
return QComboBox::qt_metacast(_clname);
|
||||
}
|
||||
|
||||
int espoComboBox::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
|
||||
{
|
||||
_id = QComboBox::qt_metacall(_c, _id, _a);
|
||||
if (_id < 0)
|
||||
return _id;
|
||||
return _id;
|
||||
}
|
||||
QT_END_MOC_NAMESPACE
|
Binary file not shown.
|
@ -0,0 +1,157 @@
|
|||
/****************************************************************************
|
||||
** Meta object code from reading C++ file 'esposlider.h'
|
||||
**
|
||||
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.7.0)
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
*****************************************************************************/
|
||||
|
||||
#include "esposlider.h"
|
||||
#include <QtCore/qbytearray.h>
|
||||
#include <QtCore/qmetatype.h>
|
||||
#if !defined(Q_MOC_OUTPUT_REVISION)
|
||||
#error "The header file 'esposlider.h' doesn't include <QObject>."
|
||||
#elif Q_MOC_OUTPUT_REVISION != 67
|
||||
#error "This file was generated using the moc from 5.7.0. It"
|
||||
#error "cannot be used with the include files from this version of Qt."
|
||||
#error "(The moc has changed too much.)"
|
||||
#endif
|
||||
|
||||
QT_BEGIN_MOC_NAMESPACE
|
||||
struct qt_meta_stringdata_espoSlider_t {
|
||||
QByteArrayData data[8];
|
||||
char stringdata0[69];
|
||||
};
|
||||
#define QT_MOC_LITERAL(idx, ofs, len) \
|
||||
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
|
||||
qptrdiff(offsetof(qt_meta_stringdata_espoSlider_t, stringdata0) + ofs \
|
||||
- idx * sizeof(QByteArrayData)) \
|
||||
)
|
||||
static const qt_meta_stringdata_espoSlider_t qt_meta_stringdata_espoSlider = {
|
||||
{
|
||||
QT_MOC_LITERAL(0, 0, 10), // "espoSlider"
|
||||
QT_MOC_LITERAL(1, 11, 6), // "lcdOut"
|
||||
QT_MOC_LITERAL(2, 18, 0), // ""
|
||||
QT_MOC_LITERAL(3, 19, 6), // "values"
|
||||
QT_MOC_LITERAL(4, 26, 14), // "voltageChanged"
|
||||
QT_MOC_LITERAL(5, 41, 10), // "newVoltage"
|
||||
QT_MOC_LITERAL(6, 52, 9), // "selfMoved"
|
||||
QT_MOC_LITERAL(7, 62, 6) // "newval"
|
||||
|
||||
},
|
||||
"espoSlider\0lcdOut\0\0values\0voltageChanged\0"
|
||||
"newVoltage\0selfMoved\0newval"
|
||||
};
|
||||
#undef QT_MOC_LITERAL
|
||||
|
||||
static const uint qt_meta_data_espoSlider[] = {
|
||||
|
||||
// content:
|
||||
7, // revision
|
||||
0, // classname
|
||||
0, 0, // classinfo
|
||||
3, 14, // methods
|
||||
0, 0, // properties
|
||||
0, 0, // enums/sets
|
||||
0, 0, // constructors
|
||||
0, // flags
|
||||
2, // signalCount
|
||||
|
||||
// signals: name, argc, parameters, tag, flags
|
||||
1, 1, 29, 2, 0x06 /* Public */,
|
||||
4, 1, 32, 2, 0x06 /* Public */,
|
||||
|
||||
// slots: name, argc, parameters, tag, flags
|
||||
6, 1, 35, 2, 0x0a /* Public */,
|
||||
|
||||
// signals: parameters
|
||||
QMetaType::Void, QMetaType::QString, 3,
|
||||
QMetaType::Void, QMetaType::Double, 5,
|
||||
|
||||
// slots: parameters
|
||||
QMetaType::Void, QMetaType::Int, 7,
|
||||
|
||||
0 // eod
|
||||
};
|
||||
|
||||
void espoSlider::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
|
||||
{
|
||||
if (_c == QMetaObject::InvokeMetaMethod) {
|
||||
espoSlider *_t = static_cast<espoSlider *>(_o);
|
||||
Q_UNUSED(_t)
|
||||
switch (_id) {
|
||||
case 0: _t->lcdOut((*reinterpret_cast< QString(*)>(_a[1]))); break;
|
||||
case 1: _t->voltageChanged((*reinterpret_cast< double(*)>(_a[1]))); break;
|
||||
case 2: _t->selfMoved((*reinterpret_cast< int(*)>(_a[1]))); break;
|
||||
default: ;
|
||||
}
|
||||
} else if (_c == QMetaObject::IndexOfMethod) {
|
||||
int *result = reinterpret_cast<int *>(_a[0]);
|
||||
void **func = reinterpret_cast<void **>(_a[1]);
|
||||
{
|
||||
typedef void (espoSlider::*_t)(QString );
|
||||
if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&espoSlider::lcdOut)) {
|
||||
*result = 0;
|
||||
return;
|
||||
}
|
||||
}
|
||||
{
|
||||
typedef void (espoSlider::*_t)(double );
|
||||
if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&espoSlider::voltageChanged)) {
|
||||
*result = 1;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const QMetaObject espoSlider::staticMetaObject = {
|
||||
{ &QSlider::staticMetaObject, qt_meta_stringdata_espoSlider.data,
|
||||
qt_meta_data_espoSlider, qt_static_metacall, Q_NULLPTR, Q_NULLPTR}
|
||||
};
|
||||
|
||||
|
||||
const QMetaObject *espoSlider::metaObject() const
|
||||
{
|
||||
return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
|
||||
}
|
||||
|
||||
void *espoSlider::qt_metacast(const char *_clname)
|
||||
{
|
||||
if (!_clname) return Q_NULLPTR;
|
||||
if (!strcmp(_clname, qt_meta_stringdata_espoSlider.stringdata0))
|
||||
return static_cast<void*>(const_cast< espoSlider*>(this));
|
||||
return QSlider::qt_metacast(_clname);
|
||||
}
|
||||
|
||||
int espoSlider::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
|
||||
{
|
||||
_id = QSlider::qt_metacall(_c, _id, _a);
|
||||
if (_id < 0)
|
||||
return _id;
|
||||
if (_c == QMetaObject::InvokeMetaMethod) {
|
||||
if (_id < 3)
|
||||
qt_static_metacall(this, _c, _id, _a);
|
||||
_id -= 3;
|
||||
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
|
||||
if (_id < 3)
|
||||
*reinterpret_cast<int*>(_a[0]) = -1;
|
||||
_id -= 3;
|
||||
}
|
||||
return _id;
|
||||
}
|
||||
|
||||
// SIGNAL 0
|
||||
void espoSlider::lcdOut(QString _t1)
|
||||
{
|
||||
void *_a[] = { Q_NULLPTR, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
|
||||
QMetaObject::activate(this, &staticMetaObject, 0, _a);
|
||||
}
|
||||
|
||||
// SIGNAL 1
|
||||
void espoSlider::voltageChanged(double _t1)
|
||||
{
|
||||
void *_a[] = { Q_NULLPTR, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
|
||||
QMetaObject::activate(this, &staticMetaObject, 1, _a);
|
||||
}
|
||||
QT_END_MOC_NAMESPACE
|
Binary file not shown.
|
@ -0,0 +1,128 @@
|
|||
/****************************************************************************
|
||||
** Meta object code from reading C++ file 'espospinbox.h'
|
||||
**
|
||||
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.7.0)
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
*****************************************************************************/
|
||||
|
||||
#include "espospinbox.h"
|
||||
#include <QtCore/qbytearray.h>
|
||||
#include <QtCore/qmetatype.h>
|
||||
#if !defined(Q_MOC_OUTPUT_REVISION)
|
||||
#error "The header file 'espospinbox.h' doesn't include <QObject>."
|
||||
#elif Q_MOC_OUTPUT_REVISION != 67
|
||||
#error "This file was generated using the moc from 5.7.0. It"
|
||||
#error "cannot be used with the include files from this version of Qt."
|
||||
#error "(The moc has changed too much.)"
|
||||
#endif
|
||||
|
||||
QT_BEGIN_MOC_NAMESPACE
|
||||
struct qt_meta_stringdata_espoSpinBox_t {
|
||||
QByteArrayData data[10];
|
||||
char stringdata0[84];
|
||||
};
|
||||
#define QT_MOC_LITERAL(idx, ofs, len) \
|
||||
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
|
||||
qptrdiff(offsetof(qt_meta_stringdata_espoSpinBox_t, stringdata0) + ofs \
|
||||
- idx * sizeof(QByteArrayData)) \
|
||||
)
|
||||
static const qt_meta_stringdata_espoSpinBox_t qt_meta_stringdata_espoSpinBox = {
|
||||
{
|
||||
QT_MOC_LITERAL(0, 0, 11), // "espoSpinBox"
|
||||
QT_MOC_LITERAL(1, 12, 14), // "maximumChanged"
|
||||
QT_MOC_LITERAL(2, 27, 0), // ""
|
||||
QT_MOC_LITERAL(3, 28, 6), // "linked"
|
||||
QT_MOC_LITERAL(4, 35, 6), // "setMax"
|
||||
QT_MOC_LITERAL(5, 42, 6), // "newMax"
|
||||
QT_MOC_LITERAL(6, 49, 6), // "setMin"
|
||||
QT_MOC_LITERAL(7, 56, 6), // "newMin"
|
||||
QT_MOC_LITERAL(8, 63, 14), // "changeStepping"
|
||||
QT_MOC_LITERAL(9, 78, 5) // "value"
|
||||
|
||||
},
|
||||
"espoSpinBox\0maximumChanged\0\0linked\0"
|
||||
"setMax\0newMax\0setMin\0newMin\0changeStepping\0"
|
||||
"value"
|
||||
};
|
||||
#undef QT_MOC_LITERAL
|
||||
|
||||
static const uint qt_meta_data_espoSpinBox[] = {
|
||||
|
||||
// content:
|
||||
7, // revision
|
||||
0, // classname
|
||||
0, 0, // classinfo
|
||||
4, 14, // methods
|
||||
0, 0, // properties
|
||||
0, 0, // enums/sets
|
||||
0, 0, // constructors
|
||||
0, // flags
|
||||
0, // signalCount
|
||||
|
||||
// slots: name, argc, parameters, tag, flags
|
||||
1, 1, 34, 2, 0x0a /* Public */,
|
||||
4, 1, 37, 2, 0x0a /* Public */,
|
||||
6, 1, 40, 2, 0x0a /* Public */,
|
||||
8, 1, 43, 2, 0x0a /* Public */,
|
||||
|
||||
// slots: parameters
|
||||
QMetaType::Void, QMetaType::Double, 3,
|
||||
QMetaType::Void, QMetaType::Double, 5,
|
||||
QMetaType::Void, QMetaType::Double, 7,
|
||||
QMetaType::Void, QMetaType::Double, 9,
|
||||
|
||||
0 // eod
|
||||
};
|
||||
|
||||
void espoSpinBox::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
|
||||
{
|
||||
if (_c == QMetaObject::InvokeMetaMethod) {
|
||||
espoSpinBox *_t = static_cast<espoSpinBox *>(_o);
|
||||
Q_UNUSED(_t)
|
||||
switch (_id) {
|
||||
case 0: _t->maximumChanged((*reinterpret_cast< double(*)>(_a[1]))); break;
|
||||
case 1: _t->setMax((*reinterpret_cast< double(*)>(_a[1]))); break;
|
||||
case 2: _t->setMin((*reinterpret_cast< double(*)>(_a[1]))); break;
|
||||
case 3: _t->changeStepping((*reinterpret_cast< double(*)>(_a[1]))); break;
|
||||
default: ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const QMetaObject espoSpinBox::staticMetaObject = {
|
||||
{ &QDoubleSpinBox::staticMetaObject, qt_meta_stringdata_espoSpinBox.data,
|
||||
qt_meta_data_espoSpinBox, qt_static_metacall, Q_NULLPTR, Q_NULLPTR}
|
||||
};
|
||||
|
||||
|
||||
const QMetaObject *espoSpinBox::metaObject() const
|
||||
{
|
||||
return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
|
||||
}
|
||||
|
||||
void *espoSpinBox::qt_metacast(const char *_clname)
|
||||
{
|
||||
if (!_clname) return Q_NULLPTR;
|
||||
if (!strcmp(_clname, qt_meta_stringdata_espoSpinBox.stringdata0))
|
||||
return static_cast<void*>(const_cast< espoSpinBox*>(this));
|
||||
return QDoubleSpinBox::qt_metacast(_clname);
|
||||
}
|
||||
|
||||
int espoSpinBox::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
|
||||
{
|
||||
_id = QDoubleSpinBox::qt_metacall(_c, _id, _a);
|
||||
if (_id < 0)
|
||||
return _id;
|
||||
if (_c == QMetaObject::InvokeMetaMethod) {
|
||||
if (_id < 4)
|
||||
qt_static_metacall(this, _c, _id, _a);
|
||||
_id -= 4;
|
||||
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
|
||||
if (_id < 4)
|
||||
*reinterpret_cast<int*>(_a[0]) = -1;
|
||||
_id -= 4;
|
||||
}
|
||||
return _id;
|
||||
}
|
||||
QT_END_MOC_NAMESPACE
|
Binary file not shown.
|
@ -0,0 +1,263 @@
|
|||
/****************************************************************************
|
||||
** Meta object code from reading C++ file 'functiongencontrol.h'
|
||||
**
|
||||
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.7.0)
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
*****************************************************************************/
|
||||
|
||||
#include "functiongencontrol.h"
|
||||
#include <QtCore/qbytearray.h>
|
||||
#include <QtCore/qmetatype.h>
|
||||
#if !defined(Q_MOC_OUTPUT_REVISION)
|
||||
#error "The header file 'functiongencontrol.h' doesn't include <QObject>."
|
||||
#elif Q_MOC_OUTPUT_REVISION != 67
|
||||
#error "This file was generated using the moc from 5.7.0. It"
|
||||
#error "cannot be used with the include files from this version of Qt."
|
||||
#error "(The moc has changed too much.)"
|
||||
#endif
|
||||
|
||||
QT_BEGIN_MOC_NAMESPACE
|
||||
struct qt_meta_stringdata_functionGenControl_t {
|
||||
QByteArrayData data[24];
|
||||
char stringdata0[333];
|
||||
};
|
||||
#define QT_MOC_LITERAL(idx, ofs, len) \
|
||||
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
|
||||
qptrdiff(offsetof(qt_meta_stringdata_functionGenControl_t, stringdata0) + ofs \
|
||||
- idx * sizeof(QByteArrayData)) \
|
||||
)
|
||||
static const qt_meta_stringdata_functionGenControl_t qt_meta_stringdata_functionGenControl = {
|
||||
{
|
||||
QT_MOC_LITERAL(0, 0, 18), // "functionGenControl"
|
||||
QT_MOC_LITERAL(1, 19, 19), // "functionGenToUpdate"
|
||||
QT_MOC_LITERAL(2, 39, 0), // ""
|
||||
QT_MOC_LITERAL(3, 40, 7), // "channel"
|
||||
QT_MOC_LITERAL(4, 48, 19), // "functionGenControl*"
|
||||
QT_MOC_LITERAL(5, 68, 11), // "fGenControl"
|
||||
QT_MOC_LITERAL(6, 80, 14), // "setMaxFreq_CH1"
|
||||
QT_MOC_LITERAL(7, 95, 7), // "maxFreq"
|
||||
QT_MOC_LITERAL(8, 103, 14), // "setMinFreq_CH1"
|
||||
QT_MOC_LITERAL(9, 118, 7), // "minFreq"
|
||||
QT_MOC_LITERAL(10, 126, 14), // "setMaxFreq_CH2"
|
||||
QT_MOC_LITERAL(11, 141, 14), // "setMinFreq_CH2"
|
||||
QT_MOC_LITERAL(12, 156, 16), // "waveformName_CH1"
|
||||
QT_MOC_LITERAL(13, 173, 7), // "newName"
|
||||
QT_MOC_LITERAL(14, 181, 14), // "freqUpdate_CH1"
|
||||
QT_MOC_LITERAL(15, 196, 7), // "newFreq"
|
||||
QT_MOC_LITERAL(16, 204, 19), // "amplitudeUpdate_CH1"
|
||||
QT_MOC_LITERAL(17, 224, 12), // "newAmplitude"
|
||||
QT_MOC_LITERAL(18, 237, 16), // "offsetUpdate_CH1"
|
||||
QT_MOC_LITERAL(19, 254, 9), // "newOffset"
|
||||
QT_MOC_LITERAL(20, 264, 16), // "waveformName_CH2"
|
||||
QT_MOC_LITERAL(21, 281, 14), // "freqUpdate_CH2"
|
||||
QT_MOC_LITERAL(22, 296, 19), // "amplitudeUpdate_CH2"
|
||||
QT_MOC_LITERAL(23, 316, 16) // "offsetUpdate_CH2"
|
||||
|
||||
},
|
||||
"functionGenControl\0functionGenToUpdate\0"
|
||||
"\0channel\0functionGenControl*\0fGenControl\0"
|
||||
"setMaxFreq_CH1\0maxFreq\0setMinFreq_CH1\0"
|
||||
"minFreq\0setMaxFreq_CH2\0setMinFreq_CH2\0"
|
||||
"waveformName_CH1\0newName\0freqUpdate_CH1\0"
|
||||
"newFreq\0amplitudeUpdate_CH1\0newAmplitude\0"
|
||||
"offsetUpdate_CH1\0newOffset\0waveformName_CH2\0"
|
||||
"freqUpdate_CH2\0amplitudeUpdate_CH2\0"
|
||||
"offsetUpdate_CH2"
|
||||
};
|
||||
#undef QT_MOC_LITERAL
|
||||
|
||||
static const uint qt_meta_data_functionGenControl[] = {
|
||||
|
||||
// content:
|
||||
7, // revision
|
||||
0, // classname
|
||||
0, 0, // classinfo
|
||||
13, 14, // methods
|
||||
0, 0, // properties
|
||||
0, 0, // enums/sets
|
||||
0, 0, // constructors
|
||||
0, // flags
|
||||
5, // signalCount
|
||||
|
||||
// signals: name, argc, parameters, tag, flags
|
||||
1, 2, 79, 2, 0x06 /* Public */,
|
||||
6, 1, 84, 2, 0x06 /* Public */,
|
||||
8, 1, 87, 2, 0x06 /* Public */,
|
||||
10, 1, 90, 2, 0x06 /* Public */,
|
||||
11, 1, 93, 2, 0x06 /* Public */,
|
||||
|
||||
// slots: name, argc, parameters, tag, flags
|
||||
12, 1, 96, 2, 0x0a /* Public */,
|
||||
14, 1, 99, 2, 0x0a /* Public */,
|
||||
16, 1, 102, 2, 0x0a /* Public */,
|
||||
18, 1, 105, 2, 0x0a /* Public */,
|
||||
20, 1, 108, 2, 0x0a /* Public */,
|
||||
21, 1, 111, 2, 0x0a /* Public */,
|
||||
22, 1, 114, 2, 0x0a /* Public */,
|
||||
23, 1, 117, 2, 0x0a /* Public */,
|
||||
|
||||
// signals: parameters
|
||||
QMetaType::Void, QMetaType::Int, 0x80000000 | 4, 3, 5,
|
||||
QMetaType::Void, QMetaType::Double, 7,
|
||||
QMetaType::Void, QMetaType::Double, 9,
|
||||
QMetaType::Void, QMetaType::Double, 7,
|
||||
QMetaType::Void, QMetaType::Double, 9,
|
||||
|
||||
// slots: parameters
|
||||
QMetaType::Void, QMetaType::QString, 13,
|
||||
QMetaType::Void, QMetaType::Double, 15,
|
||||
QMetaType::Void, QMetaType::Double, 17,
|
||||
QMetaType::Void, QMetaType::Double, 19,
|
||||
QMetaType::Void, QMetaType::QString, 13,
|
||||
QMetaType::Void, QMetaType::Double, 15,
|
||||
QMetaType::Void, QMetaType::Double, 17,
|
||||
QMetaType::Void, QMetaType::Double, 19,
|
||||
|
||||
0 // eod
|
||||
};
|
||||
|
||||
void functionGenControl::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
|
||||
{
|
||||
if (_c == QMetaObject::InvokeMetaMethod) {
|
||||
functionGenControl *_t = static_cast<functionGenControl *>(_o);
|
||||
Q_UNUSED(_t)
|
||||
switch (_id) {
|
||||
case 0: _t->functionGenToUpdate((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< functionGenControl*(*)>(_a[2]))); break;
|
||||
case 1: _t->setMaxFreq_CH1((*reinterpret_cast< double(*)>(_a[1]))); break;
|
||||
case 2: _t->setMinFreq_CH1((*reinterpret_cast< double(*)>(_a[1]))); break;
|
||||
case 3: _t->setMaxFreq_CH2((*reinterpret_cast< double(*)>(_a[1]))); break;
|
||||
case 4: _t->setMinFreq_CH2((*reinterpret_cast< double(*)>(_a[1]))); break;
|
||||
case 5: _t->waveformName_CH1((*reinterpret_cast< QString(*)>(_a[1]))); break;
|
||||
case 6: _t->freqUpdate_CH1((*reinterpret_cast< double(*)>(_a[1]))); break;
|
||||
case 7: _t->amplitudeUpdate_CH1((*reinterpret_cast< double(*)>(_a[1]))); break;
|
||||
case 8: _t->offsetUpdate_CH1((*reinterpret_cast< double(*)>(_a[1]))); break;
|
||||
case 9: _t->waveformName_CH2((*reinterpret_cast< QString(*)>(_a[1]))); break;
|
||||
case 10: _t->freqUpdate_CH2((*reinterpret_cast< double(*)>(_a[1]))); break;
|
||||
case 11: _t->amplitudeUpdate_CH2((*reinterpret_cast< double(*)>(_a[1]))); break;
|
||||
case 12: _t->offsetUpdate_CH2((*reinterpret_cast< double(*)>(_a[1]))); break;
|
||||
default: ;
|
||||
}
|
||||
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
|
||||
switch (_id) {
|
||||
default: *reinterpret_cast<int*>(_a[0]) = -1; break;
|
||||
case 0:
|
||||
switch (*reinterpret_cast<int*>(_a[1])) {
|
||||
default: *reinterpret_cast<int*>(_a[0]) = -1; break;
|
||||
case 1:
|
||||
*reinterpret_cast<int*>(_a[0]) = qRegisterMetaType< functionGenControl* >(); break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else if (_c == QMetaObject::IndexOfMethod) {
|
||||
int *result = reinterpret_cast<int *>(_a[0]);
|
||||
void **func = reinterpret_cast<void **>(_a[1]);
|
||||
{
|
||||
typedef void (functionGenControl::*_t)(int , functionGenControl * );
|
||||
if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&functionGenControl::functionGenToUpdate)) {
|
||||
*result = 0;
|
||||
return;
|
||||
}
|
||||
}
|
||||
{
|
||||
typedef void (functionGenControl::*_t)(double );
|
||||
if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&functionGenControl::setMaxFreq_CH1)) {
|
||||
*result = 1;
|
||||
return;
|
||||
}
|
||||
}
|
||||
{
|
||||
typedef void (functionGenControl::*_t)(double );
|
||||
if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&functionGenControl::setMinFreq_CH1)) {
|
||||
*result = 2;
|
||||
return;
|
||||
}
|
||||
}
|
||||
{
|
||||
typedef void (functionGenControl::*_t)(double );
|
||||
if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&functionGenControl::setMaxFreq_CH2)) {
|
||||
*result = 3;
|
||||
return;
|
||||
}
|
||||
}
|
||||
{
|
||||
typedef void (functionGenControl::*_t)(double );
|
||||
if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&functionGenControl::setMinFreq_CH2)) {
|
||||
*result = 4;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const QMetaObject functionGenControl::staticMetaObject = {
|
||||
{ &QLabel::staticMetaObject, qt_meta_stringdata_functionGenControl.data,
|
||||
qt_meta_data_functionGenControl, qt_static_metacall, Q_NULLPTR, Q_NULLPTR}
|
||||
};
|
||||
|
||||
|
||||
const QMetaObject *functionGenControl::metaObject() const
|
||||
{
|
||||
return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
|
||||
}
|
||||
|
||||
void *functionGenControl::qt_metacast(const char *_clname)
|
||||
{
|
||||
if (!_clname) return Q_NULLPTR;
|
||||
if (!strcmp(_clname, qt_meta_stringdata_functionGenControl.stringdata0))
|
||||
return static_cast<void*>(const_cast< functionGenControl*>(this));
|
||||
return QLabel::qt_metacast(_clname);
|
||||
}
|
||||
|
||||
int functionGenControl::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
|
||||
{
|
||||
_id = QLabel::qt_metacall(_c, _id, _a);
|
||||
if (_id < 0)
|
||||
return _id;
|
||||
if (_c == QMetaObject::InvokeMetaMethod) {
|
||||
if (_id < 13)
|
||||
qt_static_metacall(this, _c, _id, _a);
|
||||
_id -= 13;
|
||||
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
|
||||
if (_id < 13)
|
||||
qt_static_metacall(this, _c, _id, _a);
|
||||
_id -= 13;
|
||||
}
|
||||
return _id;
|
||||
}
|
||||
|
||||
// SIGNAL 0
|
||||
void functionGenControl::functionGenToUpdate(int _t1, functionGenControl * _t2)
|
||||
{
|
||||
void *_a[] = { Q_NULLPTR, const_cast<void*>(reinterpret_cast<const void*>(&_t1)), const_cast<void*>(reinterpret_cast<const void*>(&_t2)) };
|
||||
QMetaObject::activate(this, &staticMetaObject, 0, _a);
|
||||
}
|
||||
|
||||
// SIGNAL 1
|
||||
void functionGenControl::setMaxFreq_CH1(double _t1)
|
||||
{
|
||||
void *_a[] = { Q_NULLPTR, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
|
||||
QMetaObject::activate(this, &staticMetaObject, 1, _a);
|
||||
}
|
||||
|
||||
// SIGNAL 2
|
||||
void functionGenControl::setMinFreq_CH1(double _t1)
|
||||
{
|
||||
void *_a[] = { Q_NULLPTR, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
|
||||
QMetaObject::activate(this, &staticMetaObject, 2, _a);
|
||||
}
|
||||
|
||||
// SIGNAL 3
|
||||
void functionGenControl::setMaxFreq_CH2(double _t1)
|
||||
{
|
||||
void *_a[] = { Q_NULLPTR, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
|
||||
QMetaObject::activate(this, &staticMetaObject, 3, _a);
|
||||
}
|
||||
|
||||
// SIGNAL 4
|
||||
void functionGenControl::setMinFreq_CH2(double _t1)
|
||||
{
|
||||
void *_a[] = { Q_NULLPTR, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
|
||||
QMetaObject::activate(this, &staticMetaObject, 4, _a);
|
||||
}
|
||||
QT_END_MOC_NAMESPACE
|
Binary file not shown.
|
@ -0,0 +1,112 @@
|
|||
/****************************************************************************
|
||||
** Meta object code from reading C++ file 'gahnooslashlinuxusbdriver.h'
|
||||
**
|
||||
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.7.0)
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
*****************************************************************************/
|
||||
|
||||
#include "gahnooslashlinuxusbdriver.h"
|
||||
#include <QtCore/qbytearray.h>
|
||||
#include <QtCore/qmetatype.h>
|
||||
#if !defined(Q_MOC_OUTPUT_REVISION)
|
||||
#error "The header file 'gahnooslashlinuxusbdriver.h' doesn't include <QObject>."
|
||||
#elif Q_MOC_OUTPUT_REVISION != 67
|
||||
#error "This file was generated using the moc from 5.7.0. It"
|
||||
#error "cannot be used with the include files from this version of Qt."
|
||||
#error "(The moc has changed too much.)"
|
||||
#endif
|
||||
|
||||
QT_BEGIN_MOC_NAMESPACE
|
||||
struct qt_meta_stringdata_gahnooSlashLinuxUsbDriver_t {
|
||||
QByteArrayData data[3];
|
||||
char stringdata0[40];
|
||||
};
|
||||
#define QT_MOC_LITERAL(idx, ofs, len) \
|
||||
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
|
||||
qptrdiff(offsetof(qt_meta_stringdata_gahnooSlashLinuxUsbDriver_t, stringdata0) + ofs \
|
||||
- idx * sizeof(QByteArrayData)) \
|
||||
)
|
||||
static const qt_meta_stringdata_gahnooSlashLinuxUsbDriver_t qt_meta_stringdata_gahnooSlashLinuxUsbDriver = {
|
||||
{
|
||||
QT_MOC_LITERAL(0, 0, 25), // "gahnooSlashLinuxUsbDriver"
|
||||
QT_MOC_LITERAL(1, 26, 12), // "isoTimerTick"
|
||||
QT_MOC_LITERAL(2, 39, 0) // ""
|
||||
|
||||
},
|
||||
"gahnooSlashLinuxUsbDriver\0isoTimerTick\0"
|
||||
""
|
||||
};
|
||||
#undef QT_MOC_LITERAL
|
||||
|
||||
static const uint qt_meta_data_gahnooSlashLinuxUsbDriver[] = {
|
||||
|
||||
// content:
|
||||
7, // revision
|
||||
0, // classname
|
||||
0, 0, // classinfo
|
||||
1, 14, // methods
|
||||
0, 0, // properties
|
||||
0, 0, // enums/sets
|
||||
0, 0, // constructors
|
||||
0, // flags
|
||||
0, // signalCount
|
||||
|
||||
// slots: name, argc, parameters, tag, flags
|
||||
1, 0, 19, 2, 0x0a /* Public */,
|
||||
|
||||
// slots: parameters
|
||||
QMetaType::Void,
|
||||
|
||||
0 // eod
|
||||
};
|
||||
|
||||
void gahnooSlashLinuxUsbDriver::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
|
||||
{
|
||||
if (_c == QMetaObject::InvokeMetaMethod) {
|
||||
gahnooSlashLinuxUsbDriver *_t = static_cast<gahnooSlashLinuxUsbDriver *>(_o);
|
||||
Q_UNUSED(_t)
|
||||
switch (_id) {
|
||||
case 0: _t->isoTimerTick(); break;
|
||||
default: ;
|
||||
}
|
||||
}
|
||||
Q_UNUSED(_a);
|
||||
}
|
||||
|
||||
const QMetaObject gahnooSlashLinuxUsbDriver::staticMetaObject = {
|
||||
{ &genericUsbDriver::staticMetaObject, qt_meta_stringdata_gahnooSlashLinuxUsbDriver.data,
|
||||
qt_meta_data_gahnooSlashLinuxUsbDriver, qt_static_metacall, Q_NULLPTR, Q_NULLPTR}
|
||||
};
|
||||
|
||||
|
||||
const QMetaObject *gahnooSlashLinuxUsbDriver::metaObject() const
|
||||
{
|
||||
return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
|
||||
}
|
||||
|
||||
void *gahnooSlashLinuxUsbDriver::qt_metacast(const char *_clname)
|
||||
{
|
||||
if (!_clname) return Q_NULLPTR;
|
||||
if (!strcmp(_clname, qt_meta_stringdata_gahnooSlashLinuxUsbDriver.stringdata0))
|
||||
return static_cast<void*>(const_cast< gahnooSlashLinuxUsbDriver*>(this));
|
||||
return genericUsbDriver::qt_metacast(_clname);
|
||||
}
|
||||
|
||||
int gahnooSlashLinuxUsbDriver::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
|
||||
{
|
||||
_id = genericUsbDriver::qt_metacall(_c, _id, _a);
|
||||
if (_id < 0)
|
||||
return _id;
|
||||
if (_c == QMetaObject::InvokeMetaMethod) {
|
||||
if (_id < 1)
|
||||
qt_static_metacall(this, _c, _id, _a);
|
||||
_id -= 1;
|
||||
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
|
||||
if (_id < 1)
|
||||
*reinterpret_cast<int*>(_a[0]) = -1;
|
||||
_id -= 1;
|
||||
}
|
||||
return _id;
|
||||
}
|
||||
QT_END_MOC_NAMESPACE
|
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue