TAILIEUCHUNG - USB Complete fourth- P32

USB Complete fourth- P32: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 11 reports the BIOS sends the HID-specific Set Protocol request to request to use the boot protocol. When the full HID drivers have been loaded the driver can use Set Protocol to cause the device to switch from the boot protocol to the report protocol which uses the report formats defined in the report descriptor. If the HID doesn t support a boot protocol bInterfaceSubclass 00h. HID Class Descriptor The HID class descriptor Table 11-2 identifies additional descriptors for HID communications. The class descriptor has seven or more fields depending on the number of additional descriptors. Report Descriptors A report descriptor defines the format and use of the data in the HID s reports. If the device is a mouse the data reports mouse movements and button clicks. If the device is a relay controller the data specifies which relays to open and close. The descriptor format is flexible enough for use with devices with varied functions. A report descriptor is a class-specific descriptor. The host retrieves the descriptor by sending a Get Descriptor request to the interface with the wValue field containing 22h in the high byte. Listing 11-2 is a basic report descriptor that defines an Input report an Output report and a Feature report. The device sends two bytes of vendor-defined data in the Input report. The host sends two bytes of vendor-defined data in the Output report. The Feature report is two bytes of vendor-defined data that the host can send to the device or request from the device. Basic report descriptors similar to this example can serve many HIDs with vendor-specific functions. For a loop-back test device firmware can copy received data from an Input report into an Output report to send back to the host. For a lights and switches application firmware can use received Input report data to control LEDs and use Output reports to send logic states read at switches. Each item in the report descriptor consists of a byte that identifies the item and one or .

Đã 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.