Spencer Oliver wrote: > > Do you see any speed regression between HIDAPI and libusb-1.0 > > HIDAPI is just a wrapper for HID access, so under Linux uses > libusb-1.0 anyway.
No, that's not true. Please PLEASE look into these things before spreading disinformation. What makes me upset is not that people do not know - nobody knows all - what makes me upset is when people do not find out and just pretend to know. Andreas Fritiofson wrote: > But I guess under other OSes it may use special HID backends? > > What's the benefit of HIDAPI over raw libusb-1.0? HIDAPI supports the native kernel HID APIs of many platforms, as opposed to libusb which uses USB APIs. Since HID class devices are *not* general purpose USB devices but adhere to one specific device class specification, they are automatically bound to the HID class driver included in most every operating system which supports USB. Key point: There already exists a driver for the device. The scope of libusb on the other hand is to write a userspace driver for devices *which have no driver*. Using libusb obviously conflicts with any other driver for a device, such as in this case the HID class driver. Since HIDAPI uses the platform's HID API there is no need for applications to consider the driver. On a side note this is also how Microsoft set back USB device development and worldwide USB user experience by several decades; their USB support has been horrible for a very long time, only HID class devices were truly plug and play on Windows. This changed with their specification of "WinUSB Devices" but it will no doubt take hardware manufacturers several decades to learn how to properly implement such devices. (It takes one correctly formatted string descriptor and one type=vendor recipient=device control request.) HIDAPI on Linux can use either libusb-1.0 or the native HID API hidraw. The latter is obviously prefered for the above reasons. Using HID class for a non-HID type of device is so broken that I do not expect performance to differ much, if at all, between libusb-1.0 and HIDAPI. CMSIS-DAP using HID shows significant lack of understanding of USB on Windows - I believe that the design decision to use HID was made as a desperate attempt to avoid support issues with Windows drivers instead of actually engineering a USB device with a sound USB protocol and the excellent usability and portability of a WinUSB Device. Microsoft fucks it up for everybody again. :( //Peter ------------------------------------------------------------------------------ Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk _______________________________________________ OpenOCD-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openocd-devel
