aboutsummaryrefslogtreecommitdiff
path: root/lib/vusb/examples/hid-data/Readme.txt
diff options
context:
space:
mode:
Diffstat (limited to 'lib/vusb/examples/hid-data/Readme.txt')
-rw-r--r--lib/vusb/examples/hid-data/Readme.txt75
1 files changed, 75 insertions, 0 deletions
diff --git a/lib/vusb/examples/hid-data/Readme.txt b/lib/vusb/examples/hid-data/Readme.txt
new file mode 100644
index 000000000..cb17baa01
--- /dev/null
+++ b/lib/vusb/examples/hid-data/Readme.txt
@@ -0,0 +1,75 @@
1This is the Readme file for the hid-data example. In this example, we show
2how blocks of data can be exchanged with the device using only functionality
3compliant to the HID class. Since class drivers for HID are included with
4Windows, you don't need to install drivers on Windows.
5
6
7WHAT IS DEMONSTRATED?
8=====================
9This example demonstrates how the HID class can be misused to transfer fixed
10size blocks of data (up to the driver's transfer size limit) over HID feature
11reports. This technique is of great value on Windows because no driver DLLs
12are needed (the hid-custom-rq example still requires the libusb-win32 DLL,
13although it may be in the program's directory). The host side application
14requires no installation, it can even be started directly from a CD. This
15example also demonstrates how to transfer data using usbFunctionWrite() and
16usbFunctionRead().
17
18
19PREREQUISITES
20=============
21Target hardware: You need an AVR based circuit based on one of the examples
22(see the "circuits" directory at the top level of this package), e.g. the
23metaboard (http://www.obdev.at/goto.php?t=metaboard).
24
25AVR development environment: You need the gcc tool chain for the AVR, see
26the Prerequisites section in the top level Readme file for how to obtain it.
27
28Host development environment: A C compiler and libusb on Unix. On Windows
29you need the Driver Development Kit (DDK) Instead of libusb. MinGW ships
30with a free version of the DDK.
31
32
33BUILDING THE FIRMWARE
34=====================
35Change to the "firmware" directory and modify Makefile according to your
36architecture (CPU clock, target device, fuse values) and ISP programmer. Then
37edit usbconfig.h according to your pin assignments for D+ and D-. The default
38settings are for the metaboard hardware.
39
40Type "make hex" to build main.hex, then "make flash" to upload the firmware
41to the device. Don't forget to run "make fuse" once to program the fuses. If
42you use a prototyping board with boot loader, follow the instructions of the
43boot loader instead.
44
45Please note that the first "make hex" copies the driver from the top level
46into the firmware directory. If you use a different build system than our
47Makefile, you must copy the driver by hand.
48
49
50BUILDING THE HOST SOFTWARE
51==========================
52Make sure that you have libusb (on Unix) or the DDK (on Windows) installed.
53We recommend MinGW on Windows since it includes a free version of the DDK.
54Then change to directory "commandline" and run "make" on Unix or
55"make -f Makefile.windows" on Windows.
56
57
58USING THE COMMAND LINE TOOL
59===========================
60The device implements a data store of 128 bytes in EEPROM. You can send a
61block of 128 bytes to the device or read the block using the command line
62tool.
63
64To send a block to the device, use e.g.
65
66 hidtool write 0x01,0x02,0x03,0x04,...
67
68and to receive the block, use
69
70 hidtool read
71
72
73----------------------------------------------------------------------------
74(c) 2008 by OBJECTIVE DEVELOPMENT Software GmbH.
75http://www.obdev.at/