Re: [Libusbx-devel] [PATCH] Add HID capability detection for all backends
Hi, On 03/22/2013 11:32 PM, Pete Batard wrote: > On 2013.03.22 17:25, Ludovic Rousseau wrote: >> Change: Auto detach is now fine for me. > > OK. > > I wasn't actually proposing such a change, since, unless somebody > volunteers to create a patch, I volunteer :) > it's extremely unlikely that I'll have > time to spend on that. At any rate, even if there's a volunteer, this > will have to wait till after 1.0.15. Agreed. > > And I agree that auto detach would be better opt-in than forced. We all seem to agree on that, which is good :) So it would be helpful to get some feedback on my proposed API for the opting in before I actually start coding this. Let me quote my own API proposal from another mail: Assuming all platforms will do auto-detach on interface claim (which makes sense given that drivers are usually per interface), we could make this a device_handle property, so then an app would do something like: libusb_device_handle *handle; libusb_open(dev, &handle); libusb_set_auto_detach(handle, 1); libusb_claim_interface(handle, x); With: void libusb_set_auto_detach(libusb_device_handle *dev, int auto_detach); This function would be available on all platforms and simple store the setting in struct libusb_device_handle, and thus always succeed. Interested backends can then get it from struct libusb_device_handle. The documentation for this function will refer to LIBUSB_CAP_SUPPORTS_DETACH_KERNEL_DRIVER and point out that on platforms without that cap calling it is a nop. Regards, Hans -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar ___ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel
Re: [Libusbx-devel] [PATCH] Add HID capability detection for all backends
2013/3/23 Hans de Goede : > We all seem to agree on that, which is good :) So it would be helpful > to get some feedback on my proposed API for the opting in before I > actually start coding this. Let me quote my own API proposal from > another mail: > > Assuming all platforms will do auto-detach on interface claim (which > makes sense given that drivers are usually per interface), we could > make this a device_handle property, so then an app would do something > like: > > libusb_device_handle *handle; > > libusb_open(dev, &handle); > libusb_set_auto_detach(handle, 1); > libusb_claim_interface(handle, x); > > With: > void libusb_set_auto_detach(libusb_device_handle *dev, int auto_detach); I propose to rename the function in libusb_set_auto_detach_kernel_driver() I also propose to give a symbolic name to the parameter value instead of using 1. Something like LIBUSB_AUTO_DETACH_KERNEL_DRIVER_ENABLE I don't know if we also need a LIBUSB_AUTO_DETACH_KERNEL_DRIVER_DISABLE If not maybe the parameter can be removed. Or maybe the function can be named: libusb_set_parameter(handle, LIBUSB_AUTO_DETACH_KERNEL_DRIVER_ENABLE) Bye -- Dr. Ludovic Rousseau -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar ___ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel
Re: [Libusbx-devel] WinCE integration (was: 2 new commits in libusbx)
On Sat, Mar 23, 2013 at 2:16 AM, Toby Gray wrote: > I appreciate that this is 2 months later. But I've finally found the spare > time to try to add WinCE 5 support to CEUSBKwrapper. > > I've attached a couple of patches. Don't feel any pressure to try them. If > you do find some time to try them out then let me know how you get on. > > Depending on what USB devices you want to test with the driver you might > want to add some extra PIDs and VIDs to: > ceusbkwrapper\drv\ceusbkwrapperdrv.reg Thanks a lot for the help. I will check with my friend who has the capability to build the USB driver under the PSDK and test under the real hardware platform (Samsung ARM9 based Windows CE 5 platform). -- Xiaofan -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar ___ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel
Re: [Libusbx-devel] WinCE integration (was: 2 new commits in libusbx)
On Sat, Mar 23, 2013 at 6:38 AM, Pete Batard wrote: > On 2013.03.22 18:16, Toby Gray wrote: >> I appreciate that this is 2 months later. > > Given our current pace, this isn't really a problem ;) > >> But I've finally found the >> spare time to try to add WinCE 5 support to CEUSBKwrapper. >> >> I've attached a couple of patches. Don't feel any pressure to try them. >> If you do find some time to try them out then let me know how you get on. > > I'll look into that after 1.0.15. Take note this is about the CEUSBKWrapper, which is out of the scope for libusbx, so there is really nothing for you to look into if you do not have the Windows CE 5.0 HW platform to test. https://github.com/RealVNC/CEUSBKWrapper -- Xiaofan -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar ___ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel
[Libusbx-devel] Compiler warning for the libusbx fxload example
Under Ubuntu 12.10's MinGW-w64 64bit cross compiler (gcc 4.6.3), there is a minor warning about the fxload example. CC fxload-ezusb.o CC fxload-fxload.o ../../examples/fxload.c: In function ‘print_usage’: ../../examples/fxload.c:67:28: warning: declaration of ‘errcode’ shadows a global declaration [-Wshadow] CCLD fxload.exe -- Xiaofan -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar ___ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel