Description
Want
to develop a USB HID device? Need Windows PC application software,
but don't want to deal with custom device drivers? Want to develop
a quick and easy host PC application to test your USB HID device? The UsbHidApi
dynamic link library (DLL) is for you. Did you know that you don't
need a custom driver to access your USB device. If it's a Human Interface
Class (HID) device, you can take advantage of existing Windows drivers.
Used mainly for keyboards, mice, and joysticks, this class is also well-suited
for special-purpose applications including access and control of custom-developed
devices. UsbHidApi encapsulates API calls that give you easy
access to your device. These API calls can be used in any development
environment that accepts DLLs (e.g., Visual C++ & Visual Basic).
Also compatible with LabView and LabWindows/CVI
(see note below).
Also
included is UsbHidApi_NET, a special API version that contains a
wrapper for .NET compatibility (see note
below). Compiled using the Visual C++ Toolkit 2003, UsbHidApi_NET
is recommended for Visual C++ .NET developers.
You
get both the UsbHidApi and the UsbHidApi_NET for the same
low
price!
Check
out these features:
Easy to use API calls - Open( ), Read( ), Write( ), etc.
No custom drivers (uses USB HID drivers already included in Windows)
Develop PC host applications quickly
Write applications for USB HID devices
Includes two API libraries: UsbHidApi and UsbHidApi_NET
Two available demonstration applications: Generic and U4x1 (UsbHidApi only)
Free demo source code included: Visual C++ 6.0 and Visual Basic
VC++ 6.0 demo source available for either generic demo app or U4x1 demo
app
VB demo source available for generic demo app only
Compatible with LabView and LabWindows/CVI (see note)
Also includes API for Visual C++ .NET developers (see note)
Use implicit- or explicit-linking (DLL required for both options, included)
Includes dynamic library library (DLL) file
Advertisement:
|
Attention
Developers and OEMs:
Want
to market your own USB device but don't have the time or resources to develop
it? Our UsbDacq10 design is available for manufacturing and
marketing. Features digital I/O, analog-to-digital, SPI, and R/C
servo channels. Includes schematic, PCB layout, parts list, hex load
file, and host software API (plus demo application).
Click
here to learn more.
|
Advertisement:
|
U4x1
Device Control
Are
you interested in writing a custom application for a UsbMicro U401 or U421
device? Click here to discover how.

|
Designing
Firmware for Your USB Device?
One
of the key elements in developing firmware for your custom USB device is
defining the descriptors. This is important for proper device enumeration
by the host. There are several types of descriptors including configuration,
device, and report. Many times users will define a valid set of descriptors,
but fail to properly classify the device. The device is classified by its
"usage" such as a keyboard, joystick, or mouse. These devices are
typically allocated for exclusive use by the operating system. If
you are developing a custom device (e.g., temperature controller, digital
input/output board, etc.) using the HID class, your report descriptor should
indicate a "Vendor Defined" usage as indicated in the sample report descriptor
below (courtesy of L. Zadra):
/*------ Report Descriptor Group ---------------------*/
/* This is a basic report descriptor. All data in the
*/
/* reports are vendor defined and therefore the host
*/
/* doesn't care what we transfer
*/
BYTE code abromReportDescriptor[SIZEOF_REPORT_DESCRIPTOR]
=
{
0x06, 0xA0, 0xFF, // Usage Page (FFA0H =
vendor defined)
0x09, 0x01, // Usage (vendor defined)
0xA1, 0x01, // Start Collection (Application)
// INPUT DEFINITION
0x09, 0x01, // Usage (vendor defined)
0x15, 0x00, // Logical Minimum (0)
0x25, 0xff, // Logical Maximum (255)
0x75, 0x08, // Report Size ( 8 BITS)
0x95, EP1_MAX_REPORT_SIZE, // Report Count
(16 Bytes)
0x81, 0x00, // Input (Data, Variable, Absolute)
// OUTPUT DEFINITION
0x09, 0x02, // Usage (vendor defined)
0x75, 0x08, // Report Size (8 BITS)
0x95, EP0_MAX_REPORT_SIZE, // Report Count (16
Bytes)
0x91, 0x00, // 0utput (Data, Variable, Absolute)
0xC0 // End Collection
};
|