Home > USB Central > The HID Page > HID Frameworks Code
HID code
using frameworks for the EZ-USB
This is the readme file for fwhid.zip. Fwhid is HID firmware for Cypress Semiconductors' EZ-USB chip. The code is based on Cypress' frameworks C code and is available from Lakeview Research at http://www.lvr.com.
About the code
I developed the firmware using Keil's C compiler and uVision V1.32. The firmware is an adaptation of Cypress' bulktest example. The code requires the full (not evaluation) version of the C compiler.
The firmware defines the device as a member of the human-interface device (HID) class. It enables the device to send and receive 2 bytes of generic data. The code works with the usbhidio application available from www.lvr.com.
These are the major changes I made to the bulktest code:
- In dscr.a51, the class in the interface descriptor is HID, and I added a HID descriptor, a report descriptor, and two interrupt endpoint descriptors.
- In fw.c, I added code to enable the host to retrieve the report descriptor.
- In periph.c, I adapted the code to enable the HID endpoints to send and receive data.
- Dscr.h and ezsub.h have additions required for the above changes.
I left the rest of the code intact, even though some of it (such as code for the other endpoints) is unused.
I surrounded each change or addition to the code with the following comments:
//HID code start
//Hid code end
To avoid problems with paths, I recommend copying the program files to a new folder in the same location used for the other EZ-USB examples. (The default is Anchor\EzUsb\Examples).
Limitations
This version of the code has limitations:
- The host must be running Win98SE , Win2K, or later. This is because the code uses interrupt transfers for both In and Out reports. Windows 98 gold (original) supports only HID 1.0 and thus uses control transfers for Out reports.
- The code supports only one report (report 0).
- The code doesn't support Feature reports.
