On 06/16/2012 09:24 AM, Xiaofan Chen wrote: > On Sat, Jun 16, 2012 at 9:19 PM, Xiaofan Chen <xiaof...@gmail.com> wrote: >> On Sat, Jun 16, 2012 at 7:39 AM, Nathan Hjelm <hje...@me.com> wrote: >>> Since I expect a majority of libusb's users are looking for portability >>> so all of HID device users should be directed to use hidapi. >> Actually hidapi can benefit from the libusb's HID backend as well. >> You can see that HIDAPI has a libusb-1.0 API based backend. >> https://github.com/signal11/hidapi/tree/master/libusb >> >> Right now it is only for Linux and FreeBSD. But if there is >> a native HID backend for libusbx under Mac OS X, the above >> libusb backend for HIDAPI can be extended to Mac OS X as well. >> >> You may ask why that could be beneficial? The native HID backend >> (HIDAPI under Mac OS X and Windows, and the hidraw backend >> for Linux even though hidraw is not the default for HIDAPI Linux) >> may have the side benefits of supporting Bluetooth. But in the future >> libusbx will have new features like Hotplug and Cross-platform event >> handling, that could actually benefit HIDAPI a lot provided libusbx >> supports HID on the platforms.
I don't really understand this statement. HIDAPI currently uses IOHIDManager on Mac, which is the native API for HID device access on Mac. What you're suggesting is that libusb/mac add support for opening HID devices using IOHIDManager, so that then HIDAPI can use libusb/mac to open these devices (which will use IOHIDManager), instead of using IOHIDManager directly, which it already does? > BTW, it seems to me this uhid may be more suitable for > HIDAPI than hidraw in the future as the native backend. > http://permalink.gmane.org/gmane.linux.kernel.input/25430 > > It sounds a bit like the native HID API under Windows. I think uhid is a method to insert HID events and traffic into the HID subsystem of the kernel from a userspace program, for processing as though these events were coming from hardware. The example uhid program creates mouse events from keyboard input. hidraw is the native HID library on Linux for sending and receiving raw data, and it works for USB and Bluetooth. Alan. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel