2012年9月14日 星期五

[USB] Study about HID to serial

The bandwidth on basic HID is limited to 64 KB/sec.

Windows API abstract the software developer from HID reports, allowing the developer to think of the data interface as an unformatted stream of data, similar to a COM port.


Benefits of developing with HID include:
 Compatibility with all commonly-used operating systems (Windows 7/Vista/XP, Mac OS X, Linux)
 No need for driver development or distribution
 Streamlined device/host interface due to standardized (but flexible) HID specifications


Once a device has successfully enumerated, the host can begin sending and receiving data in the form of reports.All data passed between an HID device and a host must be structured according to specifications found in the report descriptor. These reports can be transmitted across either the “Control” pipe (endpoint 0) or the “Interrupt”  pipe (endpoints configured to be IN or OUT).
from AN249.pdf (Silicon Labs)



And UART baud rate is controlled by switch HID-to-Serial Chip.

How to differ each HID devices.

Get the number of physical USB devices on the system associated with this combination of vid and pid.

How to implement Software Application:

At the beginning of the application, the application should register device change notifications by using HID_RegisterForDeviceNotification().
2. Write ON_WM_DEVICECHANGE
3. Write a function OnDeviceChange() as a public function for the window.


沒有留言:

張貼留言