forked from chad3814/libhid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.svn
151 lines (102 loc) · 4.78 KB
/
README.svn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
libhid README
=============
libhid is (c) 2003-2008 by
Martin F. Krafft <[email protected]>
Charles Lepple <[email protected]>
Arnaud Quette <[email protected]>
and distributed under the terms of the GNU General Public License v2.
See the file ./COPYING in the source distribution for more information.
Revision: $Id$
Please send bugreports to <[email protected]>
Introduction
------------
libhid is a rewrite of libHID[0] and aims to provide the same functionality
from a more organised framework. It aims to provide a layer of abstraction for
accessing HID-class devices over USB or serial lines (similar to what libusb
provides for the base USB protocol).
0. http://www.ghz.cc/~clepple/libHID/doc/html/
libhid has been designed because it is needed in two other projects
(libphdigets and nut). As such, it does not have a complete featureset yet but
is rather a work in progress (alpha state). We invite everyone to contribute
or get in touch with us for additional features.
Please find more information on the project website:
http://libhid.alioth.debian.org
You are welcome to sign up with the libhid mailing list at
http://lists.alioth.debian.org/mailman/listinfo/libhid-discuss
for support.
Configuration
-------------
To configure the package, you will need the following software. In parentheses
are the versions used by the developers. Previous versions may work, but are
not supported.
libhid needs libusb version 0.1.8beta or newer. It does not work with libusb
1.0 at this moment. The following two Debian packages provide the needed
software:
- libusb-0.1-4 (1:0.1.8-17)
- libusb-dev (1:0.1.8-17)
The libusb home page is here: http://libusb.sourceforge.net/
If you want to build the swig python existension, you will need swig 1.3
installed. The following two Debian packages provide it:
- libswig1.3.22 (1.3.22-3)
- swig (1.3.22-3)
The SWIG homepage is here: http://www.swig.org/
To create man pages for the included utility programs, you need xsltproc and
the DocBook stylesheets.
- xsltproc (1.1.12-5)
- docbook-xsl (1.66.1-1)
Lastly, to compile the API documentation, you need doxygen, which is in the
following Debian package:
- doxygen (1.2.15-2)
Once these are installed, the package can be configured and compiled.
Configuration happens as follows:
$ ./configure [args]
where [args] is a space-separated list of the following:
--prefix=/usr/local installs the software under /usr/local
--enable-debug enables debugging symbols in the library
--enable-maintainer-mode enables automatic regeneration of configure and
Makefile scripts
--disable-shared only creates a library object for static
linking, which shortens compile time. generally,
this is not necessary.
More options are available. Consult the `./configure --help` output.
For most purposes, it suffices to issue the following command:
$ ./configure --enable-debug
The recommended way to install the software requires you to issue the following
command:
$ ./configure --enable-debug --prefix=/usr/local/stow/libhid
Following the configuration, the package can be build and installed as usual:
$ make
$ su # if needed
# make install
Help wanted
-----------
Note that the library is not (yet) complete and it's not thoroughly tested.
However, given the effort and grief we went through in writing it, we would
like to make it available to folks, get people to test it, and hopefully have
some peeps submit improvements. If you have any suggestions, please write to
us at the mailing list mentioned above.
It's not yet documented, although the usage should be fairly straight
forward. We are hoping that someone steps forward and offers to document the
work. It generally results in better documentation, when it's not written by
the authors.
Furthermore, we are always looking for people willing to help out. In
particular, we would love to find someone willing to maintain the website.
We are also looking to rewrite the MGE HIDParser and implement new
functionality. If you are interested, please contact us at the libhid-discuss
mailing list address above.
Credits
-------
The original library was written by Charles Lepple and Arnaud Quette. Martin
Krafft later joined and led the rewrite.
The library uses the HIDParser framework made available by MGE[1].
1. http://www.mgeups.com/opensource/projects/hidparser.htm
Usage
-----
The library supports pkg-config. Thus, to compile with the library,
#include <hid.h>
and in your Makefile:
CPPFLAGS += `pkg-config libhid --cflags`
LDFLAGS += `pkg-config libhid --libs`
If using automake, use the AM_* versions of the two variables. See
test/test_libhid.c and its Makefile.am for more details.
Have fun.