kopia lustrzana https://github.com/Hamlib/Hamlib
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-79ac388436b8Hamlib-1.2.13
rodzic
7f06be1267
commit
db563f7aaf
|
@ -226,8 +226,10 @@ int si570avrusb_init(RIG *rig)
|
||||||
|
|
||||||
rp->parm.usb.vid = USBDEV_SHARED_VID;
|
rp->parm.usb.vid = USBDEV_SHARED_VID;
|
||||||
rp->parm.usb.pid = USBDEV_SHARED_PID;
|
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.conf = 1;
|
||||||
rp->parm.usb.iface = 0;
|
|
||||||
rp->parm.usb.alt = 0; /* necessary ? */
|
rp->parm.usb.alt = 0; /* necessary ? */
|
||||||
|
|
||||||
rp->parm.usb.vendor_name = VENDOR_NAME;
|
rp->parm.usb.vendor_name = VENDOR_NAME;
|
||||||
|
|
|
@ -189,6 +189,8 @@ int usb_port_open(hamlib_port_t *port)
|
||||||
usb_detach_kernel_driver_np(udh, port->parm.usb.iface);
|
usb_detach_kernel_driver_np(udh, port->parm.usb.iface);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (port->parm.usb.iface >= 0) {
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
if (usb_set_configuration (udh, port->parm.usb.conf) < 0){
|
if (usb_set_configuration (udh, port->parm.usb.conf) < 0){
|
||||||
rig_debug(RIG_DEBUG_ERR, "%s: usb_set_configuration: failed conf %d: %s\n",
|
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
|
#endif
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
port->handle = (void*) udh;
|
port->handle = (void*) udh;
|
||||||
|
|
||||||
return RIG_OK;
|
return RIG_OK;
|
||||||
|
|
Ładowanie…
Reference in New Issue