ubuntuusers.de

USB Interface

Autor:
philippobambino
Datum:
25. Januar 2014 22:23
Code:
 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
philipp@philipp-ThinkPad-R60-R60i:~$ cd usbdmx
philipp@philipp-ThinkPad-R60-R60i:~/usbdmx$ make
gcc -Wall -g -c -fpic -pthread usbdmx.c -o usbdmx.o
usbdmx.c: In function ‘read_write_thread’:
usbdmx.c:193:9: warning: variable ‘res’ set but not used [-Wunused-but-set-variable]
     int res;
         ^
ar rcs libusbdmx.a usbdmx.o
gcc -Wall -g -c -fpic -pthread linux/hid.c -o linux/hid.o
gcc linux/hid.o usbdmx.o  -shared -s -o libusbdmx.so -pthread `pkg-config libudev --libs`
g++ -L. -Wall -o usbdmx_example usbdmx_example.cpp -lusbdmx
usbdmx_example.cpp: In function ‘int main(int, char**)’:
usbdmx_example.cpp:27:19: warning: variable ‘tmp’ set but not used [-Wunused-but-set-variable]
     unsigned char tmp;
                   ^
g++ linux/hid.o usbdmx.o  usbdmx_example.cpp -o usbdmx_example_static -pthread `pkg-config libudev --libs`
gcc -L. -Wall -o simple_example simple_example.c -l usbdmx
gcc linux/hid.o usbdmx.o  -pthread `pkg-config libudev --libs` simple_example.c -o simple_example_static
echo "" ; head -n 17 README.md

usbdmx - Linux/Mac/Windows-Driver for [FX5 USB DMX Interface](http://www.fx5.de/)
and [Digital Enlightenment](http://www.digital-enlightenment.de).

BSD-License. API compatible with
original Windows-Drivers usbdmx.dll and (!) usbdmxsi.dll

To use the interface without root-privileges:
```
$ sudo cp 50-usbdmx.rules /etc/udev/rules.d/
```

To use the non-static-version "usbdmx_example" or "simple_example":
```
$ LD_LIBRARY_PATH=. ./usbdmx_example
$ LD_LIBRARY_PATH=. ./simple_example
```