TAILIEUCHUNG - USB Complete fourth- P38

USB Complete fourth- P38: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 14 Host Requirements The host Is Windows XP SP2 or later. Needs no more than one open handle to the device at once. Has an INF file that contains the device s Vendor ID and Product ID and a vendor-defined device interface GUID. Has the WinUSB driver and installation files. For Windows XP the device vendor can provide the files which are a free redistributable download from Microsoft. Windows Vista systems include the files. Has a vendor-provided application to communicate with the device. Programming languages for the application can include Visual Basic Visual C and other languages that can call Windows API functions. Device Firmware A WinUSB device has an interface descriptor with bInterfaceClass FFh to indicate a vendor-specific class. Listing 14-1 shows descriptors for an example WinUSB device. Following the interface descriptor are endpoint descriptors for interrupt IN interrupt OUT bulk IN and bulk OUT endpoints as needed. A device can also use vendor-specific control transfers. Unlike HID data WinUSB data doesn t have to be in defined-length reports. Device firmware can respond to vendor-specific requests in control transfers. Firmware handles these transfers in much the same way as the HID Get Report and Set Report requests. The Setup packet can use any values for the wValue wIndex and wLength fields. In the bmRequestType field bits equal 10 to indicate a vendor-defined request. The bRequest field is a vendor-defined request number. For all of the transfer types the host application and device firmware must agree on the data format. For example for a data-acquisition device firmware might define a vendor-specific control request with bRequest 01h to identify the request wIndex indicating which sensor reading to return and wLength equal to the number of bytes the device should return with the requested data. Or the firmware might send sensor data in a defined format on an interrupt or bulk endpoint. In a similar way a host application can send .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.