TAILIEUCHUNG - USB Complete fourth- P33

USB Complete fourth- P33:This book focuses on Windows programming for PCs, but other computers and operating systems also have USB support, including Linux and Apple Computer’s Macintosh. Some real-time kernels also support USB. | Chapter 12 unit the vendor already knows the data format the device uses in its reports. At most the application might check the Product ID and release number from the device descriptor to learn whether the application can request a particular setting or action. For applications like these the host and device can exchange data in vendor-defined buffers without relying on the report descriptor to define what the buffers contain. Using the HID Descriptor Tool The HID Descriptor Tool Figure 12-1 is a free utility from the USB-IF. The tool helps create report descriptors and flags errors. Instead of having to look up the values that correspond to each item in your report you can select the item from a list and enter the value you want to assign to it and the tool adds the item to the descriptor. You can also add items manually. The Parse Descriptor function displays the raw and interpreted values in your descriptor and comments on any errors found. When you have an error-free descriptor you can convert it to the syntax your firmware requires. The tool has limited support for vendor-specific items however and may flag these as errors. Control and Data Item Values Several documents define values that reports may contain. The first place to look is the USB-IF s HID Usage Tables which defines values for generic desktop controls simulation controls game controls LEDs buttons telephone devices and more. Other values are defined in the main HID specification and the HID specifications for monitor power and point-of-sale devices. Item Format The HID specification defines two report item types short items and long items. As of HID there are no defined Long items. A Short item s 1-byte prefix specifies the item type item tag and item size. These are the elements that make up the prefix byte Bit Number Contents Description Item size Number of bytes in the item Item type Item scope Main Global or Local Item tag Item function 296 Human Interface Devices Reports .

Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.