Logo

embedded24.net - USB HID Host driver for Windows



USB HID devices are widely used in control and electronics in general. There are many microcontrollers from many manufacturers with built-in USB support. The needful firmware for the devices is provided by the manufacturers. But on the Host side, it is still hard to develop a driver. Stop racking your brain and start using AHID Dynamic Link Library - a simple way to interface USB HID devices!



Functions


- AHid_init(): Driver initialization.
- AHid_register(): Interface registration.
- AHid_deregister(): Remove from registration.
- AHid_write(): Write data.
- AHid_read(): Read data.
- AHid_find(): Find the device.
- AHid_identify(): Distinguish between several HID devices of the same type.
- AHid_info(): Show an info box.



Concept


Initialize the AHID Dynamic Link Library by a call to AHid_init(). The next step is to create an interface with AHid_register(). The function returns a handle to your USB device.
AHid_write() sends data to your device. It's done using Interrupt transfers.


AHid Host Driver Application

Figure: Transfer between USB-Device and Host-Application


Using Interrupt Transfers, data reception is done automatically. The AHID.DLL creates an additional thread to listen for incoming data. After data reception, you collect the data by a call to AHid_read().
AHid_find() searches active for your device and returns true when it is detected.
AHid_info() has no function in normal operation. It simply displays some information about the AHID Dynamic Link Library.



Features


- HID USB Host Driver DLL for Windows
- Can be used with Composite Devices
- Support of identical USB Devices on different USB Ports
- Including automatic Device Detection
- Multithreaded Approach for non blocking Data Transfer
- To use with Input and Output Reports
- Allows different Report Id's
- Recommended for low and high Throughput


Version 04/2019


Download the sample projects:

- AHID Demo C++
- AHID Demo C#
- AHID Demo VB
- AHID Demo LabVIEW



Contact


If you find any errors or omissions, or if you have suggestions, please let us know:


info(at)ahidlib.com