1 |
i2c-tiny-usb test application - http://www.harbaum.org/till/i2c_tiny_usb |
1 |
i2c-tiny-usb test application - http://www.harbaum.org/till/i2c_tiny_usb |
2 |
------------------------------------------------------------------------ |
2 |
------------------------------------------------------------------------ |
3 |
|
3 |
|
4 |
This simple test application is meant to demonstrate libusb |
4 |
This simple test application is meant to demonstrate libusb |
5 |
interfacing to the i2c-tiny-usb interface. |
5 |
interfacing to the i2c-tiny-usb interface. |
6 |
|
6 |
|
7 |
This is no useful application, if you are only interesting in |
7 |
This is no useful application, if you are only interesting in |
8 |
using the i2c-tiny-usb interface in your linux box please |
8 |
using the i2c-tiny-usb interface in your linux box please |
9 |
use the kernel driver. |
9 |
use the kernel driver. |
10 |
|
10 |
|
11 |
Linux |
11 |
Linux |
12 |
----- |
12 |
----- |
13 |
|
13 |
|
14 |
required packages: libgtk2.0-dev |
14 |
required packages: libgtk2.0-dev |
15 |
|
15 |
|
16 |
This demo application has been developed under and for linux. Just |
16 |
This demo application has been developed under and for linux. Just |
17 |
make sure you have libusb installed. To use this program just |
17 |
make sure you have libusb installed. To use this program just |
18 |
compile by typing "make" and run the resulting i2c_usb. |
18 |
compile by typing "make" and run the resulting i2c_usb. |
19 |
|
19 |
|
20 |
Be sure that the i2c-tiny-usb kernel driver is not loaded while |
20 |
Be sure that the i2c-tiny-usb kernel driver is not loaded while |
21 |
running the test application. Otherwise the test application will |
21 |
running the test application. Otherwise the test application will |
22 |
fail with the follwing error message: |
22 |
fail with the follwing error message: |
23 |
|
23 |
|
24 |
USB error: could not claim interface 0: Device or resource busy |
24 |
USB error: could not claim interface 0: Device or resource busy |
25 |
|
25 |
|
26 |
This is due to the fact that no two drivers may access the interface |
26 |
This is due to the fact that no two drivers may access the interface |
27 |
at the same time. |
27 |
at the same time. |
28 |
|
28 |
|
29 |
Windows |
29 |
Windows |
30 |
------- |
30 |
------- |
31 |
|
31 |
|
32 |
This program can be compiled for windows. This has been tested |
32 |
This program can be compiled for windows. This has been tested |
33 |
under Linux using xmingw and the windows port of libusb |
33 |
under Linux using xmingw and the windows port of libusb |
34 |
(see http://libusb-win32.sourceforge.net). To install the |
34 |
(see http://libusb-win32.sourceforge.net). To install the |
35 |
driver plug the device in and install the driver from |
35 |
driver plug the device in and install the driver from |
36 |
the win directory. Then run testapp/i2c_usb.exe |
36 |
the win directory. Then run testapp/i2c_usb.exe |
37 |
|
37 |
|
38 |
This program may also be compiled under windows using cygwin or |
38 |
This program may also be compiled under windows using cygwin or |
39 |
mingw (which is part of cygwin). In order to use cygwin simply |
39 |
mingw (which is part of cygwin). In order to use cygwin simply |
40 |
copy usb.h win32-linusb to /cygwin/usr/include and libusb.a to |
40 |
copy usb.h win32-linusb to /cygwin/usr/include and libusb.a to |
41 |
/cygwin/lib and do a "make -f Makefile.cygwin". Don't forget to |
41 |
/cygwin/lib and do a "make -f Makefile.cygwin". Don't forget to |
42 |
distribute /cygwin/bin/cygwin1.dll with your file to allow it to |
42 |
distribute /cygwin/bin/cygwin1.dll with your file to allow it to |
43 |
run in non-cygwin environments as well. No dll is required when using |
43 |
run in non-cygwin environments as well. No dll is required when using |
44 |
mingw. In that case copy usb.h to /cygwin/usr/include/mingw and |
44 |
mingw. In that case copy usb.h to /cygwin/usr/include/mingw and |
45 |
libusb.a to /cygwin/lib/mingw. Finally do a "make -f Makefile.mingw". |
45 |
libusb.a to /cygwin/lib/mingw. Finally do a "make -f Makefile.mingw". |
46 |
|
46 |
|
47 |
MacOS X |
47 |
MacOS X |
48 |
------- |
48 |
------- |
49 |
|
49 |
|
50 |
The program can be compiled under MacOS as well. The fink version |
50 |
The program can be compiled under MacOS as well. The fink version |
51 |
of linusb has to be installed and a simple "make -f Makefile.macos" |
51 |
of linusb has to be installed and a simple "make -f Makefile.macos" |
52 |
will build the native MacOS X version. |
52 |
will build the native MacOS X version. |