Add support for USB device without usb_set_configuration() and

without usb_claim_interface(). Looks like needed on Windows 7.


git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2994 7ae35d74-ebe9-4afe-98af-79ac388436b8
Hamlib-1.2.13
Stéphane Fillod, F8CFE 2010-10-08 20:43:53 +00:00
rodzic 7f06be1267
commit db563f7aaf
2 zmienionych plików z 27 dodań i 21 usunięć

Wyświetl plik

@ -226,8 +226,10 @@ int si570avrusb_init(RIG *rig)
rp->parm.usb.vid = USBDEV_SHARED_VID;
rp->parm.usb.pid = USBDEV_SHARED_PID;
/* no usb_set_configuration() and usb_claim_interface() */
rp->parm.usb.iface = -1;
rp->parm.usb.conf = 1;
rp->parm.usb.iface = 0;
rp->parm.usb.alt = 0; /* necessary ? */
rp->parm.usb.vendor_name = VENDOR_NAME;

Wyświetl plik

@ -189,6 +189,8 @@ int usb_port_open(hamlib_port_t *port)
usb_detach_kernel_driver_np(udh, port->parm.usb.iface);
#endif
if (port->parm.usb.iface >= 0) {
#ifdef _WIN32
if (usb_set_configuration (udh, port->parm.usb.conf) < 0){
rig_debug(RIG_DEBUG_ERR, "%s: usb_set_configuration: failed conf %d: %s\n",
@ -217,6 +219,8 @@ int usb_port_open(hamlib_port_t *port)
}
#endif
}
port->handle = (void*) udh;
return RIG_OK;